ソースを参照

Fix a bug in baseline JIT tracing

jonathanvdc 8 年 前
コミット
166099e326

+ 3 - 1
kernel/modelverse_jit/bytecode_to_tree.py

@@ -240,7 +240,9 @@ def with_debug_info_trace(instruction, debug_info, function_name):
         return instruction
     else:
         return tree_ir.create_block(
-            tree_ir.PrintInstruction(jit_runtime.format_trace_message(debug_info, function_name)),
+            tree_ir.PrintInstruction(
+                tree_ir.LiteralInstruction(
+                    jit_runtime.format_trace_message(debug_info, function_name))),
             instruction)
 
 class LocalNameMap(object):

+ 1 - 0
kernel/modelverse_jit/tree_ir.py

@@ -475,6 +475,7 @@ class PrintInstruction(VoidInstruction):
     def __init__(self, argument):
         VoidInstruction.__init__(self)
         self.argument = argument
+        assert isinstance(argument, Instruction)
 
     def get_children(self):
         """Gets this instruction's sequence of child instructions."""