[Vm-dev] VM Maker: VMMaker.oscog-eem.1622.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Jan 9 01:27:56 UTC 2016
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1622.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1622
Author: eem
Time: 8 January 2016, 5:26:15.890666 pm
UUID: aa713001-52dc-4142-b483-57dd0339e464
Ancestors: VMMaker.oscog-eem.1621
StackInterpreter & IMMUTABILITY:
Doh! currentBytecode is only inlined in methods marked with <expandCases> so storeAndPopReceiverVariableBytecode needs to grab currentBytecode before fetchNextBytecode in C also.
=============== Diff against VMMaker.oscog-eem.1621 ===============
Item was changed:
----- Method: StackInterpreter>>storeAndPopReceiverVariableBytecode (in category 'stack bytecodes') -----
storeAndPopReceiverVariableBytecode
+ | rcvr top instVarIndex |
- | rcvr top |
rcvr := self receiver.
top := self internalStackTop.
+ instVarIndex := currentBytecode bitAnd: 7.
self internalPop: 1.
+ self fetchNextBytecode.
+ objectMemory
+ storePointerImmutabilityCheck: instVarIndex
+ ofObject: rcvr
+ withValue: top!
- self
- cCode: "Slang will inline currentBytecode to a constant so this will work in C"
- [self fetchNextBytecode.
- objectMemory
- storePointerImmutabilityCheck: (currentBytecode bitAnd: 7)
- ofObject: rcvr
- withValue: top]
- inSmalltalk: "But in Smalltalk we must use the currentBytecode's value, not the next.
- We cant use the following code when generating C code as slang
- won't inline currentBytecode correctly due to the extra temp."
- [ | instVarIndex |
- instVarIndex := currentBytecode bitAnd: 7.
- self fetchNextBytecode.
- objectMemory
- storePointerImmutabilityCheck: instVarIndex
- ofObject: rcvr
- withValue: top]!
More information about the Vm-dev
mailing list