[Vm-dev] VM Maker: VMMaker.oscog-cb.1259.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Apr 26 16:20:40 UTC 2015
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-cb.1259.mcz
==================== Summary ====================
Name: VMMaker.oscog-cb.1259
Author: cb
Time: 26 April 2015, 6:19:03.384 pm
UUID: c85fc97c-7c12-471f-ba77-932844e7db53
Ancestors: VMMaker.oscog-cb.1258
ooops I forgot an inline true so C code generation was not working because the blocks were not inlined.
=============== Diff against VMMaker.oscog-cb.1258 ===============
Item was changed:
----- Method: StackToRegisterMappingCogit>>extractMaybeBranchDescriptorInto: (in category 'bytecode generator support') -----
extractMaybeBranchDescriptorInto: fourArgBlock
"Looks one instruction ahead of the current bytecodePC and answers its bytecode descriptor and its pc.
If the instruction found is a branch, also answers the pc after the branch and the pc targetted by the branch"
| primDescriptor nextPC nExts branchDescriptor targetBytecodePC postBranchPC |
+ <inline: true>
<var: #primDescriptor type: #'BytecodeDescriptor *'>
<var: #branchDescriptor type: #'BytecodeDescriptor *'>
primDescriptor := self generatorAt: byte0.
nextPC := bytecodePC + primDescriptor numBytes.
nExts := 0.
[branchDescriptor := self generatorAt: (objectMemory fetchByte: nextPC ofObject: methodObj) + bytecodeSetOffset.
branchDescriptor isExtension] whileTrue:
[nExts := nExts + 1.
nextPC := nextPC + branchDescriptor numBytes].
(branchDescriptor isBranchTrue or: [branchDescriptor isBranchFalse]) ifFalse:
[ ^ fourArgBlock value: branchDescriptor value: nextPC value: 0 value: 0 ].
targetBytecodePC := nextPC
+ branchDescriptor numBytes
+ (self spanFor: branchDescriptor at: nextPC exts: nExts in: methodObj).
postBranchPC := nextPC + branchDescriptor numBytes.
fourArgBlock value: branchDescriptor value: nextPC value: postBranchPC value: targetBytecodePC!
More information about the Vm-dev
mailing list