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

Method genCompare

src/hx/cppia/Cppia.cpp:595–610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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