[pypy-svn] r64796 - in pypy/branch/pyjitpl5/pypy/jit: backend/llgraph backend/minimal metainterp
antocuni at codespeak.net
antocuni at codespeak.net
Wed Apr 29 11:17:37 CEST 2009
Author: antocuni
Date: Wed Apr 29 11:17:32 2009
New Revision: 64796
Modified:
pypy/branch/pyjitpl5/pypy/jit/backend/llgraph/runner.py
pypy/branch/pyjitpl5/pypy/jit/backend/minimal/runner.py
pypy/branch/pyjitpl5/pypy/jit/metainterp/typesystem.py
pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py
Log:
translation fixes for ootype (tests are still not passing but progress has
been made: now they crashes in the cli backend)
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/llgraph/runner.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/llgraph/runner.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/llgraph/runner.py Wed Apr 29 11:17:32 2009
@@ -561,6 +561,8 @@
class MethDescr(history.AbstractMethDescr):
+ callmeth = None
+
new = classmethod(OODescr.new.im_func)
def __init__(self, SELFTYPE, methname):
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/minimal/runner.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/minimal/runner.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/minimal/runner.py Wed Apr 29 11:17:32 2009
@@ -52,6 +52,9 @@
else:
# for tests, a random emulated ll_inst will do
ll_inst = self._get_fake_inst()
+ self._set_ovf_error_inst(ll_inst)
+
+ def _set_ovf_error_inst(self, ll_inst):
self._ovf_error_inst = ll_inst
def compile_operations(self, loop):
@@ -498,6 +501,9 @@
fields = sorted(INSTANCE._allfields().keys())
return fields.index(name)
+ def _set_ovf_error_inst(self, ll_inst):
+ self._ovf_error_inst = ootype.cast_to_object(ll_inst)
+
@cached_method('_typedescrcache')
def typedescrof(self, TYPE):
def alloc():
@@ -517,6 +523,7 @@
def do_oosend(self, args, descr=None):
assert isinstance(descr, MethDescr)
+ assert descr.callmeth is not None
selfbox = args[0]
argboxes = args[1:]
return descr.callmeth(selfbox, argboxes)
Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/typesystem.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/typesystem.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/typesystem.py Wed Apr 29 11:17:32 2009
@@ -116,7 +116,7 @@
def get_exception_obj(self, evaluebox):
# only works when translated
- obj = evaluebox.getobj()
+ obj = ootype.cast_from_object(ootype.ROOT, evaluebox.getobj())
return cast_base_ptr_to_instance(Exception, obj)
Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py Wed Apr 29 11:17:32 2009
@@ -389,6 +389,7 @@
assert result_kind == 'obj'
return ootype.cast_from_object(RESULT, e.result)
except ExitFrameWithExceptionPtr, e:
+ assert not is_oo
value = lltype.cast_opaque_ptr(lltype.Ptr(rclass.OBJECT),
e.value)
if not we_are_translated():
More information about the Pypy-commit
mailing list