[Vm-dev] VM Maker: VMMaker.oscog-eem.745.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Jun 1 18:35:58 UTC 2014
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.745.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.745
Author: eem
Time: 1 June 2014, 11:33:15.168 am
UUID: 9ae88e74-1041-4ad2-be42-c2277e958b92
Ancestors: VMMaker.oscog-eem.744
and don't forget genExtPushClosureBytecode
=============== Diff against VMMaker.oscog-eem.744 ===============
Item was changed:
----- Method: StackToRegisterMappingCogit>>genExtPushClosureBytecode (in category 'bytecode generators') -----
genExtPushClosureBytecode
"Block compilation. At this point in the method create the block. Note its start
and defer generating code for it until after the method and any other preceeding
blocks. The block's actual code will be compiled later."
"253 11111101 eei i i kkk jjjjjjjj Push Closure Num Copied iii (+ Ext A // 16 * 8) Num Args kkk (+ Ext A \\ 16 * 8) BlockSize jjjjjjjj (+ Ext B * 256). ee = num extensions"
| numArgs numCopied |
self assert: needsFrame.
self addBlockStartAt: bytecodePC + 3 "0 relative"
numArgs: (numArgs := (byte1 bitAnd: 16r7) + (extA \\ 16 * 8))
numCopied: (numCopied := ((byte1 >> 3) bitAnd: 7) + (extA // 16 * 8))
span: byte2 + (extB << 8).
extA := extB := 0.
+
+ objectRepresentation createsClosuresInline ifTrue:
+ [self assert: objectRepresentation getActiveContextAllocatesInMachineCode.
+ optStatus isReceiverResultRegLive: false.
+ self ssAllocateCallReg: ReceiverResultReg
+ and: SendNumArgsReg
+ and: ClassReg.
+ objectRepresentation
+ genNoPopCreateClosureAt: bytecodePC + 4 "1 relative"
+ numArgs: numArgs
+ numCopied: numCopied
+ contextNumArgs: methodOrBlockNumArgs
+ large: (coInterpreter methodNeedsLargeContext: methodObj)
+ inBlock: inBlock.
+ 1 to: numCopied do:
+ [:i| | reg |
+ reg := self ssStorePop: true toPreferredReg: TempReg.
+ objectRepresentation
+ genStoreSourceReg: reg
+ slotIndex: ClosureFirstCopiedValueIndex + numCopied - i
+ intoNewObjectInDestReg: ReceiverResultReg].
+ ^self ssPushRegister: ReceiverResultReg].
+
numCopied > 0 ifTrue:
[self ssFlushTo: simStackPtr].
optStatus isReceiverResultRegLive: false.
objectRepresentation getActiveContextAllocatesInMachineCode
ifTrue: [self ssAllocateCallReg: ReceiverResultReg
and: SendNumArgsReg
and: ClassReg]
ifFalse: [self ssAllocateCallReg: SendNumArgsReg
and: ReceiverResultReg].
objectRepresentation
genCreateClosureAt: bytecodePC + 4 "1 relative"
numArgs: numArgs
numCopied: numCopied
contextNumArgs: methodOrBlockNumArgs
large: (coInterpreter methodNeedsLargeContext: methodObj)
inBlock: inBlock.
numCopied > 0 ifTrue:
[self ssPop: numCopied].
^self ssPushRegister: ReceiverResultReg!
More information about the Vm-dev
mailing list