- 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:
parent
629d329f22
commit
cbedcff559
4 changed files with 58 additions and 58 deletions
|
|
@ -1038,3 +1038,16 @@ int EmitterArray::EmitParameters(VMFunctionBuilder *build)
|
|||
assert(paramcount == numparams);
|
||||
return paramcount;
|
||||
}
|
||||
|
||||
|
||||
ExpEmit EmitterArray::EmitCall(VMFunctionBuilder *build)
|
||||
{
|
||||
int count = EmitParameters(build);
|
||||
build->Emit(OP_CALL_K, build->GetConstantAddress(target), count, returns.Size());
|
||||
if (returns.Size() == 0) return ExpEmit();
|
||||
|
||||
ExpEmit out(build, returns[0]);
|
||||
build->Emit(OP_RESULT, 0, returns[0], out.RegNum);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue