|
@@ -324,7 +324,7 @@ class ModelverseKernel(object):
|
|
|
|
|
|
param_list = "{" + ", ".join(["'%s': %s" % (k, v) for k, v in param_list.items()]) + "}"
|
|
|
actual_computation = "$$INDENT$$%s, = yield [('CALL_ARGS', [_mvk.execute_jit, (_root, %s['id'], _taskname, %s)])]\n" % (value, func_name, param_list)
|
|
|
-
|
|
|
+
|
|
|
if indent == 0:
|
|
|
# No indent, meaning that we use it inline
|
|
|
# Therefore, we output the prev and value individually
|
|
@@ -334,6 +334,7 @@ class ModelverseKernel(object):
|
|
|
# Therefore, we only do the yield
|
|
|
prev, instruction = prev_func_name + computation, actual_computation.replace("$$INDENT$$", " " * indent)
|
|
|
|
|
|
+
|
|
|
elif inst_type["value"] == "access":
|
|
|
value, = yield [("RD", [inst, "var"])]
|
|
|
(prev, instruction), = yield [("CALL_ARGS", [self.print_instruction, (value, 0, nested_indent)])]
|
|
@@ -453,11 +454,9 @@ class ModelverseKernel(object):
|
|
|
|
|
|
# Run the compiled function.
|
|
|
if compiled_func == primitive_functions.dict_read:
|
|
|
- a = params['a']
|
|
|
- b = params['b']
|
|
|
- if "value" not in b:
|
|
|
- b['value'], = yield [("RV", [b['id']])]
|
|
|
- result, = yield [("RD", [a['id'], b['value']])]
|
|
|
+ if "value" not in params['b']:
|
|
|
+ params['b']['value'], = yield [("RV", [params['b']['id']])]
|
|
|
+ result, = yield [("RD", [params['a']['id'], params['b']['value']])]
|
|
|
result = {'id': result}
|
|
|
else:
|
|
|
results = yield [("CALL_KWARGS", [compiled_func, params])]
|