Author: Hakan Ardo <ha...@debian.org>
Branch: jit-targets
Changeset: r48868:c728e120eed9
Date: 2011-11-07 14:05 +0100
http://bitbucket.org/pypy/pypy/changeset/c728e120eed9/

Log:    support CALL_ASSEMBLER

diff --git a/pypy/jit/backend/llgraph/runner.py 
b/pypy/jit/backend/llgraph/runner.py
--- a/pypy/jit/backend/llgraph/runner.py
+++ b/pypy/jit/backend/llgraph/runner.py
@@ -181,9 +181,8 @@
                 llimpl.compile_add_descr(c, descr.ofs, descr.typeinfo,
                                          descr.arg_types)
             if isinstance(descr, history.JitCellToken):
-                assert False
-                if op.getopnum() != rop.JUMP:
-                    llimpl.compile_add_loop_token(c, descr)
+                assert op.getopnum() != rop.JUMP
+                llimpl.compile_add_loop_token(c, descr)
             if isinstance(descr, history.TargetToken) and op.getopnum() == 
rop.LABEL:
                 llimpl.compile_add_target_token(c, descr)
             if self.is_oo and isinstance(descr, (OODescr, MethDescr)):
diff --git a/pypy/jit/metainterp/compile.py b/pypy/jit/metainterp/compile.py
--- a/pypy/jit/metainterp/compile.py
+++ b/pypy/jit/metainterp/compile.py
@@ -70,8 +70,11 @@
             if n >= 0:       # we also record the resumedescr number
                 
original_jitcell_token.compiled_loop_token.record_faildescr_index(n)
         elif isinstance(descr, JitCellToken):
-            # for a CALL_ASSEMBLER ...
-            assert False, "FIXME"
+            # for a CALL_ASSEMBLER: record it as a potential jump.
+            if descr is not original_jitcell_token:
+                original_jitcell_token.record_jump_to(descr)
+            descr.exported_state = None
+            op._descr = None    # clear reference, mostly for tests
         elif isinstance(descr, TargetToken):
             # for a JUMP: record it as a potential jump.
             # (the following test is not enough to prevent more complicated
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to