[pypy-commit] pypy default: Fix this test and remove some unused imports
fijal
noreply at buildbot.pypy.org
Wed May 15 17:24:07 CEST 2013
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r64175:e191271d612c
Date: 2013-05-15 17:11 +0200
http://bitbucket.org/pypy/pypy/changeset/e191271d612c/
Log: Fix this test and remove some unused imports
diff --git a/rpython/jit/metainterp/test/test_compile.py b/rpython/jit/metainterp/test/test_compile.py
--- a/rpython/jit/metainterp/test/test_compile.py
+++ b/rpython/jit/metainterp/test/test_compile.py
@@ -1,10 +1,10 @@
from rpython.config.translationoption import get_combined_translation_config
-from rpython.jit.metainterp.history import TargetToken, ConstInt, History, Stats
-from rpython.jit.metainterp.history import BoxInt, INT
+from rpython.jit.metainterp.history import ConstInt, History, Stats
+from rpython.jit.metainterp.history import INT
from rpython.jit.metainterp.compile import compile_loop
-from rpython.jit.metainterp.compile import ResumeGuardDescr
from rpython.jit.metainterp.compile import ResumeGuardCountersInt
from rpython.jit.metainterp.compile import compile_tmp_callback
+from rpython.jit.metainterp import jitexc
from rpython.jit.metainterp import jitprof, typesystem, compile
from rpython.jit.metainterp.optimizeopt.test.test_util import LLtypeMixin
from rpython.jit.tool.oparser import parse
@@ -13,7 +13,7 @@
class FakeCPU(object):
class tracker:
pass
-
+
ts = typesystem.llhelper
def __init__(self):
self.seen = []
@@ -41,7 +41,7 @@
loopnumbering = 0
class FakeMetaInterpStaticData(object):
-
+
logger_noopt = FakeLogger()
logger_ops = FakeLogger()
config = get_combined_translation_config(translating=True)
@@ -192,14 +192,13 @@
assert lltype.cast_opaque_ptr(lltype.Ptr(EXC), got) == llexc
#
class FakeMetaInterpSD:
- class ExitFrameWithExceptionRef(Exception):
- pass
+ pass
FakeMetaInterpSD.cpu = cpu
deadframe = cpu.execute_token(loop_token, -156, -178)
fail_descr = cpu.get_latest_descr(deadframe)
try:
fail_descr.handle_fail(deadframe, FakeMetaInterpSD(), None)
- except FakeMetaInterpSD.ExitFrameWithExceptionRef, e:
- assert lltype.cast_opaque_ptr(lltype.Ptr(EXC), e.args[1]) == llexc
+ except jitexc.ExitFrameWithExceptionRef, e:
+ assert lltype.cast_opaque_ptr(lltype.Ptr(EXC), e.value) == llexc
else:
assert 0, "should have raised"
More information about the pypy-commit
mailing list