[pypy-commit] pypy default: Rollback the use of functools here, I want to be sure I didn't break stuff.
alex_gaynor
noreply at buildbot.pypy.org
Thu Jul 28 20:32:08 CEST 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch:
Changeset: r46056:129b4f6d202e
Date: 2011-07-28 11:32 -0700
http://bitbucket.org/pypy/pypy/changeset/129b4f6d202e/
Log: Rollback the use of functools here, I want to be sure I didn't break
stuff.
diff --git a/pypy/rlib/jit.py b/pypy/rlib/jit.py
--- a/pypy/rlib/jit.py
+++ b/pypy/rlib/jit.py
@@ -1,14 +1,10 @@
-import functools
+import py
import sys
-
-import py
-
+from pypy.rpython.extregistry import ExtRegistryEntry
+from pypy.rlib.objectmodel import CDefinedIntSymbolic
+from pypy.rlib.objectmodel import keepalive_until_here, specialize
+from pypy.rlib.unroll import unrolling_iterable
from pypy.rlib.nonconst import NonConstant
-from pypy.rlib.objectmodel import (CDefinedIntSymbolic, keepalive_until_here,
- specialize)
-from pypy.rlib.unroll import unrolling_iterable
-from pypy.rpython.extregistry import ExtRegistryEntry
-
def elidable(func):
""" Decorate a function as "trace-elidable". This means precisely that:
@@ -95,7 +91,8 @@
d = {"func": func, "hint": hint}
exec py.code.Source("\n".join(code)).compile() in d
result = d["f"]
- return functools.wraps(func)(result)
+ result.func_name = func.func_name + "_promote"
+ return result
return decorator
def purefunction_promote(*args, **kwargs):
@@ -283,7 +280,7 @@
def specialize_call(self, hop):
pass
-
+
vref_None = non_virtual_ref(None)
# ____________________________________________________________
@@ -293,7 +290,7 @@
"""Inconsistency in the JIT hints."""
PARAMETERS = {'threshold': 1032, # just above 1024
- 'function_threshold': 1617, # slightly more than one above
+ 'function_threshold': 1617, # slightly more than one above
'trace_eagerness': 200,
'trace_limit': 12000,
'inlining': 1,
@@ -403,7 +400,7 @@
raise
set_user_param._annspecialcase_ = 'specialize:arg(0)'
-
+
def on_compile(self, logger, looptoken, operations, type, *greenargs):
""" A hook called when loop is compiled. Overwrite
for your own jitdriver if you want to do something special, like
More information about the pypy-commit
mailing list