You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix error reporting in the FFI plugin on the threaded VM. The old code
used a single static variable ffiError which cannot work in a threaded
context. The new code uses Process's osError to hold the FFILastError
code in a byte array. Hence:
- implement fetchInteger:ofObject:/storeInteger:ofObject:withValue: in
the object memories, supporting variable integer collections (ByteArray,
DoubleByteArray, et al, as supported)
- provide a flag bit in vm parameter 65 that identifies the threaded VM
- store/fetch the ffiError value in Process's osError inst var as the
second element of a ByteArray, distinguishing it from an error reaper
value, which should be an integer
By the way:
- fix a leak in the ThreadedFFIPlugin with string parameters. Not all
return paths called clanupCalloutState:, hence forgetting to free
string parameters. Now all return paths taken once argument marshalling
has begun do so.
- fix eeInstantiateMethodContextSlots: to use
allocateSmallNewSpaceSlots:format:classIndex:, generating more compact code
- fix an error in preemptDisowningThread that saved too much stack
Now that fetchInteger:ofObject:/storeInteger:ofObject:withValue: have
been extended to include all integral collecitons fetchInteger:ofObject:
must return a #sqLong, and storeInteger:ofObject:withValue:'s last parameter
must be a #sqLong ...and given the signature of storeInteger:ofObject:withValue:
must change we might as well make it a void function.
And given that InterpreterProxy/sqVirtualMachine now implements activeProcess,
use theActiveProcess in primitiveSetPriority to avoid a Slang warning.
0 commit comments