[Vm-dev] VM Maker: VMMaker.oscog-eem.1948.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Sep 7 12:27:46 UTC 2016
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1948.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1948
Author: eem
Time: 7 September 2016, 2:25:30.049917 pm
UUID: 7725d8e2-28a4-4f42-9231-1df18e655857
Ancestors: VMMaker.oscog-eem.1947
Fix off-by-one error in an assert
=============== Diff against VMMaker.oscog-eem.1947 ===============
Item was changed:
----- Method: CoInterpreter>>externalInstVar:ofContext: (in category 'frame access') -----
externalInstVar: offset ofContext: aContext
"Fetch an instance variable from a maybe married context.
If the context is still married compute the value of the
relevant inst var from the spouse frame's state.
If the context is single but has a negative instruction pointer
recognise that the instruction pointer is actually into machine
code and convert it to the corresponding bytecode pc."
<inline: false>
| value |
self assert: (objectMemory isContext: aContext).
+ self assert: offset <= (ReceiverIndex + (self checkStackPointerForMaybeMarriedContext: aContext)).
- self assert: offset < (ReceiverIndex + (self checkStackPointerForMaybeMarriedContext: aContext)).
"method, closureOrNil & receiver need no special handling; only
sender, pc & stackp have to be computed for married contexts."
(self isReadMediatedContextInstVarIndex: offset) ifFalse:
[^objectMemory fetchPointer: offset ofObject: aContext].
self externalWriteBackHeadFramePointers.
(self isStillMarriedContext: aContext) ifTrue:
[^self fetchPointer: offset ofMarriedContext: aContext].
value := objectMemory fetchPointer: offset ofObject: aContext.
(offset = InstructionPointerIndex
and: [(objectMemory isIntegerObject: value)
and: [value signedIntFromLong < 0]]) ifTrue:
[^self mustMapMachineCodePC: (objectMemory integerValueOf: value) context: aContext].
^value!
Item was changed:
----- Method: StackInterpreter>>externalInstVar:ofContext: (in category 'frame access') -----
externalInstVar: offset ofContext: aContext
"Fetch an instance variable from a maybe married context.
If the context is still married compute the value of the
relevant inst var from the spouse frame's state."
<inline: false>
self assert: (objectMemory isContext: aContext).
+ self assert: offset <= (ReceiverIndex + (self checkStackPointerForMaybeMarriedContext: aContext)).
- self assert: offset < (ReceiverIndex + (self checkStackPointerForMaybeMarriedContext: aContext)).
"method, closureOrNil & receiver need no special handling; only
sender, pc & stackp have to be computed for married contexts."
(self isReadMediatedContextInstVarIndex: offset) ifTrue:
[self externalWriteBackHeadFramePointers.
(self isStillMarriedContext: aContext) ifTrue:
[^self fetchPointer: offset ofMarriedContext: aContext]].
^objectMemory fetchPointer: offset ofObject: aContext!
More information about the Vm-dev
mailing list