| 633 | |
| 634 | #ifdef CPPIA_JIT |
| 635 | JumpId genCompare(CppiaCompiler *compiler,bool inReverse,LabelId inLabel) HXCPP_OVERRIDE |
| 636 | { |
| 637 | if (condition->getType()==etString) |
| 638 | { |
| 639 | JitTemp val(compiler,jtString); |
| 640 | condition->genCode(compiler, val, etString); |
| 641 | return compiler->compare(inReverse ? cmpP_EQUAL : cmpP_NOT_EQUAL, val.as(jtPointer) + StringOffset::Ptr, (void *)0, inLabel); |
| 642 | } |
| 643 | else |
| 644 | { |
| 645 | condition->genCode(compiler, sJitTemp0, etObject); |
| 646 | // inReverse = false -> jump if not 0 |
| 647 | // inReverse = true -> jump if zero |
| 648 | return compiler->compare(inReverse ? cmpP_EQUAL : cmpP_NOT_EQUAL, sJitTemp0.as(jtPointer), (void *)0, inLabel); |
| 649 | } |
| 650 | } |
| 651 | #endif |
| 652 | |
| 653 | }; |