mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 23:02:16 +00:00
vbscript: Clean up lookup_identifier.
Be more explicit about what applies only to non-global code. Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
708c1e865d
commit
ae1291cbe0
|
@ -109,6 +109,7 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
if(ctx->func->type != FUNC_GLOBAL) {
|
||||
for(i=0; i < ctx->func->var_cnt; i++) {
|
||||
if(!wcsicmp(ctx->func->vars[i].name, name)) {
|
||||
ref->type = REF_VAR;
|
||||
|
@ -125,10 +126,9 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
|
|||
}
|
||||
}
|
||||
|
||||
if(lookup_dynamic_vars(ctx->func->type == FUNC_GLOBAL ? ctx->script->global_vars : ctx->dynamic_vars, name, ref))
|
||||
if(lookup_dynamic_vars(ctx->dynamic_vars, name, ref))
|
||||
return S_OK;
|
||||
|
||||
if(ctx->func->type != FUNC_GLOBAL) {
|
||||
if(ctx->vbthis) {
|
||||
/* FIXME: Bind such identifier while generating bytecode. */
|
||||
for(i=0; i < ctx->vbthis->desc->prop_cnt; i++) {
|
||||
|
@ -159,7 +159,7 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
|
|||
}
|
||||
}
|
||||
|
||||
if(ctx->func->type != FUNC_GLOBAL && lookup_dynamic_vars(ctx->script->global_vars, name, ref))
|
||||
if(lookup_dynamic_vars(ctx->script->global_vars, name, ref))
|
||||
return S_OK;
|
||||
|
||||
for(i = 0; i < ctx->script->global_funcs_cnt; i++) {
|
||||
|
|
Loading…
Reference in a new issue