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:
Guido van Rossum 1993-03-30 13:18:41 +00:00
parent 0023078a0b
commit 8b17d6bd89
9 changed files with 245 additions and 71 deletions

View file

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