Commit ee6e6986 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Moved instr_off from statement_t to source_elements_t.

parent b3907c40
...@@ -2755,10 +2755,10 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so ...@@ -2755,10 +2755,10 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so
rt.type = RT_NORMAL; rt.type = RT_NORMAL;
if(source->statement) { if(source->statement) {
if(source->statement->instr_off == -1) if(source->instr_off == -1)
hres = compile_subscript_stat(ctx->parser, source->statement, &source->statement->instr_off); hres = compile_subscript_stat(ctx->parser, source->statement, &source->instr_off);
if(SUCCEEDED(hres)) if(SUCCEEDED(hres))
hres = enter_bytecode(script, source->statement->instr_off, &rt, &val); hres = enter_bytecode(script, source->instr_off, &rt, &val);
} }
script->exec_ctx = prev_ctx; script->exec_ctx = prev_ctx;
......
...@@ -320,7 +320,6 @@ typedef enum { ...@@ -320,7 +320,6 @@ typedef enum {
struct _statement_t { struct _statement_t {
statement_type_t type; statement_type_t type;
statement_eval_t eval; statement_eval_t eval;
unsigned instr_off;
statement_t *next; statement_t *next;
}; };
...@@ -508,6 +507,7 @@ struct _source_elements_t { ...@@ -508,6 +507,7 @@ struct _source_elements_t {
statement_t *statement_tail; statement_t *statement_tail;
function_declaration_t *functions; function_declaration_t *functions;
var_list_t *variables; var_list_t *variables;
unsigned instr_off;
}; };
struct _function_expression_t { struct _function_expression_t {
......
...@@ -845,7 +845,6 @@ static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size ...@@ -845,7 +845,6 @@ static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size
stat->type = type; stat->type = type;
stat->eval = NULL; stat->eval = NULL;
stat->instr_off = -1;
stat->next = NULL; stat->next = NULL;
return stat; return stat;
...@@ -1472,6 +1471,7 @@ static source_elements_t *new_source_elements(parser_ctx_t *ctx) ...@@ -1472,6 +1471,7 @@ static source_elements_t *new_source_elements(parser_ctx_t *ctx)
source_elements_t *ret = parser_alloc(ctx, sizeof(source_elements_t)); source_elements_t *ret = parser_alloc(ctx, sizeof(source_elements_t));
memset(ret, 0, sizeof(*ret)); memset(ret, 0, sizeof(*ret));
ret->instr_off = -1;
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment