[pypy-svn] r56360 - in pypy/dist/pypy: interpreter module/_pickle_support

cfbolz at codespeak.net cfbolz at codespeak.net
Mon Jul 7 20:54:46 CEST 2008


Author: cfbolz
Date: Mon Jul  7 20:54:45 2008
New Revision: 56360

Modified:
   pypy/dist/pypy/interpreter/pycompiler.py
   pypy/dist/pypy/interpreter/pyframe.py
   pypy/dist/pypy/module/_pickle_support/maker.py
Log:
OK, things cleared up: At one point there were different frame classes and it
was necessary to instantiate the right one, based one the code object. Since
there is only one frame class at the moment, this argument can actually go away.


Modified: pypy/dist/pypy/interpreter/pycompiler.py
==============================================================================
--- pypy/dist/pypy/interpreter/pycompiler.py	(original)
+++ pypy/dist/pypy/interpreter/pycompiler.py	Mon Jul  7 20:54:45 2008
@@ -227,7 +227,7 @@
         self.compiler_flags = self.futureFlags.allowed_flags
 
     def compile(self, source, filename, mode, flags):
-        from pyparser.error import SyntaxError
+        from pypy.interpreter.pyparser.error import SyntaxError
         from pypy.interpreter import astcompiler
         from pypy.interpreter.astcompiler.pycodegen import ModuleCodeGenerator
         from pypy.interpreter.astcompiler.pycodegen import InteractiveCodeGenerator

Modified: pypy/dist/pypy/interpreter/pyframe.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyframe.py	(original)
+++ pypy/dist/pypy/interpreter/pyframe.py	Mon Jul  7 20:54:45 2008
@@ -255,10 +255,6 @@
         
         w_blockstack = nt([block._get_state_(space) for block in self.blockstack])
         w_fastlocals = maker.slp_into_tuple_with_nulls(space, self.fastlocals_w)
-        tup_base = [
-            w(self.pycode),
-            ]
-
         if self.last_exception is None:
             w_exc_value = space.w_None
             w_tb = space.w_None
@@ -290,7 +286,7 @@
             w_cells,
             ]
 
-        return nt([new_inst, nt(tup_base), nt(tup_state)])
+        return nt([new_inst, nt([]), nt(tup_state)])
 
     def descr__setstate__(self, space, w_args):
         from pypy.module._pickle_support import maker # helper fns

Modified: pypy/dist/pypy/module/_pickle_support/maker.py
==============================================================================
--- pypy/dist/pypy/module/_pickle_support/maker.py	(original)
+++ pypy/dist/pypy/module/_pickle_support/maker.py	Mon Jul  7 20:54:45 2008
@@ -55,15 +55,11 @@
     w_len = space.len(w_seq)
     index = space.int_w(w_index) - space.int_w(w_len)
     return W_ReverseSeqIterObject(space, w_seq, index)
-def frame_new(space, __args__):
-    args_w, kwds_w = __args__.unpack()
-    w_pycode, = args_w
-    pycode = space.interp_w(PyCode, w_pycode)
-    w = space.wrap
-    # XXX I don't get this? why isn't pycode actually used for anything?
+
+def frame_new(space):
     new_frame = instantiate(space.FrameClass)   # XXX fish
     return space.wrap(new_frame)
-frame_new.unwrap_spec = [ObjSpace, Arguments]
+frame_new.unwrap_spec = [ObjSpace]
 
 def traceback_new(space):
     tb = instantiate(PyTraceback)



More information about the Pypy-commit mailing list