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

Method genCode

src/hx/cppia/Cppia.cpp:6107–6133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6105 }
6106 #ifdef CPPIA_JIT
6107 void genCode(CppiaCompiler *compiler, const JitVal &inDest, ExprType destType) HXCPP_OVERRIDE
6108 {
6109 LabelId oldCont = compiler->setContinuePos( compiler->addLabel() );
6110 QuickVec<JumpId> oldBreaks;
6111 compiler->swapBreakList(oldBreaks);
6112
6113 JumpId skipCondition;
6114 if (!isWhileDo)
6115 skipCondition = compiler->jump();
6116
6117 JumpId start = condition->genCompare(compiler,true);
6118
6119 if (!isWhileDo)
6120 compiler->comeFrom(skipCondition);
6121
6122 LabelId body = compiler->addLabel();
6123
6124 loop->genCode(compiler, JitVal(), etVoid);
6125
6126 condition->genCompare(compiler,false,body);
6127
6128 compiler->comeFrom(start);
6129 compiler->setBreakTarget();
6130
6131 compiler->setContinuePos(oldCont);
6132 compiler->swapBreakList(oldBreaks);
6133 }
6134 #endif
6135};
6136

Callers

nothing calls this directly

Calls 8

JitValClass · 0.85
setContinuePosMethod · 0.80
swapBreakListMethod · 0.80
jumpMethod · 0.80
comeFromMethod · 0.80
setBreakTargetMethod · 0.80
genCompareMethod · 0.45
genCodeMethod · 0.45

Tested by

no test coverage detected