mirror of
https://github.com/python/cpython.git
synced 2025-09-01 22:47:59 +00:00
Changes to speed up local variables enormously, by avoiding dictionary
lookup (opcode.h, ceval.[ch], compile.c, frameobject.[ch], pythonrun.c, import.c). The .pyc MAGIC number is changed again. Added get_menu_text to flmodule.
This commit is contained in:
parent
0023078a0b
commit
8b17d6bd89
9 changed files with 245 additions and 71 deletions
|
@ -304,16 +304,23 @@ run_node(n, filename, globals, locals)
|
|||
char *filename;
|
||||
/*dict*/object *globals, *locals;
|
||||
{
|
||||
object *res;
|
||||
int needmerge = 0;
|
||||
if (globals == NULL) {
|
||||
globals = getglobals();
|
||||
if (locals == NULL)
|
||||
if (locals == NULL) {
|
||||
locals = getlocals();
|
||||
needmerge = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (locals == NULL)
|
||||
locals = globals;
|
||||
}
|
||||
return eval_node(n, filename, globals, locals);
|
||||
res = eval_node(n, filename, globals, locals);
|
||||
if (needmerge)
|
||||
mergelocals();
|
||||
return res;
|
||||
}
|
||||
|
||||
object *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue