| 853 | } |
| 854 | |
| 855 | ResultType Object::CallMetaVarg(int aFlags, LPTSTR aName, ResultToken &aResultToken, ExprTokenType &aThisToken, ExprTokenType *aParam[], int aParamCount) |
| 856 | { |
| 857 | auto func = GetMethod(sMetaFuncName[INVOKE_TYPE]); |
| 858 | if (!func) |
| 859 | return INVOKE_NOT_HANDLED; |
| 860 | auto vargs = Array::Create(aParam, aParamCount); |
| 861 | if (!vargs) |
| 862 | _o_throw_oom; |
| 863 | ExprTokenType name_token(aName), args_token(vargs), *param[4]; |
| 864 | param[0] = &aThisToken; // this |
| 865 | param[1] = &name_token; // name |
| 866 | param[2] = &args_token; // args |
| 867 | int param_count = 3; |
| 868 | if (IS_INVOKE_SET) |
| 869 | param[param_count++] = aParam[aParamCount]; // value |
| 870 | // return %func%(this, name, args [, value]) |
| 871 | ResultType aResult = func->Invoke(aResultToken, IT_CALL, nullptr, ExprTokenType(func), param, param_count); |
| 872 | vargs->Release(); |
| 873 | return aResult; |
| 874 | } |
| 875 | |
| 876 | |
| 877 | // |
nothing calls this directly
no test coverage detected