| 690 | } |
| 691 | |
| 692 | void 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 |
no test coverage detected