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
rt.type = RT_NORMAL;
if(source->statement) {
if(source->statement->instr_off == -1)
hres = compile_subscript_stat(ctx->parser, source->statement, &source->statement->instr_off);
if(source->instr_off == -1)
hres = compile_subscript_stat(ctx->parser, source->statement, &source->instr_off);
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;
......
......@@ -320,7 +320,6 @@ typedef enum {
struct _statement_t {
statement_type_t type;
statement_eval_t eval;
unsigned instr_off;
statement_t *next;
};
......@@ -508,6 +507,7 @@ struct _source_elements_t {
statement_t *statement_tail;
function_declaration_t *functions;
var_list_t *variables;
unsigned instr_off;
};
struct _function_expression_t {
......
......@@ -845,7 +845,6 @@ static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size
stat->type = type;
stat->eval = NULL;
stat->instr_off = -1;
stat->next = NULL;
return stat;
......@@ -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));
memset(ret, 0, sizeof(*ret));
ret->instr_off = -1;
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