<div dir="ltr">Isn't it nice when things just ... work. ;-)</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 10, 2015 at 7:24 AM, <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:<br>
<a href="http://source.squeak.org/VMMaker/VMMaker.oscog-cb.1343.mcz" target="_blank">http://source.squeak.org/VMMaker/VMMaker.oscog-cb.1343.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: VMMaker.oscog-cb.1343<br>
Author: cb<br>
Time: 10 June 2015, 4:23:56.634 pm<br>
UUID: 666300e9-e0db-40f6-bf41-7c9df3946f79<br>
Ancestors: VMMaker.oscog-eem.1342<br>
<br>
Added support for jumpOrPopIfNotInstanceOf: in cogit's scanner.<br>
<br>
=============== Diff against VMMaker.oscog-eem.1342 ===============<br>
<br>
Item was added:<br>
+ ----- Method: SimpleStackBasedCogit>>v4:Long:BranchIfNotInstanceOf:Distance: (in category 'span functions') -----<br>
+ v4: descriptor Long: pc BranchIfNotInstanceOf: nExts Distance: aMethodObj<br>
+ "** 254 11111110 kkkkkkkk jjjjjjjj branch If Not Instance Of Behavior/Array Of Behavior kkkkkkkk (+ Extend A * 256, where Extend A >= 0) distance jjjjjjjj (+ Extend B * 256, where Extend B >= 0)"<br>
+ <var: #descriptor type: #'BytecodeDescriptor *'><br>
+ | extBValue |<br>
+ self assert: nExts >= 0.<br>
+ self parseV4Exts: nExts priorTo: pc in: aMethodObj into: [:ea :eb| extBValue := eb].<br>
+ ^(objectMemory fetchByte: pc + 2 ofObject: aMethodObj) + (extBValue << 8)!<br>
<br>
Item was added:<br>
+ ----- Method: StackDepthFinder>>jumpOrPop:IfNotInstanceOf: (in category 'instruction decoding') -----<br>
+ jumpOrPop: delta IfNotInstanceOf: behaviors<br>
+ "Conditional Jump bytecode."<br>
+ self doJump: delta.<br>
+ self drop.!<br>
<br>
Item was added:<br>
+ ----- Method: StackDepthFinder>>trap (in category 'instruction decoding') -----<br>
+ trap<br>
+ !<br>
<br>
Item was changed:<br>
----- Method: StackToRegisterMappingCogit class>>initializeBytecodeTableForSistaV1 (in category 'class initialization') -----<br>
initializeBytecodeTableForSistaV1<br>
"StackToRegisterMappingCogit initializeBytecodeTableForSistaV1"<br>
<br>
numPushNilsFunction := #sistaV1:Num:Push:Nils:.<br>
pushNilSizeFunction := #sistaV1PushNilSize:numInitialNils:.<br>
BytecodeSetHasDirectedSuperSend := true.<br>
FirstSpecialSelector := 96.<br>
self flag:<br>
'Special selector send class must be inlined to agree with the interpreter, which<br>
inlines class. If class is sent to e.g. a general instance of ProtoObject then unless<br>
class is inlined there will be an MNU. It must be that the Cointerpreter and Cogit<br>
have identical semantics. We get away with not hardwiring the other special<br>
selectors either because in the Cointerpreter they are not inlined or because they<br>
are inlined only to instances of classes for which there will always be a method.'.<br>
self generatorTableFrom: #(<br>
"1 byte bytecodes"<br>
"pushes"<br>
(1 0 15 genPushReceiverVariableBytecode isInstVarRef needsFrameNever: 1)<br>
(1 16 31 genPushLitVarDirSup16CasesBytecode needsFrameNever: 1)<br>
(1 32 63 genPushLiteralConstantBytecode needsFrameNever: 1)<br>
(1 64 75 genPushTemporaryVariableBytecode needsFrameIfMod16GENumArgs: 1)<br>
(1 76 76 genPushReceiverBytecode needsFrameNever: 1)<br>
(1 77 77 genPushConstantTrueBytecode needsFrameNever: 1)<br>
(1 78 78 genPushConstantFalseBytecode needsFrameNever: 1)<br>
(1 79 79 genPushConstantNilBytecode needsFrameNever: 1)<br>
(1 80 80 genPushConstantZeroBytecode needsFrameNever: 1)<br>
(1 81 81 genPushConstantOneBytecode needsFrameNever: 1)<br>
(1 82 82 genExtPushPseudoVariable)<br>
(1 83 83 duplicateTopBytecode needsFrameNever: 1)<br>
<br>
(1 84 87 unknownBytecode)<br>
<br>
"returns"<br>
(1 88 88 genReturnReceiver return needsFrameIfInBlock: isMappedInBlock 0)<br>
(1 89 89 genReturnTrue return needsFrameIfInBlock: isMappedInBlock 0)<br>
(1 90 90 genReturnFalse return needsFrameIfInBlock: isMappedInBlock 0)<br>
(1 91 91 genReturnNil return needsFrameIfInBlock: isMappedInBlock 0)<br>
(1 92 92 genReturnTopFromMethod return needsFrameIfInBlock: isMappedInBlock -1)<br>
(1 93 93 genReturnNilFromBlock return needsFrameNever: -1)<br>
(1 94 94 genReturnTopFromBlock return needsFrameNever: -1)<br>
(1 95 95 genExtNopBytecode needsFrameNever: 0)<br>
<br>
"sends"<br>
(1 96 96 genSpecialSelectorArithmetic isMapped AddRR)<br>
(1 97 97 genSpecialSelectorArithmetic isMapped SubRR)<br>
(1 98 98 genSpecialSelectorComparison isMapped JumpLess)<br>
(1 99 99 genSpecialSelectorComparison isMapped JumpGreater)<br>
(1 100 100 genSpecialSelectorComparison isMapped JumpLessOrEqual)<br>
(1 101 101 genSpecialSelectorComparison isMapped JumpGreaterOrEqual)<br>
(1 102 102 genSpecialSelectorComparison isMapped JumpZero)<br>
(1 103 103 genSpecialSelectorComparison isMapped JumpNonZero)<br>
(1 104 109 genSpecialSelectorSend isMapped) " #* #/ #\\ #@ #bitShift: //"<br>
(1 110 110 genSpecialSelectorArithmetic isMapped AndRR)<br>
(1 111 111 genSpecialSelectorArithmetic isMapped OrRR)<br>
(1 112 117 genSpecialSelectorSend isMapped) "#at: #at:put: #size #next #nextPut: #atEnd"<br>
(1 118 118 genSpecialSelectorEqualsEquals needsFrameNever: notMapped -1) "not mapped because it is directly inlined (for now)"<br>
(1 119 119 genSpecialSelectorClass needsFrameIfStackGreaterThanOne: notMapped 0) "not mapped because it is directly inlined (for now)"<br>
(1 120 127 genSpecialSelectorSend isMapped) "#blockCopy: #value #value: #do: #new #new: #x #y"<br>
<br>
(1 128 143 genSendLiteralSelector0ArgsBytecode isMapped)<br>
(1 144 159 genSendLiteralSelector1ArgBytecode isMapped)<br>
(1 160 175 genSendLiteralSelector2ArgsBytecode isMapped)<br>
<br>
"jumps"<br>
(1 176 183 genShortUnconditionalJump branch v3:ShortForward:Branch:Distance:)<br>
(1 184 191 genShortJumpIfTrue branch isBranchTrue isMapped "because of mustBeBoolean"<br>
v3:ShortForward:Branch:Distance:)<br>
(1 192 199 genShortJumpIfFalse branch isBranchFalse isMapped "because of mustBeBoolean"<br>
v3:ShortForward:Branch:Distance:)<br>
<br>
"stores"<br>
(1 200 207 genStoreAndPopReceiverVariableBytecode isInstVarRef needsFrameNever: -1) "N.B. not frameless if immutability"<br>
(1 208 215 genStoreAndPopTemporaryVariableBytecode)<br>
<br>
(1 216 216 genPopStackBytecode needsFrameNever: -1)<br>
<br>
(1 217 217 genUnconditionalTrapBytecode isMapped)<br>
<br>
(1 218 223 unknownBytecode)<br>
<br>
"2 byte bytecodes"<br>
(2 224 224 extABytecode extension)<br>
(2 225 225 extBBytecode extension)<br>
<br>
"pushes"<br>
(2 226 226 genExtPushReceiverVariableBytecode isInstVarRef) "Needs a frame for context inst var access"<br>
(2 227 227 genExtPushLitVarDirSupBytecode needsFrameNever: 1)<br>
(2 228 228 genExtPushLiteralBytecode needsFrameNever: 1)<br>
(2 229 229 genLongPushTemporaryVariableBytecode)<br>
(2 230 230 genPushClosureTempsBytecode)<br>
(2 231 231 genPushNewArrayBytecode)<br>
(2 232 232 genExtPushIntegerBytecode needsFrameNever: 1)<br>
(2 233 233 genExtPushCharacterBytecode needsFrameNever: 1)<br>
<br>
"returns"<br>
"sends"<br>
(2 234 234 genExtSendBytecode isMapped)<br>
(2 235 235 genExtSendSuperBytecode isMapped)<br>
<br>
"sista bytecodes"<br>
(2 236 236 unknownBytecode)<br>
<br>
"jumps"<br>
(2 237 237 genExtUnconditionalJump branch isMapped "because of interrupt check" v4:Long:Branch:Distance:)<br>
(2 238 238 genExtJumpIfTrue branch isBranchTrue isMapped "because of mustBeBoolean" v4:Long:Branch:Distance:)<br>
(2 239 239 genExtJumpIfFalse branch isBranchFalse isMapped "because of mustBeBoolean" v4:Long:Branch:Distance:)<br>
<br>
"stores"<br>
(2 240 240 genExtStoreAndPopReceiverVariableBytecode isInstVarRef)<br>
(2 241 241 genExtStoreAndPopLiteralVariableBytecode)<br>
(2 242 242 genLongStoreAndPopTemporaryVariableBytecode)<br>
(2 243 243 genExtStoreReceiverVariableBytecode isInstVarRef)<br>
(2 244 244 genExtStoreLiteralVariableBytecode)<br>
(2 245 245 genLongStoreTemporaryVariableBytecode)<br>
<br>
(2 246 247 unknownBytecode)<br>
<br>
"3 byte bytecodes"<br>
(3 248 248 genCallPrimitiveBytecode)<br>
(3 249 249 unknownBytecode) "reserved for Push Float"<br>
(3 250 250 genExtPushClosureBytecode block v4:Block:Code:Size:)<br>
(3 251 251 genPushRemoteTempLongBytecode)<br>
(3 252 252 genStoreRemoteTempLongBytecode)<br>
(3 253 253 genStoreAndPopRemoteTempLongBytecode)<br>
<br>
+ (3 254 254 genExtJumpIfNotInstanceOfBehaviorsOrPopBytecode branch v4:Long:BranchIfNotInstanceOf:Distance:)<br>
- (3 254 254 genExtJumpIfNotInstanceOfBehaviorsOrPopBytecode)<br>
<br>
(3 255 255 unknownBytecode))!<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div>