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

Function genFunctionCall

src/hx/cppia/Cppia.cpp:692–721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

690}
691
692void genFunctionCall(ScriptCallable *function, CppiaCompiler *compiler,
693 const JitVal &inDest, ExprType destType, bool isBoolReturn, ExprType returnType,
694 CppiaExpr *thisExpr, Expressions &args, const JitVal &inThisVal )
695{
696 int framePos = compiler->getCurrentFrameSize();
697
698 // Push args...
699 function->genArgs(compiler,thisExpr,args, inThisVal);
700
701 compiler->restoreFrameSize(framePos);
702
703 // Store new frame in context ...
704 compiler->add( sJitCtxFrame, sJitFrame, JitVal(framePos) );
705
706 // Compiled yet
707 if (function->compiled)
708 {
709 compiler->call( JitVal( (void *)(function->compiled)), sJitCtx );
710 }
711 else
712 {
713 // Compiled later
714 compiler->move( sJitTemp1, JitVal((void *)&function->compiled) );
715 compiler->call( sJitTemp1.star(), sJitCtx );
716 }
717 compiler->setMaxPointer();
718
719 genFunctionResult(compiler, inDest, destType, returnType, isBoolReturn);
720
721}
722#endif
723
724

Callers 2

genCodeMethod · 0.85
genCodeMethod · 0.85

Calls 10

JitValClass · 0.85
genFunctionResultFunction · 0.85
getCurrentFrameSizeMethod · 0.80
genArgsMethod · 0.80
restoreFrameSizeMethod · 0.80
moveMethod · 0.80
setMaxPointerMethod · 0.80
addMethod · 0.45
callMethod · 0.45
starMethod · 0.45

Tested by

no test coverage detected