Rika Ichinose
ce5a632432
Remove the rest of the VER3_0 conditionals.
2024-09-01 17:13:39 +00:00
Rika Ichinose
cd2c8a6539
Faster RTTIManagementAndSize -_-.
2024-08-31 11:34:49 +03:00
florian
d8278b1699
* make typing more consitent; cosmetics
2024-08-30 21:42:07 +01:00
Rika Ichinose
6de766e40a
Redesign RTTISizeAndOp to return more useful information.
2024-08-27 14:44:48 +03:00
Michaël Van Canneyt
8139c0a8bd
* Properly nest beginupdate/endupdate in doaddobject
2024-08-27 09:52:36 +02:00
Alligator-1
00d5351b55
partial revert
2024-08-26 20:20:57 +00:00
Alligator-1
8c3829e698
nostackframe
2024-08-26 13:02:45 +00:00
Rika Ichinose
d7352e7b66
Remove most of the VER3_0 conditionals.
2024-08-25 09:44:11 +00:00
Michaël Van Canneyt
58560d333e
* Keep old behaviour, but keep issue #40898 solved
2024-08-24 16:20:27 +02:00
Nikolay Nikolov
919f8f383d
* fixed compilation error, introduced in a0ac317aae
2024-08-23 13:33:25 +03:00
Nikolay Nikolov
a0ac317aae
+ WebAssembly threads: spinwait until ThreadHasFinished becomes true in
...
WasiWaitForThreadTerminate, before freeing the thread TLS and stack block, to
avoid race condition with a thread that is finishing (i.e. the main threadproc
is done), but still executing internal Pascal code inside
FPCWasmThreadStartPascal.
2024-08-23 12:12:16 +03:00
Nikolay Nikolov
7fe6438d44
+ WebAssembly threads: initialize TWasmThread.ThreadHasFinished to false in WasiBeginThread
2024-08-23 12:09:12 +03:00
Nikolay Nikolov
492e38069c
+ WebAssembly threads: introduced TWasmThread.ThreadHasFinished boolean
2024-08-23 12:07:21 +03:00
Nikolay Nikolov
6dfd2de188
+ WebAssembly threads: call FreeStackAndTlsBlock in WasiWaitForThreadTerminate
2024-08-23 11:34:08 +03:00
Nikolay Nikolov
4abbd82135
* WebAssembly threads: made FreeStackAndTlsBlock set the StackBlock and
...
TlsPointers to nil
2024-08-23 11:32:15 +03:00
Nikolay Nikolov
c8b9eb3c5c
* WebAssembly threads: moved the thread stack and TLS block free code to a new
...
procedure: FreeStackAndTlsBlock. No functional changes.
2024-08-23 11:24:02 +03:00
Nikolay Nikolov
df26a02d9d
+ WebAssembly threads: set FThreadReaped to true in TThread.WaitFor, to avoid
...
hang in TThread.SysDestroy after .WaitFor
2024-08-22 19:33:30 +03:00
Michaël Van Canneyt
edde858cfa
* try to avoid incompatibility with lazarus (and possibly others)
2024-08-22 14:47:07 +02:00
Michaël Van Canneyt
8d5cf6ca5c
* Alternative approach for AddObject, which does not break backwards compatibility. Fixes issue #40899
2024-08-22 08:33:38 +02:00
florian
2f0cd77d86
* remove outdated defines, resolves #40897
2024-08-21 23:08:33 +02:00
Nikolay Nikolov
017b41de89
* WebAssembly threads: RTLEvents rewritten to implement an auto reset event.
...
Previous implementation did a manual reset event. However, at least on Windows
and Linux, an auto reset event is used.
2024-08-21 18:10:44 +03:00
Michaël Van Canneyt
d3c902e5a1
* Fix behaviour of AddObject when duplicates=dupIgnore. Patch by Artem Izmaylov. Fixes issue #40898
2024-08-21 17:06:30 +02:00
Nikolay Nikolov
db1d903a11
* WebAssembly threads: use high(uint32) as MaxThreadSignal
2024-08-21 13:56:04 +03:00
florian
db05be80bd
* typo
2024-08-20 23:07:53 +02:00
Rika Ichinose
ea33fdcdf8
Decimate rtl/i386/strings.inc.
2024-08-19 20:34:10 +00:00
Rika Ichinose
ca0e04a346
Faster path for IndexBytes with a match at the beginning.
2024-08-19 20:15:54 +00:00
Nikolay Nikolov
edf7b26f52
+ WebAssembly threads: implemented basic events (both manual and auto reset)
2024-08-19 12:31:19 +03:00
Michaël Van Canneyt
487afd243e
* DefineProperties can have dot in name.
2024-08-19 10:54:05 +02:00
Nikolay Nikolov
200fbf64a1
+ WebAssembly threads: set IsMultiThread to true in WasiBeginThread
2024-08-19 08:36:45 +03:00
Nikolay Nikolov
02867fe918
+ WebAssembly threads: initialize the ThreadId threadvar for the main thread
2024-08-18 12:00:06 +03:00
Michaël Van Canneyt
5186044e81
* TStrings.InsertObject is virtual in Delphi
2024-08-14 15:15:08 +02:00
Michaël Van Canneyt
0533acdc27
* Add RangeIndexError (delphi compatible)
2024-08-14 15:14:24 +02:00
Michaël Van Canneyt
15ba298bae
* Additional check on action.
2024-08-13 10:35:39 +02:00
Michaël Van Canneyt
68acd78640
* Add SMEnuSeparator for Delphi compatibility
2024-08-13 10:32:29 +02:00
Michaël Van Canneyt
2accac30ae
* Check if action is assigned before calling update on it
2024-08-13 10:24:36 +02:00
Rika Ichinose
801e14c33b
Faster Insert(ansi/unicodestring).
2024-08-12 20:09:30 +00:00
Nikolay Nikolov
296a792380
* set MaxIntResource to 1023 for WebAssembly, because that's where the first
...
data segment starts, after commit 3218f25d13 ,
and even before that, when using the external linker
2024-08-11 04:19:36 +03:00
Michaël Van Canneyt
025ad39ef0
* Do not raise exception
2024-08-08 10:15:45 +02:00
Michaël Van Canneyt
37c32a9eb7
* Explicitly specify path to include files
2024-08-08 09:59:40 +02:00
Nikolay Nikolov
af5c2d66c2
* removed TODO comment from WasiThreadSwitch
2024-08-07 18:26:19 +03:00
Nikolay Nikolov
5d058258fc
+ added some more comments in wasi_thread_start
2024-08-07 18:19:35 +03:00
Nikolay Nikolov
a0e1dce1fd
* WebAssembly threads: call fpc_wasm32_init_tls from inline asm code to avoid
...
race condition in branchful exceptions mode
2024-08-07 18:17:38 +03:00
Nikolay Nikolov
fcfce9f2d5
* WebAssembly threads: implement WasiEndThread using exceptions. There's no
...
other way to end a thread in WebAssembly, except by ending the thread
procedure. Therefore, the only way to implement WasiEndThread is to have it
raise an exception and handle it at the outermost level. This, of course,
requires one of the WebAssembly exception modes to be turned on, in order for
this to work.
2024-08-07 17:58:11 +03:00
Nikolay Nikolov
e03389c6a8
* WebAssembly threads: destroy the event and mutex in WasiBeginThread in case wasi_thread_spawn fails
2024-08-07 17:06:03 +03:00
Nikolay Nikolov
77d592221a
* WebAssembly threads: use New and Dispose instead of GetMem/FreeMem for allocating/freeing TWasmThread
2024-08-07 16:46:13 +03:00
Nikolay Nikolov
f23cc9ec6d
* WebAssembly threads: free the stack block and TLS block in case wasi_thread_spawn fails
2024-08-07 16:44:44 +03:00
Nikolay Nikolov
9e0b2869a3
* WebAssembly threads: disable stack checking for the FPCWasmThreadStartPascal procedure
2024-08-06 07:07:41 +03:00
Nikolay Nikolov
9d771396ff
+ WebAssembly threads: init StackBottom (used for stack checking) more precisely
...
when starting a new thread. Precision is not that important for the stack
checking itself, because it uses a stack margin of 16kb, so the previous
value, set by InitThread is good enough, however it's easy to do it precisely,
since we allocate the stack and pass a pointer to it in TWasmThread, so why
not?
2024-08-06 07:01:28 +03:00
Nikolay Nikolov
da59711442
* WebAssembly threads: pass the stack size to InitThread when starting a new thread
2024-08-06 06:40:33 +03:00
Nikolay Nikolov
68f4191119
+ WASI: set StackBottom on startup
2024-08-06 04:02:15 +03:00