| 614 | } |
| 615 | |
| 616 | int VMCallWithDefaults(VMFunction *func, TArray<VMValue> ¶ms, VMReturn *results, int numresults/*, VMException **trap = NULL*/) |
| 617 | { |
| 618 | if (func->DefaultArgs.Size() > params.Size()) |
| 619 | { |
| 620 | auto oldp = params.Size(); |
| 621 | params.Resize(func->DefaultArgs.Size()); |
| 622 | for (unsigned i = oldp; i < params.Size(); i++) |
| 623 | { |
| 624 | params[i] = func->DefaultArgs[i]; |
| 625 | } |
| 626 | } |
| 627 | return VMCall(func, params.Data(), params.Size(), results, numresults); |
| 628 | } |
| 629 | |
| 630 | |
| 631 | // Exception stuff for the VM is intentionally placed there, because having this in vmexec.cpp would subject it to inlining |
no test coverage detected