From 83e86588943d9ff8bf6aa976e6c0b00416d9bdf1 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 30 Dec 2011 11:20:43 +0100 Subject: [PATCH] jscript: Get rid of no longer needed interp_tree. --- dlls/jscript/compile.c | 1 - dlls/jscript/engine.c | 17 +---------------- dlls/jscript/engine.h | 8 +------- dlls/jscript/parser.y | 1 - 4 files changed, 2 insertions(+), 25 deletions(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 6d01db6e5f4..60b0c2ed2fc 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -81,7 +81,6 @@ static void dump_instr_arg(instr_arg_type_t type, instr_arg_t *arg) case ARG_DBL: TRACE_(jscript_disas)("\t%lf", *arg->dbl); break; - case ARG_STAT: case ARG_FUNC: case ARG_NONE: break; diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index dce9410dd37..2efa5ad7a4f 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -1,5 +1,5 @@ /* - * Copyright 2008 Jacek Caban for CodeWeavers + * Copyright 2008,2011 Jacek Caban for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -2439,21 +2439,6 @@ static HRESULT interp_ret(exec_ctx_t *ctx) return S_OK; } -static HRESULT interp_tree(exec_ctx_t *ctx) -{ - instr_t *instr = ctx->parser->code->instrs+ctx->ip; - VARIANT v; - HRESULT hres; - - TRACE("\n"); - - hres = instr->arg1.stat->eval(ctx->parser->script, instr->arg1.stat, ctx->rt, &v); - if(FAILED(hres)) - return hres; - - return stack_push(ctx, &v); -} - typedef HRESULT (*op_func_t)(exec_ctx_t*); static const op_func_t op_funcs[] = { diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 04d2698437f..fa681a512c4 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -1,5 +1,5 @@ /* - * Copyright 2008 Jacek Caban for CodeWeavers + * Copyright 2008,2011 Jacek Caban for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -106,7 +106,6 @@ typedef struct _func_stack { X(throw_ref, 0, ARG_UINT, 0) \ X(throw_type, 0, ARG_UINT, ARG_STR) \ X(tonum, 1, 0,0) \ - X(tree, 1, ARG_STAT, 0) \ X(typeof, 1, 0,0) \ X(typeofid, 1, 0,0) \ X(typeofident,1, 0,0) \ @@ -126,7 +125,6 @@ OP_LIST } jsop_t; typedef union { - statement_t *stat; BSTR bstr; double *dbl; LONG lng; @@ -140,7 +138,6 @@ typedef enum { ARG_ADDR, ARG_BSTR, ARG_DBL, - ARG_STAT, ARG_FUNC, ARG_INT, ARG_STR, @@ -296,8 +293,6 @@ typedef struct _variable_declaration_t { struct _variable_declaration_t *next; } variable_declaration_t; -typedef HRESULT (*statement_eval_t)(script_ctx_t*,statement_t*,return_type_t*,VARIANT*); - typedef enum { STAT_BLOCK, STAT_BREAK, @@ -319,7 +314,6 @@ typedef enum { struct _statement_t { statement_type_t type; - statement_eval_t eval; statement_t *next; }; diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index c45fb6e62a8..81ec9a221c1 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -844,7 +844,6 @@ static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size return NULL; stat->type = type; - stat->eval = NULL; stat->next = NULL; return stat;