|
@@ -61,7 +61,7 @@ class ModelverseJit(object):
|
|
|
|
|
|
print(constructed_ir)
|
|
|
self.mark_no_jit(body_id)
|
|
|
- raise JitCompilationFailedException("Can't JIT function body at " + str(body_id))
|
|
|
+ raise JitCompilationFailedException("Can't jit function body at " + str(body_id))
|
|
|
|
|
|
class AnalysisState(object):
|
|
|
"""The state of a bytecode analysis call graph."""
|
|
@@ -72,8 +72,11 @@ class AnalysisState(object):
|
|
|
def analyze(self, instruction_id):
|
|
|
"""Tries to build an intermediate representation from the instruction with the
|
|
|
given id."""
|
|
|
- # Add the instruction id to the analyzed_instructions set to avoid
|
|
|
+ # Check the analyzed_instructions set for instruction_id to avoid
|
|
|
# infinite loops.
|
|
|
+ if instruction_id in self.analyzed_instructions:
|
|
|
+ raise JitCompilationFailedException('Cannon jit non-tree instruction graph.')
|
|
|
+
|
|
|
self.analyzed_instructions.add(instruction_id)
|
|
|
instruction_val, = yield [("RV", [instruction_id])]
|
|
|
instruction_val = instruction_val["value"]
|