- moved all handling for the simple calls into EmitterArray to have it in one place only.

The main case of FxVmFunctionCall is not done yet, though.
This commit is contained in:
Christoph Oelckers 2018-11-18 08:29:41 +01:00
commit cbedcff559
4 changed files with 58 additions and 58 deletions

View file

@ -783,8 +783,8 @@ void SetDehParams(FState *state, int codepointer)
}
// Emit code for action parameters.
MBFCodePointerFactories[codepointer](emitters, value1, value2);
int count = emitters.EmitParameters(&buildit);
buildit.Emit(OP_CALL_K, buildit.GetConstantAddress(sym->Variants[0].Implementation), count, 0);
emitters.AddTarget(sym->Variants[0].Implementation);
emitters.EmitCall(&buildit);
buildit.Emit(OP_RET, RET_FINAL, REGT_NIL, 0);
// Attach it to the state.
VMScriptFunction *sfunc = new VMScriptFunction;