[Vm-dev] VM Maker: BytecodeSets.spur-eem.33.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Apr 13 22:35:40 UTC 2015
Eliot Miranda uploaded a new version of BytecodeSets to project VM Maker:
http://source.squeak.org/VMMaker/BytecodeSets.spur-eem.33.mcz
==================== Summary ====================
Name: BytecodeSets.spur-eem.33
Author: eem
Time: 13 April 2015, 3:35:35.085 pm
UUID: 01dcdfc6-fb5a-46ec-b0cf-476954092c4c
Ancestors: BytecodeSets.spur-eem.32
SistaV1:
Fix bug in split of callPrimitive: into callInlinePrimitive:.
Add genSendDirectedSuper:numArgs:.
Add nopCode for filling unused opcodes of instrumented
method in ScUnsafeOperationTest
=============== Diff against BytecodeSets.spur-eem.32 ===============
Item was added:
+ ----- Method: EncoderForSistaV1 class>>nopCode (in category 'bytecode decoding') -----
+ nopCode
+ "Answer the call primitive bytecode, if it exists in the encoder's bytecode set, or nil if not.
+ 95 01011111 Nop"
+ ^95!
Item was removed:
- ----- Method: EncoderForSistaV1>>genSendDirectedSuper:numArgs: (in category 'bytecode generation') -----
- genSendDirectedSuper: selectorLiteralIndex numArgs: nArgs
- | extendedIndex |
- (selectorLiteralIndex < 0 or: [selectorLiteralIndex > 65535]) ifTrue:
- [^self outOfRangeError: 'selectorLiteralIndex' index: selectorLiteralIndex range: 0 to: 65535].
- (nArgs < 0 or: [nArgs > 31]) ifTrue:
- [^self outOfRangeError: 'numArgs' index: nArgs range: 0 to: 31 "!!!!"].
- (extendedIndex := selectorLiteralIndex) > 31 ifTrue:
- [self genUnsignedSingleExtendA: extendedIndex // 32.
- extendedIndex := extendedIndex \\ 32].
- "Bit 6 of the ExtB byte is the directed send flag. Bit 6 allows for future expansion to up to 255 args."
- self genUnsignedSingleExtendB: nArgs // 8 + 64.
- "235 11101011 iiiiijjj Send To Superclass Literal Selector #iiiii (+ Extend A * 32) with jjj (+ Extend B * 8) Arguments"
- stream
- nextPut: 235;
- nextPut: nArgs \\ 8 + (extendedIndex * 8)!
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 callInlinePrimitive: byte2 + (byte3 - 128 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