|
@@ -445,6 +445,8 @@ class ModelverseJit(object):
|
|
|
else:
|
|
|
param_name_ids, = yield [("RDK", [param_set_id])]
|
|
|
param_names = yield [("RV", [n]) for n in param_name_ids]
|
|
|
+ #NOTE Patch up strange links...
|
|
|
+ param_names = [i for i in param_names if i is not None]
|
|
|
param_vars = yield [("RD", [param_set_id, k]) for k in param_names]
|
|
|
self.jitted_parameters[body_id] = (param_vars, param_names, is_mutable)
|
|
|
|
|
@@ -785,6 +787,10 @@ def compile_function_body_fast(jit, function_name, body_id, _):
|
|
|
(parameter_ids, parameter_list, _), = yield [
|
|
|
("CALL_ARGS", [jit.jit_signature, (body_id,)])]
|
|
|
param_dict = dict(list(zip(parameter_ids, parameter_list)))
|
|
|
+ if None in param_dict:
|
|
|
+ del param_dict[None]
|
|
|
+ print("REMOVING NONE IN PARAMETERS for ")
|
|
|
+ print(locals())
|
|
|
body_bytecode, = yield [("CALL_ARGS", [jit.jit_parse_bytecode, (body_id,)])]
|
|
|
bytecode_analyzer = bytecode_to_cfg.AnalysisState(jit, function_name, param_dict)
|
|
|
bytecode_analyzer.analyze(body_bytecode)
|
|
@@ -797,11 +803,7 @@ def compile_function_body_fast(jit, function_name, body_id, _):
|
|
|
'\n'.join(map(str, cfg_ir.get_all_reachable_blocks(entry_point)))))
|
|
|
|
|
|
# Lower the CFG to tree IR.
|
|
|
- try:
|
|
|
- constructed_body = cfg_to_tree.lower_flow_graph(entry_point, jit)
|
|
|
- except Exception as e:
|
|
|
- print("Exception in JIT: " + str(e))
|
|
|
- raise JitCompilationFailedException("UNKNOWN...")
|
|
|
+ constructed_body = cfg_to_tree.lower_flow_graph(entry_point, jit)
|
|
|
|
|
|
# Optimize the tree that was generated.
|
|
|
constructed_body, = yield [("CALL_ARGS", [optimize_tree_ir, (constructed_body,)])]
|