[Vm-dev] VM Maker: VMMaker.oscog-eem.3147.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Feb 6 21:51:39 UTC 2022
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3147.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3147
Author: eem
Time: 6 February 2022, 1:51:16.763917 pm
UUID: 409be388-ed75-49dc-a648-c7051eb48168
Ancestors: VMMaker.oscog-eem.3146
Fix regressions in the stack interpreter generated sources from VMMaker.oscog-eem.3144, and in primitiveSupend[V2] from VMMaker.oscog-eem.3142,VMMaker.oscog-eem.3134,VMMaker.oscog-eem.3127.
=============== Diff against VMMaker.oscog-eem.3146 ===============
Item was removed:
- ----- Method: CoInterpreter>>accessorDepthForExternalPrimitiveMethod: (in category 'plugin primitive support') -----
- accessorDepthForExternalPrimitiveMethod: methodObj
- <option: #SpurObjectMemory>
- | flags lit |
- self assert: (self isLinkedExternalPrimitive: methodObj).
- lit := self literal: 0 ofMethod: methodObj.
- flags := objectMemory fetchPointer: ExternalCallLiteralFlagsIndex ofObject: lit.
- ^(objectMemory integerValueOf: flags) >>> SpurPrimitiveAccessorDepthShift!
Item was removed:
- ----- Method: CoInterpreter>>isLinkedExternalPrimitive: (in category 'plugin primitive support') -----
- isLinkedExternalPrimitive: methodObj
- | header primIdx literal targetFunctionIndex |
- header := objectMemory methodHeaderOf: methodObj.
- primIdx := self primitiveIndexOfMethod: methodObj header: header.
- ^primIdx = PrimNumberExternalCall
- and: [(objectMemory literalCountOfMethodHeader: header) > 0
- and: [(objectMemory isArray: (literal := self literal: 0 ofMethod: methodObj))
- and: [(objectMemory numSlotsOf: literal) = 4
- and: [targetFunctionIndex := objectMemory fetchPointer: ExternalCallLiteralTargetFunctionIndex ofObject: literal.
- (objectMemory isIntegerObject: targetFunctionIndex)
- and: [(objectMemory integerValueOf: targetFunctionIndex) > 0]]]]] "A 0 byte module name implies a primitive in the main VM; these can't change"!
Item was added:
+ ----- Method: StackInterpreter>>accessorDepthForExternalPrimitiveMethod: (in category 'plugin primitive support') -----
+ accessorDepthForExternalPrimitiveMethod: methodObj
+ <option: #SpurObjectMemory>
+ | flags lit |
+ self assert: (self isLinkedExternalPrimitive: methodObj).
+ lit := self literal: 0 ofMethod: methodObj.
+ flags := objectMemory fetchPointer: ExternalCallLiteralFlagsIndex ofObject: lit.
+ ^(objectMemory integerValueOf: flags) >>> SpurPrimitiveAccessorDepthShift!
Item was added:
+ ----- Method: StackInterpreter>>isLinkedExternalPrimitive: (in category 'plugin primitive support') -----
+ isLinkedExternalPrimitive: methodObj
+ | header primIdx literal targetFunctionIndex |
+ header := objectMemory methodHeaderOf: methodObj.
+ primIdx := self primitiveIndexOfMethod: methodObj header: header.
+ ^primIdx = PrimNumberExternalCall
+ and: [(objectMemory literalCountOfMethodHeader: header) > 0
+ and: [(objectMemory isArray: (literal := self literal: 0 ofMethod: methodObj))
+ and: [(objectMemory numSlotsOf: literal) = 4
+ and: [targetFunctionIndex := objectMemory fetchPointer: ExternalCallLiteralTargetFunctionIndex ofObject: literal.
+ (objectMemory isIntegerObject: targetFunctionIndex)
+ and: [(objectMemory integerValueOf: targetFunctionIndex) > 0]]]]] "A 0 byte module name implies a primitive in the main VM; these can't change"!
Item was changed:
----- Method: StackInterpreter>>transferTo: (in category 'process primitive support') -----
transferTo: newProc
"Record a process to be awoken on the next interpreter cycle."
| activeContext sched oldProc |
<inline: false>
statProcessSwitch := statProcessSwitch + 1.
self push: instructionPointer.
self externalWriteBackHeadFramePointers.
self assertValidExecutionPointe: instructionPointer + 1 r: framePointer s: stackPointer.
sched := self schedulerPointer.
oldProc := objectMemory fetchPointer: ActiveProcessIndex ofObject: sched.
activeContext := self ensureFrameIsMarried: framePointer SP: stackPointer + objectMemory wordSize.
objectMemory storePointer: SuspendedContextIndex ofObject: oldProc withValue: activeContext.
objectMemory storePointer: ActiveProcessIndex ofObject: sched withValue: newProc.
objectMemory storePointerUnchecked: MyListIndex ofObject: newProc withValue: objectMemory nilObject.
+ self externalSetStackPageAndPointersForSuspendedContextOfProcess: newProc.
+ ^0 "to allow primitiveSuspend[V2] to exit early by returning the result of transferTo:"!
- self externalSetStackPageAndPointersForSuspendedContextOfProcess: newProc!
More information about the Vm-dev
mailing list