[pypy-svn] pypy out-of-line-guards-2: Updates to pypyjit.
arigo
commits-noreply at bitbucket.org
Wed May 4 14:03:03 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: out-of-line-guards-2
Changeset: r43885:922c4d33b318
Date: 2011-05-04 12:01 +0000
http://bitbucket.org/pypy/pypy/changeset/922c4d33b318/
Log: Updates to pypyjit.
diff --git a/pypy/jit/tl/pypyjit.py b/pypy/jit/tl/pypyjit.py
--- a/pypy/jit/tl/pypyjit.py
+++ b/pypy/jit/tl/pypyjit.py
@@ -56,10 +56,6 @@
assert False
print config
-from pypy.jit.codewriter.codewriter import CodeWriter
-CodeWriter.debug = True
-
-
import sys, pdb
space = Space(config)
@@ -119,6 +115,8 @@
# print a message, and restart
unixcheckpoint.restartable_point(auto='run')
+ from pypy.jit.codewriter.codewriter import CodeWriter
+ CodeWriter.debug = True
from pypy.jit.tl.pypyjit_child import run_child, run_child_ootype
if BACKEND == 'c':
run_child(globals(), locals())
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,18 +1,11 @@
try:
- def g(x):
- return x - 1
def f(x):
- while x:
- x = g(x)
- import cProfile
- import time
- t1 = time.time()
- cProfile.run("f(10000000)")
- t2 = time.time()
- f(10000000)
- t3 = time.time()
- print t2 - t1, t3 - t2, (t3 - t2) / (t2 - t1)
+ i = 0
+ while i < x:
+ range(i)
+ i += 1
+ f(10000)
except Exception, e:
print "Exception: ", type(e)
print e
More information about the Pypy-commit
mailing list