|
@@ -188,7 +188,6 @@ class ModelverseKernel(object):
|
|
|
cond, true, false = yield [("RD", [inst, "cond"]),
|
|
|
("RD", [inst, "then"]),
|
|
|
("RD", [inst, "else"])]
|
|
|
- #print("Cond: %s; True: %s; False: %s" % (cond, true, false))
|
|
|
cond, = yield [("CALL_ARGS", [self.print_instruction, (cond, 0)])]
|
|
|
true, = yield [("CALL_ARGS", [self.print_instruction, (true, indent+1)])]
|
|
|
if false:
|
|
@@ -264,7 +263,7 @@ class ModelverseKernel(object):
|
|
|
initial_instruction = inst
|
|
|
suggested_name = self.jit.get_global_name(inst)
|
|
|
|
|
|
- (_, _, is_mutable), = yield [("CALL_ARGS", [self.jit.jit_signature, (inst,)])]
|
|
|
+ (params, _, is_mutable), = yield [("CALL_ARGS", [self.jit.jit_signature, (inst,)])]
|
|
|
if suggested_name is None or is_mutable:
|
|
|
print("Ignoring mutable or unreadable: %s" % suggested_name)
|
|
|
raise jit.JitCompilationFailedException("FAIL")
|
|
@@ -272,6 +271,8 @@ class ModelverseKernel(object):
|
|
|
print("Reading function: %s" % suggested_name)
|
|
|
printed, = yield [("CALL_ARGS", [self.print_instruction, (inst, 1)])]
|
|
|
print("Total printed function: ")
|
|
|
+ signature = "def " + suggested_name + "(" + ",".join(["var_%s" % param for param in params]) + "):\n"
|
|
|
+ print(signature)
|
|
|
print(printed)
|
|
|
|
|
|
def jit_compile(self, task_root, inst):
|