VM Maker Inbox: VMMaker.oscog-nice.2545.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker Inbox: VMMaker.oscog-nice.2545.mcz

commits-2
 
Nicolas Cellier uploaded a new version of VMMaker to project VM Maker Inbox:
http://source.squeak.org/VMMakerInbox/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!