[pypy-svn] pypy out-of-line-guards-2: update pypyjit_demo

fijal commits-noreply at bitbucket.org
Mon Apr 18 08:13:59 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: out-of-line-guards-2
Changeset: r43435:d6614c7e5628
Date: 2011-04-15 14:41 +0200
http://bitbucket.org/pypy/pypy/changeset/d6614c7e5628/

Log:	update pypyjit_demo

diff --git a/pypy/jit/tl/pypyjit_demo.py b/pypy/jit/tl/pypyjit_demo.py
--- a/pypy/jit/tl/pypyjit_demo.py
+++ b/pypy/jit/tl/pypyjit_demo.py
@@ -1,15 +1,16 @@
 
 try:
-    def main(n):
-        def g(n):
-            return range(n)
-        s = 0
-        for i in range(n):  # ID: for
-            tmp = g(n)
-            s += tmp[i]     # ID: getitem
-            a = 0
-        return s
-    main(10)
+    class A(object):
+        def meth(self):
+            for k in range(4):
+                pass
+
+    def f():
+        a = A()
+        for i in range(20):
+            a.meth()
+
+    f()
 
 except Exception, e:
     print "Exception: ", type(e)


More information about the Pypy-commit mailing list