Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-nice.2545.mcz ==================== Summary ==================== Name: VMMaker.oscog-nice.2545 Author: nice Time: 29 August 2019, 12:16:41.796378 am UUID: 2e02d870-d945-48f6-bafa-65845194dbc7 Ancestors: VMMaker.oscog-nice.2544 Also honour getPrimitiveDoMixedArithmetic for (SmallInteger compareOp: Float) primitives Note: i could have hacked #genSmallIntegerComparison:orDoubleComparison:invert: and test if primitiveDoMixedArithmetic there... But I prefer to see the switch at top level rather than burried... =============== Diff against VMMaker.oscog-nice.2544 =============== Item was changed: ----- Method: CogObjectRepresentation>>genPrimitiveEqual (in category 'primitive generators') ----- genPrimitiveEqual + ^self getPrimitiveDoMixedArithmetic + ifTrue: [self + genSmallIntegerComparison: JumpZero + orDoubleComparison: #JumpFPEqual: + invert: false] + ifFalse: [self genSmallIntegerComparison: JumpZero]! - ^self - genSmallIntegerComparison: JumpZero - orDoubleComparison: #JumpFPEqual: - invert: false! Item was changed: ----- Method: CogObjectRepresentation>>genPrimitiveGreaterOrEqual (in category 'primitive generators') ----- genPrimitiveGreaterOrEqual + ^self getPrimitiveDoMixedArithmetic + ifTrue: [self + genSmallIntegerComparison: JumpGreaterOrEqual + orDoubleComparison: #JumpFPGreaterOrEqual: + invert: false] + ifFalse: [self genSmallIntegerComparison: JumpGreaterOrEqual]! - ^self - genSmallIntegerComparison: JumpGreaterOrEqual - orDoubleComparison: #JumpFPGreaterOrEqual: - invert: false! Item was changed: ----- Method: CogObjectRepresentation>>genPrimitiveGreaterThan (in category 'primitive generators') ----- genPrimitiveGreaterThan + ^self getPrimitiveDoMixedArithmetic + ifTrue: [self + genSmallIntegerComparison: JumpGreater + orDoubleComparison: #JumpFPGreater: + invert: false] + ifFalse: [self genSmallIntegerComparison: JumpGreater]! - ^self - genSmallIntegerComparison: JumpGreater - orDoubleComparison: #JumpFPGreater: - invert: false! Item was changed: ----- Method: CogObjectRepresentation>>genPrimitiveLessOrEqual (in category 'primitive generators') ----- genPrimitiveLessOrEqual + ^self getPrimitiveDoMixedArithmetic + ifTrue: [self + genSmallIntegerComparison: JumpLessOrEqual + orDoubleComparison: #JumpFPGreaterOrEqual: + invert: false] + ifFalse: [self genSmallIntegerComparison: JumpLessOrEqual]! - ^self - genSmallIntegerComparison: JumpLessOrEqual - orDoubleComparison: #JumpFPGreaterOrEqual: - invert: true! Item was changed: ----- Method: CogObjectRepresentation>>genPrimitiveLessThan (in category 'primitive generators') ----- genPrimitiveLessThan + ^self getPrimitiveDoMixedArithmetic + ifTrue: [self + genSmallIntegerComparison: JumpLess + orDoubleComparison: #JumpFPGreater: + invert: true] + ifFalse: [self genSmallIntegerComparison: JumpLess]! - ^self - genSmallIntegerComparison: JumpLess - orDoubleComparison: #JumpFPGreater: - invert: true! Item was changed: ----- Method: CogObjectRepresentation>>genPrimitiveNotEqual (in category 'primitive generators') ----- genPrimitiveNotEqual + ^self getPrimitiveDoMixedArithmetic + ifTrue: [self + genSmallIntegerComparison: JumpNonZero + orDoubleComparison: #JumpFPNotEqual: + invert: false] + ifFalse: [self genSmallIntegerComparison: JumpNonZero]! - ^self - genSmallIntegerComparison: JumpNonZero - orDoubleComparison: #JumpFPNotEqual: - invert: false! |
Free forum by Nabble | Edit this page |