[pypy-svn] rev 1479 - in pypy/trunk/src/pypy: interpreter objspace/flowobjspace/flow/test

arigo at codespeak.net arigo at codespeak.net
Tue Sep 30 19:02:11 CEST 2003


Author: arigo
Date: Tue Sep 30 19:02:07 2003
New Revision: 1479

Modified:
   pypy/trunk/src/pypy/interpreter/pyframe.py
   pypy/trunk/src/pypy/objspace/flow/flowcontext.py
   pypy/trunk/src/pypy/objspace/flow/test/test_objspace.py
Log:
8 tests out of 8!


Modified: pypy/trunk/src/pypy/interpreter/pyframe.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/pyframe.py	(original)
+++ pypy/trunk/src/pypy/interpreter/pyframe.py	Tue Sep 30 19:02:07 2003
@@ -107,9 +107,9 @@
 
     def setflowstate(self, (mergeablestate, nonmergeablestate)):
         self.setfastscope(mergeablestate[:len(self.fastlocals_w)])
-        self.valuestack.items = mergeablestate[len(self.fastlocals_w):]
+        self.valuestack.items[:] = mergeablestate[len(self.fastlocals_w):]
         (
-            self.blockstack.items,
+            self.blockstack.items[:],
             self.last_exception,
             self.next_instr,
             ) = nonmergeablestate

Modified: pypy/trunk/src/pypy/objspace/flow/flowcontext.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/flow/flowcontext.py	(original)
+++ pypy/trunk/src/pypy/objspace/flow/flowcontext.py	Tue Sep 30 19:02:07 2003
@@ -17,6 +17,7 @@
                 inputargs.append(w)   # collects all variables
             newstate.append(w)
         self.framestate = newstate, unmergeablestate
+        #import sys; print >> sys.stderr, "** creating SpamBlock", self.framestate
         BasicBlock.__init__(self, inputargs, inputargs, [], None)
 
     def patchframe(self, frame, executioncontext):

Modified: pypy/trunk/src/pypy/objspace/flow/test/test_objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/flow/test/test_objspace.py	(original)
+++ pypy/trunk/src/pypy/objspace/flow/test/test_objspace.py	Tue Sep 30 19:02:07 2003
@@ -43,11 +43,13 @@
                           'f')
 
     def test_while(self):
+        #import sys; print >> sys.stderr, "--- starting! ---"
         x = self.codetest("def f(i):\n"
                           "    while i > 0:\n"
                           "        i = i - 1\n"
                           "        print i\n",
                           'f')
+        #import sys; print >> sys.stderr, "--- done! ---"
 
     def test_union_easy(self):
         x = self.codetest("def f(i):\n"
@@ -65,7 +67,7 @@
                           "    return i\n",
                           'f')
 
-    def dont_test_while_union(self):
+    def test_while_union(self):
         x = self.codetest("def f(i):\n"
                           "    total = 0\n"
                           "    while i > 0:\n"


More information about the Pypy-commit mailing list