[pypy-svn] r62179 - pypy/branch/pyjitpl5/pypy/interpreter
arigo at codespeak.net
arigo at codespeak.net
Thu Feb 26 13:56:11 CET 2009
Author: arigo
Date: Thu Feb 26 13:56:10 2009
New Revision: 62179
Modified:
pypy/branch/pyjitpl5/pypy/interpreter/baseobjspace.py
pypy/branch/pyjitpl5/pypy/interpreter/gateway.py
pypy/branch/pyjitpl5/pypy/interpreter/pyframe.py
pypy/branch/pyjitpl5/pypy/interpreter/pyopcode.py
Log:
Remove most hints in the Python interpreter. They are not useful any more.
Modified: pypy/branch/pyjitpl5/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/interpreter/baseobjspace.py (original)
+++ pypy/branch/pyjitpl5/pypy/interpreter/baseobjspace.py Thu Feb 26 13:56:10 2009
@@ -4,7 +4,6 @@
from pypy.interpreter.argument import Arguments, ArgumentsFromValuestack
from pypy.interpreter.pycompiler import CPythonCompiler, PythonAstCompiler
from pypy.interpreter.miscutils import ThreadLocals
-from pypy.rlib.jit import hint
from pypy.tool.cache import Cache
from pypy.tool.uid import HUGEVAL_BYTES
from pypy.rlib.objectmodel import we_are_translated
@@ -724,7 +723,6 @@
if not self.config.objspace.disable_call_speedhacks:
# XXX start of hack for performance
- hint(w_func.__class__, promote=True)
if isinstance(w_func, Method):
w_inst = w_func.w_instance
if w_inst is not None:
Modified: pypy/branch/pyjitpl5/pypy/interpreter/gateway.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/interpreter/gateway.py (original)
+++ pypy/branch/pyjitpl5/pypy/interpreter/gateway.py Thu Feb 26 13:56:10 2009
@@ -20,7 +20,6 @@
from pypy.interpreter.baseobjspace import Wrappable, SpaceCache, DescrMismatch
from pypy.interpreter.argument import Arguments, AbstractArguments
from pypy.tool.sourcetools import NiceCompile, compile2
-from pypy.rlib.jit import hint
from pypy.rlib.rarithmetic import r_longlong, r_int, r_ulonglong, r_uint
# internal non-translatable parts:
@@ -572,7 +571,7 @@
fast_natural_arity = 0
def fastcall_0(self, space, w_func):
- self = hint(self, deepfreeze=True)
+ #self = hint(self, deepfreeze=True)
try:
w_result = self.fastfunc_0(space)
except KeyboardInterrupt:
@@ -592,7 +591,7 @@
fast_natural_arity = 1
def fastcall_1(self, space, w_func, w1):
- self = hint(self, deepfreeze=True)
+ #self = hint(self, deepfreeze=True)
try:
w_result = self.fastfunc_1(space, w1)
except KeyboardInterrupt:
@@ -617,7 +616,7 @@
fast_natural_arity = 2
def fastcall_2(self, space, w_func, w1, w2):
- self = hint(self, deepfreeze=True)
+ #self = hint(self, deepfreeze=True)
try:
w_result = self.fastfunc_2(space, w1, w2)
except KeyboardInterrupt:
@@ -642,7 +641,7 @@
fast_natural_arity = 3
def fastcall_3(self, space, func, w1, w2, w3):
- self = hint(self, deepfreeze=True)
+ #self = hint(self, deepfreeze=True)
try:
w_result = self.fastfunc_3(space, w1, w2, w3)
except KeyboardInterrupt:
@@ -667,7 +666,7 @@
fast_natural_arity = 4
def fastcall_4(self, space, func, w1, w2, w3, w4):
- self = hint(self, deepfreeze=True)
+ #self = hint(self, deepfreeze=True)
try:
w_result = self.fastfunc_4(space, w1, w2, w3, w4)
except KeyboardInterrupt:
Modified: pypy/branch/pyjitpl5/pypy/interpreter/pyframe.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/interpreter/pyframe.py (original)
+++ pypy/branch/pyjitpl5/pypy/interpreter/pyframe.py Thu Feb 26 13:56:10 2009
@@ -46,7 +46,7 @@
is_being_profiled = False
def __init__(self, space, code, w_globals, closure):
- self = hint(self, access_directly=True)
+ #self = hint(self, access_directly=True)
assert isinstance(code, pycode.PyCode)
self.pycode = code
eval.Frame.__init__(self, space, w_globals, code.co_nlocals)
@@ -145,7 +145,6 @@
n -= 1
if n < 0:
break
- hint(n, concrete=True)
w_value = self.popvalue()
w_key = self.popvalue()
key = self.space.str_w(w_key)
@@ -161,7 +160,6 @@
n -= 1
if n < 0:
break
- hint(n, concrete=True)
values_w[n] = self.popvalue()
return values_w
return popvalues
@@ -177,7 +175,6 @@
n -= 1
if n < 0:
break
- hint(n, concrete=True)
values_w[n] = self.valuestack_w[base+n]
return values_w
@@ -188,7 +185,6 @@
n -= 1
if n < 0:
break
- hint(n, concrete=True)
self.valuestack_w[finaldepth+n] = None
self.valuestackdepth = finaldepth
@@ -197,7 +193,6 @@
n -= 1
if n < 0:
break
- hint(n, concrete=True)
self.pushvalue(values_w[n])
def dupvalues(self, n):
@@ -206,7 +201,6 @@
n -= 1
if n < 0:
break
- hint(n, concrete=True)
w_value = self.peekvalue(delta)
self.pushvalue(w_value)
@@ -361,7 +355,7 @@
return self.pycode.hidden_applevel
def getcode(self):
- return hint(hint(self.pycode, promote=True), deepfreeze=True)
+ return hint(self.pycode, promote=True)
def getfastscope(self):
"Get the fast locals as a list."
Modified: pypy/branch/pyjitpl5/pypy/interpreter/pyopcode.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/interpreter/pyopcode.py (original)
+++ pypy/branch/pyjitpl5/pypy/interpreter/pyopcode.py Thu Feb 26 13:56:10 2009
@@ -183,8 +183,6 @@
oparg = (hi << 8) | lo
else:
oparg = 0
- hint(opcode, concrete=True)
- hint(oparg, concrete=True)
while opcode == opcodedesc.EXTENDED_ARG.index:
opcode = ord(co_code[next_instr])
@@ -194,8 +192,6 @@
hi = ord(co_code[next_instr+2])
next_instr += 3
oparg = (oparg << 16) | (hi << 8) | lo
- hint(opcode, concrete=True)
- hint(oparg, concrete=True)
if opcode == opcodedesc.RETURN_VALUE.index:
w_returnvalue = self.popvalue()
@@ -265,7 +261,6 @@
while n > 0:
block = self.blockstack.pop()
n -= 1
- hint(n, concrete=True)
if (block.handling_mask & unroller_kind) != 0:
return block
block.cleanupstack(self)
@@ -1128,7 +1123,7 @@
def handle(self, frame, unroller):
next_instr = self.really_handle(frame, unroller) # JIT hack
- return hint(next_instr, promote=True)
+ return next_instr
def really_handle(self, frame, unroller):
""" Purely abstract method
More information about the Pypy-commit
mailing list