<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Nicolas,</div><div><br></div><div>&nbsp; &nbsp; on the contrary, it fixed a bug. &nbsp;It makes Integer receiver op float arg behave the same as Float receiver op float arg. &nbsp;If you look at (IIRC) genDoubleComparison:invert: that dies the same thing.<br><br>Sent from my iPhone</div><div><br>On Aug 7, 2015, at 1:36 PM, Nicolas Cellier &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><span></span></div></blockquote><blockquote type="cite"><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-08-07 20:47 GMT+02:00  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span>:<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-eem.1429.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1429.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: VMMaker.oscog-eem.1429<br>
Author: eem<br>
Time: 7 August 2015, 11:46:05.819 am<br>
UUID: 446c2481-93c9-43bc-86ac-0743223bfa0c<br>
Ancestors: VMMaker.oscog-rmacnak.1428<br>
<br>
Fix Integer receiver, float arg comparison with NaNs in the machine-code primitive.&nbsp; This has started failing in the FloatTest&gt;&gt;testNaNCompare since the new machine-code perform primitive invoked the machine-code version of the primitive.&nbsp; The Interpretewr code has always been correct and the old perform primitive would always run the Interpreter primitive if it exsted, since this would probably be faster.<br>
<br>
Luckily the ARM requires no changes.&nbsp; It can continue to use FCMP instead of FCMPE.&nbsp; Include a generator for the FCMPE instruction; it got written to experiment and does no harm remaining there unused.<br>
<br>
Refactor stack page list printing to include use counts.<br>
<br>
Simulator:<br>
Simplify and clean-up directory entry call.<br>
<br>
=============== Diff against VMMaker.oscog-rmacnak.1428 ===============<br>
<br>
Item was added:<br>
+ ----- Method: CogARMCompiler&gt;&gt;fcmpeFrom:to: (in category 'ARM convenience instructions') -----<br>
+ fcmpeFrom: regA to: regB<br>
+&nbsp; &nbsp; &nbsp; &nbsp;"FCMPE or VCMPE instruction to compare two fpu double registers.<br>
+&nbsp; &nbsp; &nbsp; &nbsp; ARM_ARM v5 DDI 01001.pdf pp. C4-12"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;inline: true&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;^(2r11101110101101000000101111000000 bitOr: (regA &lt;&lt;12)) bitOr: regB!<br>
<br>
Item was changed:<br>
&nbsp; ----- Method: CogVMSimulator&gt;&gt;primitiveDirectoryEntry (in category 'file primitives') -----<br>
&nbsp; primitiveDirectoryEntry<br>
&nbsp; &nbsp; &nbsp; &nbsp; | name pathName array result |<br>
&nbsp; &nbsp; &nbsp; &nbsp; name := self stringOf: self stackTop.<br>
&nbsp; &nbsp; &nbsp; &nbsp; pathName := self stringOf: (self stackValue: 1).<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; self successful ifFalse:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [^self primitiveFail].<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; array := FileDirectory default primLookupEntryIn: pathName name: name.<br>
&nbsp; &nbsp; &nbsp; &nbsp; array == nil ifTrue:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [self pop: 3 thenPush: objectMemory nilObject.<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^array].<br>
&nbsp; &nbsp; &nbsp; &nbsp; array == #badDirectoryPath ifTrue:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [self halt.<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^self primitiveFail].<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; PharoVM<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifTrue: [<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result := self makeDirEntryName: (array at: 1) size: (array at: 1) size<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createDate: (array at: 2) modDate: (array at: 3)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isDir: (array at: 4) fileSize: (array at: 5)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; posixPermissions: (array at: 6) isSymlink: (array at: 7) ]<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifFalse: [<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result := self makeDirEntryName: (array at: 1) size: (array at: 1) size<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createDate: (array at: 2) modDate: (array at: 3)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isDir: (array at: 4) fileSize: (array at: 5) ].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self pop: 3 thenPush: result!<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self pop: 3.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self push: result!<br>
<br>
Item was removed:<br>
- ----- Method: InterpreterSimulator&gt;&gt;makeDirEntryName:size:createDate:modDate:isDir:fileSize:posixPermissions: (in category 'file primitives') -----<br>
- makeDirEntryName: entryName size: entryNameSize createDate: createDate modDate: modifiedDate isDir: dirFlag fileSize: posixPermissions posixPermissions: fileSize<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;option: #PharoVM&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: 'entryName' type: 'char *'&gt;<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;| modDateOop createDateOop nameString results |<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;"allocate storage for results, remapping newly allocated<br>
-&nbsp; &nbsp; &nbsp; &nbsp; oops in case GC happens during allocation"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self pushRemappableOop:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(self instantiateClass: (self splObj: ClassArray) indexableSize: 5).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self pushRemappableOop:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(self instantiateClass: (self splObj: ClassString) indexableSize: entryNameSize)..<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self pushRemappableOop: (self positive32BitIntegerFor: createDate).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self pushRemappableOop: (self positive32BitIntegerFor: modifiedDate).<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;modDateOop&nbsp; &nbsp;:= self popRemappableOop.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;createDateOop := self popRemappableOop.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;nameString&nbsp; &nbsp; := self popRemappableOop.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;results&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= self popRemappableOop.<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;1 to: entryNameSize do: [ :i |<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self storeByte: i-1 ofObject: nameString withValue: (entryName at: i) asciiValue.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;].<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self storePointer: 0 ofObject: results withValue: nameString.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self storePointer: 1 ofObject: results withValue: createDateOop.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self storePointer: 2 ofObject: results withValue: modDateOop.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;dirFlag<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue: [ self storePointer: 3 ofObject: results withValue: trueObj ]<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse: [ self storePointer: 3 ofObject: results withValue: falseObj ].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self storePointer: 4<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ofObject: results<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;withValue: (self integerObjectOf: fileSize).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self storePointer: 5<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ofObject: results<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;withValue: (self integerObjectOf: posixPermissions).<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;^ results<br>
- !<br>
<br>
Item was changed:<br>
&nbsp; ----- Method: SimpleStackBasedCogit&gt;&gt;genPrimitiveEqual (in category 'primitive generators') -----<br>
&nbsp; genPrimitiveEqual<br>
+&nbsp; &nbsp; &nbsp; &nbsp;^self genSmallIntegerComparison: JumpZero<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;orDoubleComparison: #JumpFPEqual:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;invert: false!<br>
-&nbsp; &nbsp; &nbsp; &nbsp;^self genSmallIntegerComparison: JumpZero orDoubleComparison: #JumpFPEqual: asSymbol!<br>
<br>
Item was changed:<br>
&nbsp; ----- Method: SimpleStackBasedCogit&gt;&gt;genPrimitiveGreaterOrEqual (in category 'primitive generators') -----<br>
&nbsp; genPrimitiveGreaterOrEqual<br>
+&nbsp; &nbsp; &nbsp; &nbsp;^self genSmallIntegerComparison: JumpGreaterOrEqual<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;orDoubleComparison: #JumpFPGreaterOrEqual:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;invert: false!<br>
-&nbsp; &nbsp; &nbsp; &nbsp;^self genSmallIntegerComparison: JumpGreaterOrEqual orDoubleComparison: #JumpFPGreaterOrEqual: asSymbol!<br>
<br>
Item was changed:<br>
&nbsp; ----- Method: SimpleStackBasedCogit&gt;&gt;genPrimitiveGreaterThan (in category 'primitive generators') -----<br>
&nbsp; genPrimitiveGreaterThan<br>
+&nbsp; &nbsp; &nbsp; &nbsp;^self genSmallIntegerComparison: JumpGreater<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;orDoubleComparison: #JumpFPGreater:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;invert: false!<br>
-&nbsp; &nbsp; &nbsp; &nbsp;^self genSmallIntegerComparison: JumpGreater orDoubleComparison: #JumpFPGreater: asSymbol!<br>
<br>
Item was changed:<br>
&nbsp; ----- Method: SimpleStackBasedCogit&gt;&gt;genPrimitiveLessOrEqual (in category 'primitive generators') -----<br>
&nbsp; genPrimitiveLessOrEqual<br>
+&nbsp; &nbsp; &nbsp; &nbsp;^self<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;genSmallIntegerComparison: JumpLessOrEqual<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;orDoubleComparison: #JumpFPGreater:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;invert: true!<br>
-&nbsp; &nbsp; &nbsp; &nbsp;^self genSmallIntegerComparison: JumpLessOrEqual orDoubleComparison: #JumpFPLessOrEqual: asSymbol!<br></blockquote><div><br><br>???<br></div><div>Isn't this going to be a regression when comparing with NaN?<br><br></div><div>(2 &lt;= Float nan) = false.<br></div><div>(2 &gt; Float nan) not = true.<br><br></div><div>They are not equivalent and using inversion is not correct.<br></div><div>Or is nan handled elsewhere?<br>&nbsp;<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Item was changed:<br>
&nbsp; ----- Method: SimpleStackBasedCogit&gt;&gt;genPrimitiveLessThan (in category 'primitive generators') -----<br>
&nbsp; genPrimitiveLessThan<br>
+&nbsp; &nbsp; &nbsp; &nbsp;^self<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;genSmallIntegerComparison: JumpLess<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;orDoubleComparison: #JumpFPGreaterOrEqual:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;invert: true!<br>
-&nbsp; &nbsp; &nbsp; &nbsp;^self genSmallIntegerComparison: JumpLess orDoubleComparison: #JumpFPLess: asSymbol!<br>
<br>
Item was changed:<br>
&nbsp; ----- Method: SimpleStackBasedCogit&gt;&gt;genPrimitiveNotEqual (in category 'primitive generators') -----<br>
&nbsp; genPrimitiveNotEqual<br>
+&nbsp; &nbsp; &nbsp; &nbsp;^self genSmallIntegerComparison: JumpNonZero<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;orDoubleComparison: #JumpFPNotEqual:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;invert: false!<br>
-&nbsp; &nbsp; &nbsp; &nbsp;^self genSmallIntegerComparison: JumpNonZero orDoubleComparison: #JumpFPNotEqual: asSymbol!<br>
<br>
Item was removed:<br>
- ----- Method: SimpleStackBasedCogit&gt;&gt;genSmallIntegerComparison:orDoubleComparison: (in category 'primitive generators') -----<br>
- genSmallIntegerComparison: jumpOpcode orDoubleComparison: jumpFPOpcodeGenerator<br>
-&nbsp; &nbsp; &nbsp; &nbsp;"Stack looks like<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;receiver (also in ResultReceiverReg)<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;arg<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return address"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;| jumpDouble jumpNonInt jumpFail jumpTrue jumpCond |<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpFPOpcodeGenerator declareC: 'AbstractInstruction *(*jumpFPOpcodeGenerator)(void *)'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpDouble type: #'AbstractInstruction *'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpNonInt type: #'AbstractInstruction *'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpCond type: #'AbstractInstruction *'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpTrue type: #'AbstractInstruction *'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpFail type: #'AbstractInstruction *'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;backEnd hasDoublePrecisionFloatingPointSupport ifFalse:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[^self genSmallIntegerComparison: jumpOpcode].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self genLoadArgAtDepth: 0 into: ClassReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpDouble := objectRepresentation genJumpNotSmallInteger: ClassReg scratchReg: TempReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self CmpR: ClassReg R: ReceiverResultReg. "N.B. FLAGS := RRReg - ClassReg"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpTrue := self gen: jumpOpcode.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self genMoveFalseR: ReceiverResultReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self RetN: (self primRetNOffsetFor: 1).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpTrue jmpTarget: (self genMoveTrueR: ReceiverResultReg).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self RetN: (self primRetNOffsetFor: 1).<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;"Argument may be a Float : let us check or fail"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpDouble jmpTarget: self Label.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation smallIntegerIsOnlyImmediateType ifFalse:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[jumpNonInt := objectRepresentation genJumpImmediate: ClassReg].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genGetCompactClassIndexNonImmOf: ClassReg into: SendNumArgsReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genCmpClassFloatCompactIndexR: SendNumArgsReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpFail := self JumpNonZero: 0.<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;"It was a Float, so convert the receiver to double and perform the operation"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self MoveR: ReceiverResultReg R: TempReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genConvertSmallIntegerToIntegerInReg: TempReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self ConvertR: TempReg Rd: DPFPReg0.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genGetDoubleValueOf: ClassReg into: DPFPReg1.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self CmpRd: DPFPReg1 Rd: DPFPReg0.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpCond := self perform: jumpFPOpcodeGenerator with: 0. "FP jumps are a little weird"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self genMoveFalseR: ReceiverResultReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self RetN: (self primRetNOffsetFor: 1).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpCond jmpTarget: (self genMoveTrueR: ReceiverResultReg).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self RetN: (self primRetNOffsetFor: 1).<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation smallIntegerIsOnlyImmediateType<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue: [jumpFail jmpTarget: self Label]<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse: [jumpNonInt jmpTarget: (jumpFail jmpTarget: self Label)].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;^0!<br>
<br>
Item was added:<br>
+ ----- Method: SimpleStackBasedCogit&gt;&gt;genSmallIntegerComparison:orDoubleComparison:invert: (in category 'primitive generators') -----<br>
+ genSmallIntegerComparison: jumpOpcode orDoubleComparison: jumpFPOpcodeGenerator invert: invertComparison<br>
+&nbsp; &nbsp; &nbsp; &nbsp;"Stack looks like<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;receiver (also in ResultReceiverReg)<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;arg<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return address"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;| jumpDouble jumpNonInt jumpFail jumpTrue jumpCond |<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpFPOpcodeGenerator declareC: 'AbstractInstruction *(*jumpFPOpcodeGenerator)(void *)'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpDouble type: #'AbstractInstruction *'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpNonInt type: #'AbstractInstruction *'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpCond type: #'AbstractInstruction *'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpTrue type: #'AbstractInstruction *'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpFail type: #'AbstractInstruction *'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;backEnd hasDoublePrecisionFloatingPointSupport ifFalse:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[^self genSmallIntegerComparison: jumpOpcode].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self genLoadArgAtDepth: 0 into: ClassReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpDouble := objectRepresentation genJumpNotSmallInteger: ClassReg scratchReg: TempReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self CmpR: ClassReg R: ReceiverResultReg. "N.B. FLAGS := RRReg - ClassReg"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpTrue := self gen: jumpOpcode.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self genMoveFalseR: ReceiverResultReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self RetN: (self primRetNOffsetFor: 1).<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpTrue jmpTarget: (self genMoveTrueR: ReceiverResultReg).<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self RetN: (self primRetNOffsetFor: 1).<br>
+<br>
+&nbsp; &nbsp; &nbsp; &nbsp;"Argument may be a Float : let us check or fail"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpDouble jmpTarget: self Label.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation smallIntegerIsOnlyImmediateType ifFalse:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[jumpNonInt := objectRepresentation genJumpImmediate: ClassReg].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genGetCompactClassIndexNonImmOf: ClassReg into: SendNumArgsReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genCmpClassFloatCompactIndexR: SendNumArgsReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpFail := self JumpNonZero: 0.<br>
+<br>
+&nbsp; &nbsp; &nbsp; &nbsp;"It was a Float, so convert the receiver to double and perform the operation"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self MoveR: ReceiverResultReg R: TempReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genConvertSmallIntegerToIntegerInReg: TempReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self ConvertR: TempReg Rd: DPFPReg0.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genGetDoubleValueOf: ClassReg into: DPFPReg1.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;invertComparison "May need to invert for NaNs"<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue: [self CmpRd: DPFPReg0 Rd: DPFPReg1]<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse: [self CmpRd: DPFPReg1 Rd: DPFPReg0].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpCond := self perform: jumpFPOpcodeGenerator with: 0. "FP jumps are a little weird"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self genMoveFalseR: ReceiverResultReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self RetN: (self primRetNOffsetFor: 1).<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpCond jmpTarget: (self genMoveTrueR: ReceiverResultReg).<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self RetN: (self primRetNOffsetFor: 1).<br>
+<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation smallIntegerIsOnlyImmediateType<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue: [jumpFail jmpTarget: self Label]<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse: [jumpNonInt jmpTarget: (jumpFail jmpTarget: self Label)].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;^0!<br>
<br>
Item was changed:<br>
&nbsp; ----- Method: StackInterpreter&gt;&gt;printStackPage: (in category 'debug printing') -----<br>
&nbsp; printStackPage: page<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;inline: true&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self printStackPage: page useCount: -1!<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;inline: false&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #page type: #'StackPage *'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self print: 'page '; printHexPtr: (self cCode: [page] inSmalltalk: [page baseAddress]);<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print: ' ('; printNum: (stackPages pageIndexFor: page realStackLimit);<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print: ')&nbsp; (trace: '; printNum: page trace; printChar: $).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;(stackPages isFree: page) ifTrue:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self print: ' (free)'].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;page = stackPages mostRecentlyUsedPage ifTrue:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self print: ' (MRU)'].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self cr; tab; print: 'ba: ';<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printHexPtr: page baseAddress; print: ' - sl: ';<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printHexPtr: page realStackLimit; print: ' - sl-so: ';<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printHexPtr: page realStackLimit - self stackLimitOffset; print: ' - la:';<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printHexPtr: page lastAddress.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;(stackPages isFree: page) ifFalse:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self cr; tab; print: 'baseFP '; printHexPtr: page baseFP.<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self "cr;" tab; print: 'headFP '; printHexPtr: page headFP.<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self "cr;" tab; print: 'headSP '; printHexPtr: page headSP].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self cr; tab; print: 'prev '; printHexPtr: (self cCode: 'page-&gt;prevPage' inSmalltalk: [page prevPage baseAddress]);<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print: ' ('; printNum: (stackPages pageIndexFor: page prevPage realStackLimit); printChar: $).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self tab; print: 'next '; printHexPtr: (self cCode: 'page-&gt;nextPage' inSmalltalk: [page nextPage baseAddress]);<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print: ' ('; printNum: (stackPages pageIndexFor: page nextPage realStackLimit); printChar: $).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self cr!<br>
<br>
Item was added:<br>
+ ----- Method: StackInterpreter&gt;&gt;printStackPage:useCount: (in category 'debug printing') -----<br>
+ printStackPage: page useCount: n<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;inline: false&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #page type: #'StackPage *'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self print: 'page '; printHexPtr: (self cCode: [page] inSmalltalk: [page baseAddress]);<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print: ' ('; printNum: (stackPages pageIndexFor: page realStackLimit).<br>
+&nbsp; &nbsp; &nbsp; &nbsp;n &gt;= 0 ifTrue:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self print: ','; printNum: n].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self print: ')&nbsp; (trace: '; printNum: page trace; printChar: $).<br>
+&nbsp; &nbsp; &nbsp; &nbsp;(stackPages isFree: page) ifTrue:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self print: ' (free)'].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;page = stackPages mostRecentlyUsedPage ifTrue:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self print: ' (MRU)'].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;page prevPage = stackPages mostRecentlyUsedPage ifTrue:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self print: ' (LRU)'].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self cr; tab; print: 'ba: ';<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printHexPtr: page baseAddress; print: ' - sl: ';<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printHexPtr: page realStackLimit; print: ' - sl-so: ';<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printHexPtr: page realStackLimit - self stackLimitOffset; print: ' - la:';<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printHexPtr: page lastAddress.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;(stackPages isFree: page) ifFalse:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self cr; tab; print: 'baseFP '; printHexPtr: page baseFP.<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self "cr;" tab; print: 'headFP '; printHexPtr: page headFP.<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self "cr;" tab; print: 'headSP '; printHexPtr: page headSP].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self cr; tab; print: 'prev '; printHexPtr: (self cCode: 'page-&gt;prevPage' inSmalltalk: [page prevPage baseAddress]);<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print: ' ('; printNum: (stackPages pageIndexFor: page prevPage realStackLimit); printChar: $).<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self tab; print: 'next '; printHexPtr: (self cCode: 'page-&gt;nextPage' inSmalltalk: [page nextPage baseAddress]);<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print: ' ('; printNum: (stackPages pageIndexFor: page nextPage realStackLimit); printChar: $).<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self cr!<br>
<br>
Item was changed:<br>
&nbsp; ----- Method: StackInterpreter&gt;&gt;printStackPageListInUse (in category 'debug printing') -----<br>
&nbsp; printStackPageListInUse<br>
+&nbsp; &nbsp; &nbsp; &nbsp;| page n |<br>
-&nbsp; &nbsp; &nbsp; &nbsp;| page |<br>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;inline: false&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;var: #page type: #'StackPage *'&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp; page := stackPages mostRecentlyUsedPage.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;n := 0.<br>
&nbsp; &nbsp; &nbsp; &nbsp; [(stackPages isFree: page) ifFalse:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self printStackPage: page useCount: n; cr.<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n := n + 1].<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self printStackPage: page.<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self cr].<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(page := page prevPage) ~= stackPages mostRecentlyUsedPage] whileTrue!<br>
<br>
Item was changed:<br>
&nbsp; ----- Method: StackInterpreter&gt;&gt;printStackPagesInUse (in category 'debug printing') -----<br>
&nbsp; printStackPagesInUse<br>
+&nbsp; &nbsp; &nbsp; &nbsp;| n |<br>
+&nbsp; &nbsp; &nbsp; &nbsp;n := 0.<br>
&nbsp; &nbsp; &nbsp; &nbsp; 0 to: numStackPages - 1 do:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [:i|<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (stackPages isFree: (stackPages stackPageAt: i)) ifFalse:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self printStackPage: (stackPages stackPageAt: i) useCount: n; cr.<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n := n + 1]]!<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self printStackPage: (stackPages stackPageAt: i).<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self cr]]!<br>
<br>
Item was removed:<br>
- ----- Method: StackInterpreterSimulator&gt;&gt;makeDirEntryName:size:createDate:modDate:isDir:fileSize:posixPermissions: (in category 'file primitives') -----<br>
- makeDirEntryName: entryName size: entryNameSize createDate: createDate modDate: modifiedDate isDir: dirFlag fileSize: fileSize posixPermissions: posixPermissions<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;option: #PharoVM&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: 'entryName' type: 'char *'&gt;<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;| modDateOop createDateOop nameString results |<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;results&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= objectMemory instantiateClass: (objectMemory splObj: ClassArray) indexableSize: 5.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;nameString&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := objectMemory instantiateClass: (objectMemory splObj: ClassString) indexableSize: entryNameSize.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;createDateOop&nbsp; &nbsp;:= self positive32BitIntegerFor: createDate.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;modDateOop&nbsp; &nbsp; &nbsp; := self positive32BitIntegerFor: modifiedDate.<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;1 to: entryNameSize do:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[ :i |<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;objectMemory storeByte: i-1 ofObject: nameString withValue: (entryName at: i) asciiValue].<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectMemory storePointerUnchecked: 0 ofObject: results withValue: nameString.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectMemory storePointerUnchecked: 1 ofObject: results withValue: createDateOop.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectMemory storePointerUnchecked: 2 ofObject: results withValue: modDateOop.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;dirFlag<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue: [ objectMemory storePointerUnchecked: 3 ofObject: results withValue: objectMemory trueObject ]<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse: [ objectMemory storePointerUnchecked: 3 ofObject: results withValue: objectMemory falseObject ].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectMemory storePointerUnchecked: 4 ofObject: results withValue: (objectMemory integerObjectOf: fileSize).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectMemory storePointerUnchecked: 5 ofObject: results withValue: (objectMemory integerObjectOf: posixPermissions).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;^ results!<br>
<br>
Item was changed:<br>
&nbsp; ----- Method: StackInterpreterSimulator&gt;&gt;primitiveDirectoryEntry (in category 'file primitives') -----<br>
&nbsp; primitiveDirectoryEntry<br>
&nbsp; &nbsp; &nbsp; &nbsp; | name pathName array result |<br>
&nbsp; &nbsp; &nbsp; &nbsp; name := self stringOf: self stackTop.<br>
&nbsp; &nbsp; &nbsp; &nbsp; pathName := self stringOf: (self stackValue: 1).<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; self successful ifFalse:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [^self primitiveFail].<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; array := FileDirectory default primLookupEntryIn: pathName name: name.<br>
&nbsp; &nbsp; &nbsp; &nbsp; array == nil ifTrue:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [self pop: 3 thenPush: objectMemory nilObject.<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^array].<br>
&nbsp; &nbsp; &nbsp; &nbsp; array == #badDirectoryPath ifTrue:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [self halt.<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^self primitiveFail].<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; PharoVM<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifTrue: [<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result := self makeDirEntryName: (array at: 1) size: (array at: 1) size<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createDate: (array at: 2) modDate: (array at: 3)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isDir: (array at: 4) fileSize: (array at: 5)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; posixPermissions: (array at: 6) isSymlink: (array at: 7) ]<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifFalse: [<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result := self makeDirEntryName: (array at: 1) size: (array at: 1) size<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createDate: (array at: 2) modDate: (array at: 3)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isDir: (array at: 4)&nbsp; fileSize: (array at: 5) ].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self pop: 3 thenPush: result!<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self pop: 3.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self push: result!<br>
<br>
Item was removed:<br>
- ----- Method: StackToRegisterMappingCogit&gt;&gt;genSmallIntegerComparison:orDoubleComparison: (in category 'primitive generators') -----<br>
- genSmallIntegerComparison: jumpOpcode orDoubleComparison: jumpFPOpcodeGenerator<br>
-&nbsp; &nbsp; &nbsp; &nbsp;"Stack looks like<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return address"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;| jumpDouble jumpNonInt jumpFail jumpTrue jumpCond |<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpFPOpcodeGenerator declareC: 'AbstractInstruction *(*jumpFPOpcodeGenerator)(void *)'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpDouble type: #'AbstractInstruction *'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpNonInt type: #'AbstractInstruction *'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpCond type: #'AbstractInstruction *'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpTrue type: #'AbstractInstruction *'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpFail type: #'AbstractInstruction *'&gt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;backEnd hasDoublePrecisionFloatingPointSupport ifFalse:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[^self genSmallIntegerComparison: jumpOpcode].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpDouble := objectRepresentation genJumpNotSmallInteger: Arg0Reg scratchReg: TempReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self CmpR: Arg0Reg R: ReceiverResultReg. "N.B. FLAGS := RRReg - Arg0Reg"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpTrue := self gen: jumpOpcode.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self genMoveFalseR: ReceiverResultReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self RetN: 0.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpTrue jmpTarget: (self genMoveTrueR: ReceiverResultReg).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self RetN: 0.<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;"Argument may be a Float : let us check or fail"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpDouble jmpTarget: self Label.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation smallIntegerIsOnlyImmediateType ifFalse:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[jumpNonInt := objectRepresentation genJumpImmediate: Arg0Reg].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genGetCompactClassIndexNonImmOf: Arg0Reg into: SendNumArgsReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genCmpClassFloatCompactIndexR: SendNumArgsReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpFail := self JumpNonZero: 0.<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;"It was a Float, so convert the receiver to double and perform the operation"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genConvertSmallIntegerToIntegerInReg: ReceiverResultReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self ConvertR: ReceiverResultReg Rd: DPFPReg0.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genGetDoubleValueOf: Arg0Reg into: DPFPReg1.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self CmpRd: DPFPReg1 Rd: DPFPReg0.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpCond := self perform: jumpFPOpcodeGenerator with: 0. "FP jumps are a little weird"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self genMoveFalseR: ReceiverResultReg.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self RetN: 0.<br>
-&nbsp; &nbsp; &nbsp; &nbsp;jumpCond jmpTarget: (self genMoveTrueR: ReceiverResultReg).<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self RetN: 0.<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation smallIntegerIsOnlyImmediateType<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue: [jumpFail jmpTarget: self Label]<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse: [jumpNonInt jmpTarget: (jumpFail jmpTarget: self Label)].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;^0!<br>
<br>
Item was added:<br>
+ ----- Method: StackToRegisterMappingCogit&gt;&gt;genSmallIntegerComparison:orDoubleComparison:invert: (in category 'primitive generators') -----<br>
+ genSmallIntegerComparison: jumpOpcode orDoubleComparison: jumpFPOpcodeGenerator invert: invertComparison<br>
+&nbsp; &nbsp; &nbsp; &nbsp;"Stack looks like<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return address"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;| jumpDouble jumpNonInt jumpFail jumpTrue jumpCond |<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpFPOpcodeGenerator declareC: 'AbstractInstruction *(*jumpFPOpcodeGenerator)(void *)'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpDouble type: #'AbstractInstruction *'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpNonInt type: #'AbstractInstruction *'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpCond type: #'AbstractInstruction *'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpTrue type: #'AbstractInstruction *'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;&lt;var: #jumpFail type: #'AbstractInstruction *'&gt;<br>
+&nbsp; &nbsp; &nbsp; &nbsp;backEnd hasDoublePrecisionFloatingPointSupport ifFalse:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[^self genSmallIntegerComparison: jumpOpcode].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpDouble := objectRepresentation genJumpNotSmallInteger: Arg0Reg scratchReg: TempReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self CmpR: Arg0Reg R: ReceiverResultReg. "N.B. FLAGS := RRReg - Arg0Reg"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpTrue := self gen: jumpOpcode.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self genMoveFalseR: ReceiverResultReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self RetN: 0.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpTrue jmpTarget: (self genMoveTrueR: ReceiverResultReg).<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self RetN: 0.<br>
+<br>
+&nbsp; &nbsp; &nbsp; &nbsp;"Argument may be a Float : let us check or fail"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpDouble jmpTarget: self Label.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation smallIntegerIsOnlyImmediateType ifFalse:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[jumpNonInt := objectRepresentation genJumpImmediate: Arg0Reg].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genGetCompactClassIndexNonImmOf: Arg0Reg into: SendNumArgsReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genCmpClassFloatCompactIndexR: SendNumArgsReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpFail := self JumpNonZero: 0.<br>
+<br>
+&nbsp; &nbsp; &nbsp; &nbsp;"It was a Float, so convert the receiver to double and perform the operation"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genConvertSmallIntegerToIntegerInReg: ReceiverResultReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self ConvertR: ReceiverResultReg Rd: DPFPReg0.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation genGetDoubleValueOf: Arg0Reg into: DPFPReg1.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;invertComparison "May need to invert for NaNs"<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue: [self CmpRd: DPFPReg0 Rd: DPFPReg1]<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse: [self CmpRd: DPFPReg1 Rd: DPFPReg0].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpCond := self perform: jumpFPOpcodeGenerator with: 0. "FP jumps are a little weird"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self genMoveFalseR: ReceiverResultReg.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self RetN: 0.<br>
+&nbsp; &nbsp; &nbsp; &nbsp;jumpCond jmpTarget: (self genMoveTrueR: ReceiverResultReg).<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self RetN: 0.<br>
+<br>
+&nbsp; &nbsp; &nbsp; &nbsp;objectRepresentation smallIntegerIsOnlyImmediateType<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue: [jumpFail jmpTarget: self Label]<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse: [jumpNonInt jmpTarget: (jumpFail jmpTarget: self Label)].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;^0!<br>
<br>
</blockquote></div><br></div></div>
</div></blockquote></body></html>