[pypy-svn] r64511 - in pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp: . test
arigo at codespeak.net
arigo at codespeak.net
Tue Apr 21 14:37:59 CEST 2009
Author: arigo
Date: Tue Apr 21 14:37:58 2009
New Revision: 64511
Modified:
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/codewriter.py
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py
Log:
(antocuni, arigo)
Pass the next test on OOtype.
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/codewriter.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/codewriter.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/codewriter.py Tue Apr 21 14:37:58 2009
@@ -795,13 +795,17 @@
kind = self.codewriter.policy.guess_call_kind(op)
return getattr(self, 'handle_%s_oosend' % kind)(op)
- def handle_regular_call(self, op):
+ def handle_regular_call(self, op, skip_first=True):
self.minimize_variables()
[targetgraph] = self.codewriter.policy.graphs_from(op)
jitbox = self.codewriter.get_jitcode(targetgraph, self.graph)
+ if skip_first:
+ args = op.args[1:]
+ else:
+ args = op.args
self.emit('call')
self.emit(self.get_position(jitbox))
- self.emit_varargs([x for x in op.args[1:]
+ self.emit_varargs([x for x in args
if x.concretetype is not lltype.Void])
self.register_var(op.result)
@@ -843,7 +847,8 @@
INSTANCE = v_obj.concretetype
graphs = v_obj.concretetype._lookup_graphs(methname)
if len(graphs) == 1:
- assert False, 'TODO'
+ self.handle_regular_call(op, skip_first=False)
+ return
self.minimize_variables()
methdesc = self.codewriter.get_methdesc(INSTANCE, methname)
self.emit('oosend')
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py Tue Apr 21 14:37:58 2009
@@ -459,7 +459,6 @@
def skip(self):
py.test.skip('in-progress')
- test_send_to_single_target_method = skip
test_red_send_to_green_receiver = skip
test_oosend_base = skip
test_oosend_different_initial_class = skip
More information about the Pypy-commit
mailing list