|
@@ -236,9 +236,9 @@ class ModelverseKernel(object):
|
|
|
value, = yield [("RD", [inst, "value"])]
|
|
|
if value:
|
|
|
(prev_value, instruction_value), = yield [("CALL_ARGS", [self.print_instruction, (value, 0, indent)])]
|
|
|
- instruction = prev_value + " " * indent + "return %s\n" % instruction_value
|
|
|
+ instruction = prev_value + " " * indent + "raise PrimitiveFinished(%s)\n" % instruction_value
|
|
|
else:
|
|
|
- instruction = " " * indent + "return\n"
|
|
|
+ instruction = " " * indent + "raise PrimitiveFinished(None)\n"
|
|
|
|
|
|
elif inst_type["value"] == "declare":
|
|
|
instruction = ""
|
|
@@ -352,7 +352,6 @@ class ModelverseKernel(object):
|
|
|
name = self.jit.get_global_name(inst)
|
|
|
compiled_func, = yield [("CALL_ARGS", [self.read_function, (inst,)])]
|
|
|
exec(str(compiled_func), self.jit.jit_globals)
|
|
|
- print(self.jit.jit_globals)
|
|
|
compiled_func = self.jit.jit_globals[name]
|
|
|
self.jit.register_compiled(inst, compiled_func, name)
|
|
|
|