[pypy-svn] r72012 - pypy/branch/faster-compilation/pypy/interpreter

fijal at codespeak.net fijal at codespeak.net
Wed Mar 10 01:33:52 CET 2010


Author: fijal
Date: Wed Mar 10 01:33:51 2010
New Revision: 72012

Modified:
   pypy/branch/faster-compilation/pypy/interpreter/nestedscope.py
   pypy/branch/faster-compilation/pypy/interpreter/pyframe.py
   pypy/branch/faster-compilation/pypy/interpreter/pyopcode.py
Log:
Don't store metaclass on pyframe, but instead on __extend__, allows
us to have version tags on frames


Modified: pypy/branch/faster-compilation/pypy/interpreter/nestedscope.py
==============================================================================
--- pypy/branch/faster-compilation/pypy/interpreter/nestedscope.py	(original)
+++ pypy/branch/faster-compilation/pypy/interpreter/nestedscope.py	Wed Mar 10 01:33:51 2010
@@ -4,6 +4,7 @@
 from pypy.interpreter.mixedmodule import MixedModule
 from pypy.rlib import jit
 from pypy.tool.uid import uid
+from pypy.tool.pairtype import extendabletype
 
 class Cell(Wrappable):
     "A simple container for a wrapped value."
@@ -75,6 +76,8 @@
     """This class enhances a standard frame with nested scope abilities,
     i.e. handling of cell/free variables."""
 
+    __metaclass__ = extendabletype
+
     # Cell Vars:
     #     my local variables that are exposed to my inner functions
     # Free Vars:

Modified: pypy/branch/faster-compilation/pypy/interpreter/pyframe.py
==============================================================================
--- pypy/branch/faster-compilation/pypy/interpreter/pyframe.py	(original)
+++ pypy/branch/faster-compilation/pypy/interpreter/pyframe.py	Wed Mar 10 01:33:51 2010
@@ -1,7 +1,6 @@
 """ PyFrame class implementation with the interpreter main loop.
 """
 
-from pypy.tool.pairtype import extendabletype
 from pypy.interpreter import eval, baseobjspace, pycode
 from pypy.interpreter.argument import Arguments
 from pypy.interpreter.error import OperationError, operationerrfmt
@@ -35,8 +34,6 @@
      * 'valuestack_w', 'blockstack', control the interpretation
     """
 
-    __metaclass__ = extendabletype
-
     frame_finished_execution = False
     last_instr               = -1
     last_exception           = None

Modified: pypy/branch/faster-compilation/pypy/interpreter/pyopcode.py
==============================================================================
--- pypy/branch/faster-compilation/pypy/interpreter/pyopcode.py	(original)
+++ pypy/branch/faster-compilation/pypy/interpreter/pyopcode.py	Wed Mar 10 01:33:51 2010
@@ -18,6 +18,7 @@
 from pypy.tool.stdlib_opcode import unrolling_opcode_descs
 from pypy.tool.stdlib_opcode import opcode_method_names
 from pypy.rlib.unroll import unrolling_iterable
+from pypy.tool.pairtype import extendabletype
 
 def unaryoperation(operationname):
     """NOT_RPYTHON"""
@@ -66,6 +67,7 @@
     
     # for logbytecode:
     last_opcode = -1
+    __metaclass__ = extendabletype
     
     ### opcode dispatch ###
 



More information about the Pypy-commit mailing list