Jacek Caban : jscript: Moved instr_off from statement_t to source_elements_t.
Alexandre Julliard
julliard at winehq.org
Thu Dec 29 12:15:45 CST 2011
Module: wine
Branch: master
Commit: ee6e6986fb8d93632ba02c63f3f2015cd125c048
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ee6e6986fb8d93632ba02c63f3f2015cd125c048
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Dec 29 11:09:29 2011 +0100
jscript: Moved instr_off from statement_t to source_elements_t.
---
dlls/jscript/engine.c | 6 +++---
dlls/jscript/engine.h | 2 +-
dlls/jscript/parser.y | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 1cd96a7..9a4ac64 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -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;
diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h
index c984ade..530a65a 100644
--- a/dlls/jscript/engine.h
+++ b/dlls/jscript/engine.h
@@ -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 {
diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y
index a3fe42a..c45fb6e 100644
--- a/dlls/jscript/parser.y
+++ b/dlls/jscript/parser.y
@@ -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;
}
More information about the wine-cvs
mailing list