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

Method genCode

src/hx/cppia/Cppia.cpp:3205–3228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3203
3204 #ifdef CPPIA_JIT
3205 void genCode(CppiaCompiler *compiler, const JitVal &inDest,ExprType destType) HXCPP_OVERRIDE
3206 {
3207 JitTemp functionObject(compiler, jtPointer);
3208 func->genCode(compiler, functionObject, etObject );
3209
3210 {
3211 AutoFramePos frame(compiler);
3212
3213 for(int a=0;a<args.size();a++)
3214 {
3215 args[a]->genCode(compiler, JitFramePos(compiler->getCurrentFrameSize(),etObject), etObject);
3216 compiler->addFrame(etObject);
3217 }
3218 // restore frame size
3219 }
3220
3221 compiler->add(sJitCtxFrame, sJitFrame, compiler->getCurrentFrameSize());
3222
3223 compiler->callNative((void *)callDynamic,sJitCtx,functionObject,JitVal( (int)args.size() ) );
3224
3225 compiler->checkException();
3226 if (destType!=etVoid)
3227 compiler->convertResult( etObject, inDest, destType );
3228 }
3229 #endif
3230};
3231

Callers

nothing calls this directly

Calls 10

JitFramePosClass · 0.85
JitValClass · 0.85
getCurrentFrameSizeMethod · 0.80
addFrameMethod · 0.80
callNativeMethod · 0.80
checkExceptionMethod · 0.80
convertResultMethod · 0.80
genCodeMethod · 0.45
sizeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected