Author: Armin Rigo <[email protected]>
Branch: cleanup-llgraph-backend
Changeset: r58165:d591e13a1084
Date: 2012-10-17 14:31 +0200
http://bitbucket.org/pypy/pypy/changeset/d591e13a1084/

Log:    redirect_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
@@ -111,6 +111,16 @@
         for trace in looptoken._llgraph_alltraces:
             trace.invalid = True
 
+    def redirect_call_assembler(self, oldlooptoken, newlooptoken):
+        oldtrace = oldlooptoken._llgraph_loop
+        newtrace = newlooptoken._llgraph_loop
+        OLD = [box.type for box in oldtrace.inputargs]
+        NEW = [box.type for box in newtrace.inputargs]
+        assert OLD == NEW
+        assert not hasattr(oldlooptoken, '_llgraph_redirected')
+        oldlooptoken._llgraph_redirected = True
+        oldlooptoken._llgraph_loop = newtrace
+
     def make_execute_token(self, *argtypes):
         return self._execute_token
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to