Author: Wim Lavrijsen <[email protected]>
Branch: cling-support
Changeset: r85799:f30be95c828b
Date: 2016-07-19 11:50 -0700
http://bitbucket.org/pypy/pypy/changeset/f30be95c828b/
Log: fix the mechanics of test_zjit; TODO: the test actually succeeds
even with cppyy_get_methptr_getter returning 0, so the test isn't
testing the number of layers correctly anymore (probably due to
improvements elsewhere in the 'slow path'?)
diff --git a/pypy/module/cppyy/interp_cppyy.py
b/pypy/module/cppyy/interp_cppyy.py
--- a/pypy/module/cppyy/interp_cppyy.py
+++ b/pypy/module/cppyy/interp_cppyy.py
@@ -36,7 +36,11 @@
raise OperationError(space.w_RuntimeError, space.wrap(str("could
not load dictionary " + name)))
except rdynload.DLOpenError as e:
- raise OperationError(space.w_RuntimeError, space.wrap(str(e.msg)))
+ if hasattr(space, "fake"): # FakeSpace fails e.msg (?!)
+ errmsg = "failed to load cdll"
+ else:
+ errmsg = e.msg
+ raise OperationError(space.w_RuntimeError, space.wrap(str(errmsg)))
return W_CPPLibrary(space, cdll)
class State(object):
@@ -1037,7 +1041,8 @@
self._opt_register_finalizer()
def _opt_register_finalizer(self):
- if self.python_owns and not self.finalizer_registered:
+ if self.python_owns and not self.finalizer_registered \
+ and not hasattr(self.space, "fake"):
self.register_finalizer(self.space)
self.finalizer_registered = True
diff --git a/pypy/module/cppyy/test/test_zjit.py
b/pypy/module/cppyy/test/test_zjit.py
--- a/pypy/module/cppyy/test/test_zjit.py
+++ b/pypy/module/cppyy/test/test_zjit.py
@@ -71,7 +71,7 @@
class FakeException(FakeType):
def __init__(self, name):
FakeType.__init__(self, name)
- self.message = name
+ self.msg = name
class FakeUserDelAction(object):
def __init__(self, space):
@@ -210,6 +210,7 @@
f()
space = FakeSpace()
result = self.meta_interp(f, [], listops=True, backendopt=True,
listcomp=True)
+ # TODO: this currently succeeds even as there is no fast path
implemented?!
self.check_jitcell_token_count(1)
def test01_simple(self):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit