[Vm-dev] VM Maker: BytecodeSets.spur-eem.32.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Apr 10 18:11:35 UTC 2015
Eliot Miranda uploaded a new version of BytecodeSets to project VM Maker:
http://source.squeak.org/VMMaker/BytecodeSets.spur-eem.32.mcz
==================== Summary ====================
Name: BytecodeSets.spur-eem.32
Author: eem
Time: 10 April 2015, 11:11:29.877 am
UUID: 35a3494f-38a9-4adc-ad87-637dc1eea592
Ancestors: BytecodeSets.spur-eem.31
Separate out callInlinePrimitive: from callPrimitive:
for convenience. The convention that if the top
bit of the 16-bit primitiev index is set, the primitive
is inline is better restricted to the bytecode set
codecs than to all clients.
=============== Diff against BytecodeSets.spur-eem.31 ===============
Item was added:
+ ----- Method: BytecodeEncoder>>sizeCallInlinePrimitive: (in category '*BytecodeSets-opcode sizing') -----
+ sizeCallInlinePrimitive: primitiveIndex
+ ^self sizeOpcodeSelector: #genCallInlinePrimitive: withArguments: {primitiveIndex}!
Item was added:
+ ----- Method: InstructionClient>>callInlinePrimitive: (in category '*BytecodeSets-instruction decoding') -----
+ callInlinePrimitive: pimIndex
+ "SistaV1: 248 11111000 iiiiiiii mjjjjjjj Call Primitive #iiiiiiii + ( jjjjjjj * 256)
+ m=1 means inlined primitive, no hard return after execution."!
Item was added:
+ ----- Method: InstructionPrinter>>callInlinePrimitive: (in category '*BytecodeSets-instruction decoding') -----
+ callInlinePrimitive: index
+ "Print the callInlinePrimitive."
+
+ self print: 'callInlinePrimitive: ' , index printString!
Item was changed:
----- Method: InstructionStream>>interpretNext3ByteSistaV1Instruction:for:extA:extB:startPC: (in category '*BytecodeSets-SistaV1-decoding') -----
interpretNext3ByteSistaV1Instruction: bytecode for: client extA: extA extB: extB startPC: startPC
"Send to the argument, client, a message that specifies the next instruction.
This method handles the three-byte codes.
For a table of the bytecode set, see EncoderForSistaV1's class comment."
| method byte2 byte3 |
method := self method.
byte2 := method at: pc.
byte3 := method at: pc + 1.
pc := pc + 2.
"we search the bytecodes by what we expect to be the static frequency."
bytecode = 248 ifTrue:
+ [byte3 >= 128 ifTrue:
+ [client callInlinePrimitive: byte2 + (byte3 - 128 bitShift: 8)].
+ ^client callPrimitive: byte2 + (byte3 bitShift: 8)].
- [^client callPrimitive: byte2 + (byte3 bitShift: 8)].
bytecode = 250 ifTrue:
["** 250 11111010 eeiiikkk jjjjjjjj Push Closure Num Copied iii (+ExtA//16*8) Num Args kkk (+ ExtA\\16*8) BlockSize jjjjjjjj (+ExtB*256). ee = num extensions"
^client
pushClosureCopyNumCopiedValues: ((byte2 bitShift: -3) bitAnd: 7) + (extA // 16 bitShift: 3)
numArgs: (byte2 bitAnd: 7) + (extA \\ 16 bitShift: 3)
blockSize: byte3 + (extB bitShift: 8)].
bytecode = 251 ifTrue:
[^client pushRemoteTemp: byte2 inVectorAt: byte3].
bytecode = 252 ifTrue:
[^client storeIntoRemoteTemp: byte2 inVectorAt: byte3].
bytecode = 253 ifTrue:
[^client popIntoRemoteTemp: byte2 inVectorAt: byte3].
"249 11111001 xxxxxxxx syyyyyyy Reserved for Push Float"
"254-255 1111111 i xxxxxxxx yyyyyyyy UNASSIGNED"
^self unusedBytecode: client at: startPC!
More information about the Vm-dev
mailing list