[pypy-svn] r9400 - pypy/dist/pypy/translator/test

tismer at codespeak.net tismer at codespeak.net
Tue Feb 22 13:40:22 CET 2005


Author: tismer
Date: Tue Feb 22 13:40:22 2005
New Revision: 9400

Modified:
   pypy/dist/pypy/translator/test/snippet.py
Log:
slight rearrangements which do not change semantics.
The reason was to be able to cut the source programmatically
at the point where it stops to be translatable.

Modified: pypy/dist/pypy/translator/test/snippet.py
==============================================================================
--- pypy/dist/pypy/translator/test/snippet.py	(original)
+++ pypy/dist/pypy/translator/test/snippet.py	Tue Feb 22 13:40:22 2005
@@ -449,16 +449,6 @@
 def global_recursive_list():
     return global_rl
 
-class BadInit(object):
-    def update(self, k):
-        self.k = 1
-    def __init__(self, v):
-        self.update(**{'k':v})
-    def read(self):
-        return self.k
-
-global_bi = BadInit(1)
-
 class MI_A(object):
     a = 1
 class MI_B(MI_A):
@@ -472,9 +462,6 @@
     i = MI_D()
     return i.a + i.b + i.c + i.d
 
-def global_badinit():
-    return global_bi.read()
-
 def flow_type_info(i):
     if isinstance(i, int):
         a = i + 1
@@ -575,7 +562,24 @@
     e.stuff = (3, "world")
     return C().stuff
 
-# --------------------(Currently) Non compillable Functions ---------------------
+def _getstuff(x):
+    return x.stuff
+
+# --------------------(Currently) Non compilable Functions ---------------------
+
+class BadInit(object):
+    def update(self, k):
+        self.k = 1
+    def __init__(self, v):
+        return
+        self.update(**{'k':v})
+    def read(self):
+        return self.k
+
+global_bi = BadInit(1)
+
+def global_badinit():
+    return global_bi.read()
 
 def _attrs():
     def b(): pass
@@ -583,9 +587,6 @@
     b.g = 5
     return b.f + b.g
 
-def _getstuff(x):
-    return x.stuff
-
 def _methodcall1(cond):
     if cond:
         x = G()



More information about the Pypy-commit mailing list