vbscript: Support non-member calls in compiler.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c3dde3bd3d
commit
25248362ea
|
@ -453,17 +453,22 @@ static HRESULT compile_member_expression(compile_ctx_t *ctx, member_expression_t
|
|||
static HRESULT compile_call_expression(compile_ctx_t *ctx, call_expression_t *expr, BOOL ret_val)
|
||||
{
|
||||
unsigned arg_cnt = 0;
|
||||
expression_t *call;
|
||||
HRESULT hres;
|
||||
|
||||
hres = compile_args(ctx, expr->args, &arg_cnt);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
if(expr->call_expr->type == EXPR_MEMBER)
|
||||
return compile_member_expression(ctx, (member_expression_t*)expr->call_expr, arg_cnt, ret_val);
|
||||
call = expr->call_expr;
|
||||
if(call->type == EXPR_MEMBER)
|
||||
return compile_member_expression(ctx, (member_expression_t*)call, arg_cnt, ret_val);
|
||||
|
||||
FIXME("non-member call expression\n");
|
||||
return E_NOTIMPL;
|
||||
hres = compile_expression(ctx, call);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
return push_instr_uint(ctx, ret_val ? OP_vcall : OP_vcallv, arg_cnt);
|
||||
}
|
||||
|
||||
static HRESULT compile_unary_expression(compile_ctx_t *ctx, unary_expression_t *expr, vbsop_t op)
|
||||
|
|
|
@ -635,6 +635,18 @@ static HRESULT interp_icallv(exec_ctx_t *ctx)
|
|||
return do_icall(ctx, NULL);
|
||||
}
|
||||
|
||||
static HRESULT interp_vcall(exec_ctx_t *ctx)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT interp_vcallv(exec_ctx_t *ctx)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT do_mcall(exec_ctx_t *ctx, VARIANT *res)
|
||||
{
|
||||
const BSTR identifier = ctx->instr->arg1.bstr;
|
||||
|
|
|
@ -220,7 +220,7 @@ typedef enum {
|
|||
X(assign_ident, 1, ARG_BSTR, ARG_UINT) \
|
||||
X(assign_member, 1, ARG_BSTR, ARG_UINT) \
|
||||
X(bool, 1, ARG_INT, 0) \
|
||||
X(catch, 1, ARG_ADDR, ARG_UINT) \
|
||||
X(catch, 1, ARG_ADDR, ARG_UINT) \
|
||||
X(case, 0, ARG_ADDR, 0) \
|
||||
X(concat, 1, 0, 0) \
|
||||
X(const, 1, ARG_BSTR, 0) \
|
||||
|
@ -271,6 +271,8 @@ typedef enum {
|
|||
X(string, 1, ARG_STR, 0) \
|
||||
X(sub, 1, 0, 0) \
|
||||
X(val, 1, 0, 0) \
|
||||
X(vcall, 1, ARG_UINT, 0) \
|
||||
X(vcallv, 1, ARG_UINT, 0) \
|
||||
X(xor, 1, 0, 0)
|
||||
|
||||
typedef enum {
|
||||
|
|
Loading…
Reference in New Issue