| 593 | |
| 594 | #ifdef CPPIA_JIT |
| 595 | JumpId genCompare(CppiaCompiler *compiler,bool inReverse,LabelId inLabel) HXCPP_OVERRIDE |
| 596 | { |
| 597 | if (condition->getType()==etString) |
| 598 | { |
| 599 | JitTemp val(compiler,jtString); |
| 600 | condition->genCode(compiler, val, etString); |
| 601 | return compiler->compare(inReverse ? cmpP_NOT_EQUAL : cmpP_EQUAL, val.as(jtPointer) + StringOffset::Ptr, (void *)0, inLabel); |
| 602 | } |
| 603 | else |
| 604 | { |
| 605 | condition->genCode(compiler, sJitTemp0, etObject); |
| 606 | // inReverse = false -> jump if not 0 |
| 607 | // inReverse = true -> jump if zero |
| 608 | return compiler->compare(inReverse ? cmpP_NOT_EQUAL : cmpP_EQUAL, sJitTemp0.as(jtPointer), (void *)0, inLabel); |
| 609 | } |
| 610 | } |
| 611 | #endif |
| 612 | |
| 613 | }; |