summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-01-20 04:26:20 (GMT)
committerGuido van Rossum <guido@python.org>1997-01-20 04:26:20 (GMT)
commit768360243aebbabebaf6baf50ac5659cb66474f9 (patch)
treebbb5c381315b6feb3a43632d0919069834e79081
parentf3e85a0356e679ed9ff8d13236ff8e9f77a9fd0b (diff)
downloadcpython-768360243aebbabebaf6baf50ac5659cb66474f9.zip
cpython-768360243aebbabebaf6baf50ac5659cb66474f9.tar.gz
cpython-768360243aebbabebaf6baf50ac5659cb66474f9.tar.bz2
Changes for frame object speedup:
- get fastlocals differently - call newframeobject() with fewer arguments - toss getowner(), which was unused anyway
-rw-r--r--Python/ceval.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index a959e34..ea71c97 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -403,17 +403,14 @@ eval_code2(co, globals, locals,
current_frame, /*back*/
co, /*code*/
globals, /*globals*/
- locals, /*locals*/
- owner, /*owner*/
- co->co_stacksize, /*nvalues*/
- CO_MAXBLOCKS); /*nblocks*/
+ locals); /*locals*/
if (f == NULL)
return NULL;
current_frame = f;
if (co->co_nlocals > 0)
- fastlocals = ((listobject *)f->f_fastlocals)->ob_item;
+ fastlocals = f->f_localsplus;
if (co->co_argcount > 0 ||
co->co_flags & (CO_VARARGS | CO_VARKEYWORDS)) {
@@ -2130,15 +2127,6 @@ getglobals()
}
object *
-getowner()
-{
- if (current_frame == NULL)
- return NULL;
- else
- return current_frame->f_owner;
-}
-
-object *
getframe()
{
return (object *)current_frame;