| 827 | // |
| 828 | |
| 829 | ResultType Object::CallAsMethod(ExprTokenType &aFunc, ResultToken &aResultToken, ExprTokenType &aThisToken, ExprTokenType *aParam[], int aParamCount) |
| 830 | { |
| 831 | auto func = TokenToObject(aFunc); |
| 832 | if (!func) |
| 833 | func = ValueBase(aFunc); |
| 834 | ExprTokenType **param = (ExprTokenType **)_malloca((aParamCount + 1) * sizeof(ExprTokenType *)); |
| 835 | if (!param) |
| 836 | _o_throw_oom; |
| 837 | param[0] = &aThisToken; |
| 838 | memcpy(param + 1, aParam, aParamCount * sizeof(ExprTokenType *)); |
| 839 | // return %func%(this, aParam*) |
| 840 | auto invoke_result = func->Invoke(aResultToken, IT_CALL, nullptr, aFunc, param, aParamCount + 1); |
| 841 | _freea(param); |
| 842 | return invoke_result; |
| 843 | } |
| 844 | |
| 845 | ResultType Object::CallMeta(LPTSTR aName, ResultToken &aResultToken, ExprTokenType &aThisToken, ExprTokenType *aParam[], int aParamCount) |
| 846 | { |
nothing calls this directly
no test coverage detected