|
@@ -21,8 +21,9 @@ class ModelverseKernel(object):
|
|
|
#self.allow_compiled = False
|
|
|
|
|
|
# `self.jit` handles most JIT-related functionality.
|
|
|
- # Set it to `None` to disable the JIT.
|
|
|
self.jit = jit.ModelverseJit()
|
|
|
+ # To disable the JIT, uncomment the line below:
|
|
|
+ # self.jit.set_jit_enabled(False)
|
|
|
self.debug_info = "(no debug information found)"
|
|
|
|
|
|
def execute_yields(self, username, operation, params, reply):
|
|
@@ -65,8 +66,7 @@ class ModelverseKernel(object):
|
|
|
elif inst is None:
|
|
|
raise Exception("Instruction pointer could not be found!")
|
|
|
elif isinstance(phase_v, string_types):
|
|
|
- if phase_v == "init" and (inst in self.compiled or \
|
|
|
- (self.jit is not None and self.jit.is_jittable_entry_point(inst))):
|
|
|
+ if phase_v == "init" and (inst in self.compiled or self.jit.is_jittable_entry_point(inst)):
|
|
|
#print("%-30s(%s)" % ("COMPILED " + str(self.compiled[inst]), phase_v))
|
|
|
gen = self.execute_primitive_or_jit(user_root, inst, username)
|
|
|
elif inst_v is None:
|
|
@@ -693,8 +693,7 @@ class ModelverseKernel(object):
|
|
|
if param is None:
|
|
|
returnvalue, = yield [("RD", [user_frame, "returnvalue"])]
|
|
|
body, = yield [("RD", [returnvalue, "body"])]
|
|
|
- if self.jit is not None:
|
|
|
- self.jit.mark_entry_point(body)
|
|
|
+ self.jit.mark_entry_point(body)
|
|
|
|
|
|
phase_link, frame_link, prev_phase, new_phase, new_frame, new_evalstack, new_symbols, new_returnvalue = \
|
|
|
yield [("RDE", [user_frame, "phase"]),
|
|
@@ -739,8 +738,7 @@ class ModelverseKernel(object):
|
|
|
]
|
|
|
|
|
|
body, = yield [("RD", [new_IP, "body"])]
|
|
|
- if self.jit is not None:
|
|
|
- self.jit.mark_entry_point(body)
|
|
|
+ self.jit.mark_entry_point(body)
|
|
|
|
|
|
name, = yield [("RD", [last_param, "name"])]
|
|
|
name_value, = yield [("RV", [name])]
|