jscript: Moved instr_off from statement_t to source_elements_t.

This commit is contained in:
Jacek Caban 2011-12-29 11:09:29 +01:00 committed by Alexandre Julliard
parent b3907c40f7
commit ee6e6986fb
3 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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 {

View File

@ -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;
}