- removed OP_TAIL.

The amount of support code for this minor optimization was quite large and this stood in the way of streamlining the VM's calling convention, so it was preferable to remove it before moving on.
This commit is contained in:
Christoph Oelckers 2018-11-18 07:43:03 +01:00
commit 629d329f22
9 changed files with 12 additions and 219 deletions

View file

@ -784,7 +784,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_TAIL_K, buildit.GetConstantAddress(sym->Variants[0].Implementation), count, 0);
buildit.Emit(OP_CALL_K, buildit.GetConstantAddress(sym->Variants[0].Implementation), count, 0);
buildit.Emit(OP_RET, RET_FINAL, REGT_NIL, 0);
// Attach it to the state.
VMScriptFunction *sfunc = new VMScriptFunction;
buildit.MakeFunction(sfunc);