[pypy-svn] r29505 - in pypy/dist/pypy/jit: llabstractinterp/test tl tl/test
arigo at codespeak.net
arigo at codespeak.net
Thu Jun 29 18:59:23 CEST 2006
Author: arigo
Date: Thu Jun 29 18:59:21 2006
New Revision: 29505
Modified:
pypy/dist/pypy/jit/llabstractinterp/test/test_jit_tl.py
pypy/dist/pypy/jit/tl/test/test_tl.py
pypy/dist/pypy/jit/tl/tl.py
Log:
Revert r29504. Will do it differently.
Modified: pypy/dist/pypy/jit/llabstractinterp/test/test_jit_tl.py
==============================================================================
--- pypy/dist/pypy/jit/llabstractinterp/test/test_jit_tl.py (original)
+++ pypy/dist/pypy/jit/llabstractinterp/test/test_jit_tl.py Thu Jun 29 18:59:21 2006
@@ -11,7 +11,7 @@
def setup_module(mod):
t = TranslationContext()
- t.buildannotator().build_types(tl.interp, [str, int, bool])
+ t.buildannotator().build_types(tl.interp, [str, int])
rtyper = t.buildrtyper()
rtyper.specialize()
#inline.auto_inlining(t, 0.3)
@@ -23,12 +23,10 @@
def jit_tl(code):
interp = LLAbstractInterp()
hints = {0: string_repr.convert_const(code),
- 1: 0,
- 2: True}
+ 1: 0}
graph2 = interp.eval(graph1, hints)
- result1 = llinterp.eval_graph(graph1, [string_repr.convert_const(code), 0,
- True])
+ result1 = llinterp.eval_graph(graph1, [string_repr.convert_const(code), 0])
result2 = llinterp.eval_graph(graph2, [])
assert result1 == result2
Modified: pypy/dist/pypy/jit/tl/test/test_tl.py
==============================================================================
--- pypy/dist/pypy/jit/tl/test/test_tl.py (original)
+++ pypy/dist/pypy/jit/tl/test/test_tl.py Thu Jun 29 18:59:21 2006
@@ -48,7 +48,7 @@
def test_tl_translatable():
code = list2bytecode([PUSH,42, PUSH,100, ADD])
- fn = translate(interp, [str, int, bool])
+ fn = translate(interp, [str, int])
assert interp(code) == fn(code)
def test_swap():
Modified: pypy/dist/pypy/jit/tl/tl.py
==============================================================================
--- pypy/dist/pypy/jit/tl/tl.py (original)
+++ pypy/dist/pypy/jit/tl/tl.py Thu Jun 29 18:59:21 2006
@@ -11,7 +11,7 @@
t = -(-ord(c) & 0xff)
return t
-def interp(code='', pc=0, support_calls=True):
+def interp(code='', pc=0):
if not isinstance(code,str):
raise TypeError("code '%s' should be a string" % str(code))
@@ -111,7 +111,7 @@
if stack.pop():
pc += hint(offset, forget=True)
- elif support_calls and opcode == CALL:
+ elif opcode == CALL:
offset = char2int(code[pc])
pc += 1
res = interp(code, pc + offset)
More information about the Pypy-commit
mailing list