Author: Maciej Fijalkowski <[email protected]>
Branch: callback-jit
Changeset: r59649:198e1894f7d9
Date: 2013-01-02 12:13 +0200
http://bitbucket.org/pypy/pypy/changeset/198e1894f7d9/

Log:    fix the test

diff --git a/pypy/jit/metainterp/pyjitpl.py b/pypy/jit/metainterp/pyjitpl.py
--- a/pypy/jit/metainterp/pyjitpl.py
+++ b/pypy/jit/metainterp/pyjitpl.py
@@ -1376,16 +1376,15 @@
         """The 'residual_call' operation is emitted in two cases:
         when we have to generate a residual CALL operation, but also
         to handle an indirect_call that may need to be inlined."""
-        assert isinstance(funcbox, Const)
-        sd = self.metainterp.staticdata
-        key = sd.cpu.ts.getaddr_for_box(funcbox)
-        jitcode = sd.bytecode_for_address(key)
-        if jitcode is not None:
-            # we should follow calls to this graph
-            return self.metainterp.perform_call(jitcode, argboxes)
-        else:
-            # but we should not follow calls to that graph
-            return self.do_residual_call(funcbox, argboxes, calldescr)
+        if isinstance(funcbox, Const):
+            sd = self.metainterp.staticdata
+            key = sd.cpu.ts.getaddr_for_box(funcbox)
+            jitcode = sd.bytecode_for_address(key)
+            if jitcode is not None:
+                # we should follow calls to this graph
+                return self.metainterp.perform_call(jitcode, argboxes)
+        # but we should not follow calls to that graph
+        return self.do_residual_call(funcbox, argboxes, calldescr)
 
 # ____________________________________________________________
 
diff --git a/pypy/jit/metainterp/test/test_ajit.py 
b/pypy/jit/metainterp/test/test_ajit.py
--- a/pypy/jit/metainterp/test/test_ajit.py
+++ b/pypy/jit/metainterp/test/test_ajit.py
@@ -3980,4 +3980,4 @@
             return 3
 
         self.interp_operations(f, [])
-        
+
diff --git a/pypy/jit/metainterp/test/test_call.py 
b/pypy/jit/metainterp/test/test_call.py
--- a/pypy/jit/metainterp/test/test_call.py
+++ b/pypy/jit/metainterp/test/test_call.py
@@ -24,4 +24,4 @@
 
         res = self.interp_operations(f, [3])
         assert res == f(3)
-        
+    
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to