- Added the TAIL instruction to perform a CALL and a RET in the same instruction. The called

function will pass its results directly to this function's caller. Eventually, this should
  be changed to do a proper tail call for scripted functions.

SVN r3769 (scripting)
This commit is contained in:
Randy Heit 2012-07-17 04:06:28 +00:00
commit e1a2f3b546
5 changed files with 58 additions and 9 deletions

View file

@ -430,7 +430,7 @@ size_t VMFunctionBuilder::Emit(int opcode, int opa, int opb, int opc)
{
ParamChange(1);
}
else if (opcode == OP_CALL || opcode == OP_CALL_K)
else if (opcode == OP_CALL || opcode == OP_CALL_K || opcode == OP_TAIL || opcode == OP_TAIL_K)
{
ParamChange(-opb);
}