Commit e5c806d3 authored by Diederik van Arkel's avatar Diederik van Arkel
Browse files

Add SK_GeneratedCaseFunction for dynamic cases fix

parent b515b8fc
...@@ -1828,6 +1828,8 @@ where ...@@ -1828,6 +1828,8 @@ where
= beFunctionSymbol glob_object main_dcl_module_n = beFunctionSymbol glob_object main_dcl_module_n
convertSymbol {symb_kind=SK_GeneratedFunction _ index} convertSymbol {symb_kind=SK_GeneratedFunction _ index}
= beFunctionSymbol index main_dcl_module_n = beFunctionSymbol index main_dcl_module_n
convertSymbol {symb_kind=SK_GeneratedCaseFunction _ index}
= beFunctionSymbol index main_dcl_module_n
convertSymbol {symb_kind=SK_Constructor {glob_module, glob_object}} convertSymbol {symb_kind=SK_Constructor {glob_module, glob_object}}
= beConstructorSymbol glob_module glob_object // ->> ("convertSymbol", (glob_module, glob_object)) = beConstructorSymbol glob_module glob_object // ->> ("convertSymbol", (glob_module, glob_object))
convertSymbol symbol convertSymbol symbol
......
...@@ -162,6 +162,7 @@ where ...@@ -162,6 +162,7 @@ where
// compare_indexes (SK_InternalFunction i1) (SK_InternalFunction i2) = i1 =< i2 // compare_indexes (SK_InternalFunction i1) (SK_InternalFunction i2) = i1 =< i2
compare_indexes (SK_OverloadedFunction i1) (SK_OverloadedFunction i2) = i1 =< i2 compare_indexes (SK_OverloadedFunction i1) (SK_OverloadedFunction i2) = i1 =< i2
compare_indexes (SK_GeneratedFunction _ i1) (SK_GeneratedFunction _ i2) = i1 =< i2 compare_indexes (SK_GeneratedFunction _ i1) (SK_GeneratedFunction _ i2) = i1 =< i2
compare_indexes (SK_GeneratedCaseFunction _ i1) (SK_GeneratedCaseFunction _ i2) = i1 =< i2
compare_indexes (SK_LocalDclMacroFunction i1) (SK_LocalDclMacroFunction i2) = i1 =< i2 compare_indexes (SK_LocalDclMacroFunction i1) (SK_LocalDclMacroFunction i2) = i1 =< i2
| less_constructor symb1 symb2 | less_constructor symb1 symb2
......
...@@ -1095,7 +1095,7 @@ newFunctionWithType opt_id fun_bodies local_vars fun_type group_index (cs_next_f ...@@ -1095,7 +1095,7 @@ newFunctionWithType opt_id fun_bodies local_vars fun_type group_index (cs_next_f
, fun_lifted = 0 , fun_lifted = 0
, fun_info = { EmptyFunInfo & fi_group_index = group_index, fi_local_vars = local_vars } , fun_info = { EmptyFunInfo & fi_group_index = group_index, fi_local_vars = local_vars }
} }
= ({ symb_name = fun_id, symb_kind = SK_GeneratedFunction fun_def_ptr cs_next_fun_nr }, = ({ symb_name = fun_id, symb_kind = SK_GeneratedCaseFunction fun_def_ptr cs_next_fun_nr },
(inc cs_next_fun_nr, [fun_def_ptr : cs_new_functions], (inc cs_next_fun_nr, [fun_def_ptr : cs_new_functions],
cs_fun_heap <:= (fun_def_ptr, FI_Function { gf_fun_def = fun_def, gf_instance_info = II_Empty, cs_fun_heap <:= (fun_def_ptr, FI_Function { gf_fun_def = fun_def, gf_instance_info = II_Empty,
gf_fun_index = cs_next_fun_nr, gf_cons_args = {cc_size=0, cc_args = [], cc_linear_bits = [], cc_producer = False} }))) gf_fun_index = cs_next_fun_nr, gf_cons_args = {cc_size=0, cc_args = [], cc_linear_bits = [], cc_producer = False} })))
......
...@@ -696,6 +696,7 @@ cNonRecursiveAppl :== False ...@@ -696,6 +696,7 @@ cNonRecursiveAppl :== False
| SK_LocalDclMacroFunction !(Global Index) | SK_LocalDclMacroFunction !(Global Index)
| SK_OverloadedFunction !(Global Index) | SK_OverloadedFunction !(Global Index)
| SK_GeneratedFunction !FunctionInfoPtr !Index | SK_GeneratedFunction !FunctionInfoPtr !Index
| SK_GeneratedCaseFunction !FunctionInfoPtr !Index
| SK_Constructor !(Global Index) | SK_Constructor !(Global Index)
| SK_Generic !(Global Index) !TypeKind | SK_Generic !(Global Index) !TypeKind
| SK_TypeCode | SK_TypeCode
......
...@@ -666,6 +666,7 @@ cNotVarNumber :== -1 ...@@ -666,6 +666,7 @@ cNotVarNumber :== -1
| SK_LocalDclMacroFunction !(Global Index) | SK_LocalDclMacroFunction !(Global Index)
| SK_OverloadedFunction !(Global Index) | SK_OverloadedFunction !(Global Index)
| SK_GeneratedFunction !FunctionInfoPtr !Index | SK_GeneratedFunction !FunctionInfoPtr !Index
| SK_GeneratedCaseFunction !FunctionInfoPtr !Index
| SK_Constructor !(Global Index) | SK_Constructor !(Global Index)
| SK_Generic !(Global Index) !TypeKind | SK_Generic !(Global Index) !TypeKind
| SK_TypeCode | SK_TypeCode
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment