diff options
author | Guido van Rossum <guido@python.org> | 1997-01-20 04:16:40 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-01-20 04:16:40 (GMT) |
commit | cdf578ebaf53ece3a639e3042c7e122774262aa7 (patch) | |
tree | 1989e0242c8d6487ea469ed49fc03e1c339a7643 | |
parent | 7eb883a18e2260c73fd08073b640eac07c6788c7 (diff) | |
download | cpython-cdf578ebaf53ece3a639e3042c7e122774262aa7.zip cpython-cdf578ebaf53ece3a639e3042c7e122774262aa7.tar.gz cpython-cdf578ebaf53ece3a639e3042c7e122774262aa7.tar.bz2 |
New lay-out of frame object, for fewer mallocs.
See frameobject.c checkin message.
-rw-r--r-- | Include/frameobject.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Include/frameobject.h b/Include/frameobject.h index 85c1f4c..22cc23c 100644 --- a/Include/frameobject.h +++ b/Include/frameobject.h @@ -50,18 +50,17 @@ typedef struct _frame { PyObject *f_builtins; /* builtin symbol table (PyDictObject) */ PyObject *f_globals; /* global symbol table (PyDictObject) */ PyObject *f_locals; /* local symbol table (PyDictObject) */ - PyObject *f_owner; /* owner (e.g. class or module) or NULL */ - PyObject *f_fastlocals; /* fast local variables (PyListObject) */ - PyObject **f_valuestack; /* malloc'ed array */ - PyTryBlock *f_blockstack; /* malloc'ed array */ - int f_nvalues; /* size of f_valuestack */ - int f_nblocks; /* size of f_blockstack */ - int f_iblock; /* index in f_blockstack */ + PyObject **f_valuestack; /* points after the last local */ + PyObject *f_trace; /* Trace function */ int f_lasti; /* Last instruction if called */ int f_lineno; /* Current line number */ int f_restricted; /* Flag set if restricted operations in this scope */ - PyObject *f_trace; /* Trace function */ + int f_iblock; /* index in f_blockstack */ + PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */ + int f_nlocals; /* number of locals */ + int f_stacksize; /* size of value stack */ + PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */ } PyFrameObject; @@ -73,7 +72,7 @@ extern DL_IMPORT(PyTypeObject) PyFrame_Type; PyFrameObject * PyFrame_New Py_PROTO((PyFrameObject *, PyCodeObject *, - PyObject *, PyObject *, PyObject *, int, int)); + PyObject *, PyObject *)); /* The rest of the interface is specific for frame objects */ |