[pypy-commit] pypy default: document fields on pyframe
fijal
noreply at buildbot.pypy.org
Thu Apr 30 19:13:47 CEST 2015
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r76954:f726f9ee2155
Date: 2015-04-30 19:13 +0200
http://bitbucket.org/pypy/pypy/changeset/f726f9ee2155/
Log: document fields on pyframe
diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -49,14 +49,29 @@
last_instr = -1
last_exception = None
f_backref = jit.vref_None
+ # For tracing
w_f_trace = None
- # For tracing
instr_lb = 0
instr_ub = 0
instr_prev_plus_one = 0
+ # end of tracing
+
is_being_profiled = False
escaped = False # see mark_as_escaped()
+ w_globals = None
+ w_locals = None # dict containing locals, if forced or necessary
+ pycode = None # code object executed by that frame
+ locals_stack_w = None # the list of all locals and valuestack
+ valuestackdepth = -1 # number of items on valuestack
+ lastblock = None
+ builtin = None # builtin cache, only if honor__builtins__ is True,
+ # default to False
+ f_lineno = -1 # current lineno
+ cells = None # cells
+
+ # there is also self.space which is removed by the annotator
+
def __init__(self, space, code, w_globals, outer_func):
if not we_are_translated():
assert type(self) == space.FrameClass, (
@@ -65,11 +80,9 @@
assert isinstance(code, pycode.PyCode)
self.space = space
self.w_globals = w_globals
- self.w_locals = None
self.pycode = code
self.locals_stack_w = [None] * (code.co_nlocals + code.co_stacksize)
self.valuestackdepth = code.co_nlocals
- self.lastblock = None
make_sure_not_resized(self.locals_stack_w)
check_nonneg(self.valuestackdepth)
#
More information about the pypy-commit
mailing list