MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / genCompare

Method genCompare

src/hx/cppia/Cppia.cpp:635–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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};

Callers

nothing calls this directly

Calls 4

asMethod · 0.80
getTypeMethod · 0.45
genCodeMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected