mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Use dmore dict2lookup.
This commit is contained in:
parent
670690e2aa
commit
831632507a
1 changed files with 6 additions and 3 deletions
|
@ -1950,10 +1950,13 @@ optimizer(co)
|
|||
oparg = NEXTARG();
|
||||
if (opcode == LOAD_NAME) {
|
||||
name = GETNAMEOBJ(oparg);
|
||||
if (dictlookup(locals, getstringvalue(name)) != NULL)
|
||||
if (dict2lookup(locals, name) != NULL)
|
||||
*cur_instr = LOAD_LOCAL;
|
||||
else if (!star_used)
|
||||
*cur_instr = LOAD_GLOBAL;
|
||||
else {
|
||||
err_clear();
|
||||
if (!star_used)
|
||||
*cur_instr = LOAD_GLOBAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue