[pypy-commit] pypy stm-gc: Goal: have a whole-program tracker that can propagate these hints.

arigo noreply at buildbot.pypy.org
Thu Feb 16 10:09:57 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stm-gc
Changeset: r52539:275aa34cf209
Date: 2012-02-16 09:18 +0100
http://bitbucket.org/pypy/pypy/changeset/275aa34cf209/

Log:	Goal: have a whole-program tracker that can propagate these hints.

diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -39,6 +39,10 @@
 
     __metaclass__ = extendabletype
 
+    _immutable_fields_ = ['pycode', 'locals_stack_w', 'cells']
+    # note: 'locals_stack_w' is immutable because it contains always the
+    # same list, but what the list itself contains changes
+
     frame_finished_execution = False
     last_instr               = -1
     last_exception           = None
@@ -147,6 +151,9 @@
         w_inputvalue is for generator.send()) and operr is for
         generator.throw()).
         """
+        self = hint(self, stm_write=True)
+        hint(self.locals_stack_w, stm_write=True)
+        hint(self.cells, stm_immutable=True)
         # the following 'assert' is an annotation hint: it hides from
         # the annotator all methods that are defined in PyFrame but
         # overridden in the {,Host}FrameClass subclasses of PyFrame.


More information about the pypy-commit mailing list