[pypy-svn] r48283 - pypy/dist/pypy/translator/goal

fijal at codespeak.net fijal at codespeak.net
Sun Nov 4 14:31:12 CET 2007


Author: fijal
Date: Sun Nov  4 14:31:10 2007
New Revision: 48283

Added:
   pypy/dist/pypy/translator/goal/targetwarningalone.py   (contents, props changed)
Log:
Strange target for rpbc experiments.


Added: pypy/dist/pypy/translator/goal/targetwarningalone.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/translator/goal/targetwarningalone.py	Sun Nov  4 14:31:10 2007
@@ -0,0 +1,38 @@
+
+class Base(object):
+    pass
+
+class A(Base):
+    a = 1
+    b = 2
+    c = 3
+
+class B(Base):
+    a = 1
+    b = 2
+
+class C(Base):
+    b = 8
+    c = 6
+
+def f(n):
+    if n > 3:
+        x = A
+    elif n > 1:
+        x = B
+    else:
+        x = C
+    if n > 0:
+        return x.a
+    return 8
+
+# __________  Entry point  __________
+
+def entry_point(argv):
+    f(int(argv[0]))
+    return 0
+
+# _____ Define and setup target ___
+
+def target(*args):
+    return entry_point, None


More information about the pypy-svn mailing list