Commit 5c5c09b4 authored by Ronny Wichers Schreur's avatar Ronny Wichers Schreur 🏢
Browse files

removed RWS comments

parent 875f31ca
...@@ -264,9 +264,7 @@ where ...@@ -264,9 +264,7 @@ where
# alg_patterns = [{ ap_symbol = cons_symbol, ap_vars = var_args, ap_expr = result_expr, ap_position = pattern_position }] # alg_patterns = [{ ap_symbol = cons_symbol, ap_vars = var_args, ap_expr = result_expr, ap_position = pattern_position }]
# (case_guards,expr_heap,cs) = make_case_guards cons_symbol type_symbol alg_patterns expr_heap cs # (case_guards,expr_heap,cs) = make_case_guards cons_symbol type_symbol alg_patterns expr_heap cs
= (Case { case_expr = act_var, case_guards = case_guards, case_default = No, case_ident = No, = (Case { case_expr = act_var, case_guards = case_guards, case_default = No, case_ident = No,
// RWS ...
case_explicit = cCaseNotExplicit, case_explicit = cCaseNotExplicit,
// ... RWS
case_info_ptr = case_expr_ptr, case_default_pos = NoPos }, case_info_ptr = case_expr_ptr, case_default_pos = NoPos },
NoPos, var_store, expr_heap, opt_dynamics, cs) NoPos, var_store, expr_heap, opt_dynamics, cs)
transform_pattern_into_cases (AP_Basic basic_val opt_var) fun_arg result_expr pattern_position var_store expr_heap opt_dynamics cs transform_pattern_into_cases (AP_Basic basic_val opt_var) fun_arg result_expr pattern_position var_store expr_heap opt_dynamics cs
...@@ -274,10 +272,8 @@ where ...@@ -274,10 +272,8 @@ where
(act_var, result_expr, expr_heap) = transform_pattern_variable fun_arg opt_var result_expr expr_heap (act_var, result_expr, expr_heap) = transform_pattern_variable fun_arg opt_var result_expr expr_heap
case_guards = BasicPatterns basic_type [{ bp_value = basic_val, bp_expr = result_expr, bp_position = pattern_position }] case_guards = BasicPatterns basic_type [{ bp_value = basic_val, bp_expr = result_expr, bp_position = pattern_position }]
(case_expr_ptr, expr_heap) = newPtr EI_Empty expr_heap (case_expr_ptr, expr_heap) = newPtr EI_Empty expr_heap
= (Case { case_expr = act_var, case_guards = case_guards, case_default = No, case_ident = No, = (Case { case_expr = act_var, case_guards = case_guards, case_default = No, case_ident = No,
// RWS ... case_explicit = cCaseNotExplicit,
case_explicit = cCaseNotExplicit,
// ... RWS
case_info_ptr = case_expr_ptr, case_default_pos = NoPos }, case_info_ptr = case_expr_ptr, case_default_pos = NoPos },
NoPos, var_store, expr_heap, opt_dynamics, cs) NoPos, var_store, expr_heap, opt_dynamics, cs)
transform_pattern_into_cases (AP_Dynamic pattern type opt_var) fun_arg result_expr pattern_position var_store expr_heap opt_dynamics cs transform_pattern_into_cases (AP_Dynamic pattern type opt_var) fun_arg result_expr pattern_position var_store expr_heap opt_dynamics cs
...@@ -370,9 +366,7 @@ where ...@@ -370,9 +366,7 @@ where
basic_pattern = {bp_value = (BVB True), bp_expr = expr, bp_position = NoPos } basic_pattern = {bp_value = (BVB True), bp_expr = expr, bp_position = NoPos }
case_expr = Case { case_expr = guard, case_guards = BasicPatterns BT_Bool [basic_pattern], case_expr = Case { case_expr = guard, case_guards = BasicPatterns BT_Bool [basic_pattern],
case_default = result_expr, case_ident = Yes guard_ident, case_default = result_expr, case_ident = Yes guard_ident,
// RWS ...
case_explicit = cCaseNotExplicit, case_explicit = cCaseNotExplicit,
// ... RWS
case_info_ptr = case_expr_ptr, case_default_pos = NoPos } case_info_ptr = case_expr_ptr, case_default_pos = NoPos }
= build_sequential_lets let_binds case_expr NoPos es_expr_heap = build_sequential_lets let_binds case_expr NoPos es_expr_heap
convert_guards_to_cases [(let_binds, guard, expr, guard_ident) : rev_guarded_exprs] result_expr es_expr_heap convert_guards_to_cases [(let_binds, guard, expr, guard_ident) : rev_guarded_exprs] result_expr es_expr_heap
...@@ -380,9 +374,7 @@ where ...@@ -380,9 +374,7 @@ where
basic_pattern = {bp_value = (BVB True), bp_expr = expr, bp_position = NoPos } basic_pattern = {bp_value = (BVB True), bp_expr = expr, bp_position = NoPos }
case_expr = Case { case_expr = guard, case_guards = BasicPatterns BT_Bool [basic_pattern], case_expr = Case { case_expr = guard, case_guards = BasicPatterns BT_Bool [basic_pattern],
case_default = result_expr, case_ident = Yes guard_ident, case_default = result_expr, case_ident = Yes guard_ident,
// RWS ...
case_explicit = cCaseNotExplicit, case_explicit = cCaseNotExplicit,
// ... RWS
case_info_ptr = case_expr_ptr, case_default_pos = NoPos } case_info_ptr = case_expr_ptr, case_default_pos = NoPos }
(_, result_expr, es_expr_heap) = build_sequential_lets let_binds case_expr NoPos es_expr_heap (_, result_expr, es_expr_heap) = build_sequential_lets let_binds case_expr NoPos es_expr_heap
= convert_guards_to_cases rev_guarded_exprs (Yes result_expr) es_expr_heap = convert_guards_to_cases rev_guarded_exprs (Yes result_expr) es_expr_heap
...@@ -947,26 +939,20 @@ where ...@@ -947,26 +939,20 @@ where
(bound_var, expr_heap) = allocate_bound_var var expr_heap (bound_var, expr_heap) = allocate_bound_var var expr_heap
result = Case {case_expr = Var bound_var, case_guards = patterns, case_default = Yes result, result = Case {case_expr = Var bound_var, case_guards = patterns, case_default = Yes result,
case_ident = Yes case_ident, case_info_ptr = case_expr_ptr, case_ident = Yes case_ident, case_info_ptr = case_expr_ptr,
// RWS ... case_explicit = explicit,
case_explicit = explicit,
// ... RWS
case_default_pos = NoPos } case_default_pos = NoPos }
(case_expression, expr_heap) = bind_default_variable expr var result expr_heap (case_expression, expr_heap) = bind_default_variable expr var result expr_heap
-> (case_expression, expr_heap) -> (case_expression, expr_heap)
No No
# (case_expr_ptr, expr_heap) = newPtr EI_Empty expr_heap # (case_expr_ptr, expr_heap) = newPtr EI_Empty expr_heap
-> (Case {case_expr = expr, case_guards = patterns, case_default = Yes result, -> (Case {case_expr = expr, case_guards = patterns, case_default = Yes result,
// RWS ... case_explicit = explicit,
case_explicit = explicit, case_ident = Yes case_ident, case_info_ptr = case_expr_ptr, case_default_pos = NoPos }, expr_heap)
// ... RWS
case_ident = Yes case_ident, case_info_ptr = case_expr_ptr, case_default_pos = NoPos }, expr_heap)
build_case patterns No expr case_ident explicit expr_heap build_case patterns No expr case_ident explicit expr_heap
# (case_expr_ptr, expr_heap) = newPtr EI_Empty expr_heap # (case_expr_ptr, expr_heap) = newPtr EI_Empty expr_heap
= (Case {case_expr = expr, case_guards = patterns, case_default = No, case_ident = Yes case_ident, = (Case {case_expr = expr, case_guards = patterns, case_default = No, case_ident = Yes case_ident,
// RWS ... case_explicit = explicit,
case_explicit = explicit, case_info_ptr = case_expr_ptr, case_default_pos = NoPos }, expr_heap)
// ... RWS
case_info_ptr = case_expr_ptr, case_default_pos = NoPos }, expr_heap)
bind_default_variable lb_src lb_dst result_expr expr_heap bind_default_variable lb_src lb_dst result_expr expr_heap
# (let_expr_ptr, expr_heap) = newPtr EI_Empty expr_heap # (let_expr_ptr, expr_heap) = newPtr EI_Empty expr_heap
...@@ -1741,9 +1727,7 @@ convertSubPattern (AP_Algebraic cons_symbol type_index args opt_var) result_expr ...@@ -1741,9 +1727,7 @@ convertSubPattern (AP_Algebraic cons_symbol type_index args opt_var) result_expr
= ({ fv_name = bind_src, fv_info_ptr = bind_dst, fv_def_level = NotALevel, fv_count = 0 }, = ({ fv_name = bind_src, fv_info_ptr = bind_dst, fv_def_level = NotALevel, fv_count = 0 },
Case { case_expr = Var { var_name = bind_src, var_info_ptr = bind_dst, var_expr_ptr = var_expr_ptr }, Case { case_expr = Var { var_name = bind_src, var_info_ptr = bind_dst, var_expr_ptr = var_expr_ptr },
case_guards = case_guards, case_default = No, case_ident = No, case_info_ptr = case_expr_ptr, case_guards = case_guards, case_default = No, case_ident = No, case_info_ptr = case_expr_ptr,
// RWS ...
case_explicit = cCaseNotExplicit, case_explicit = cCaseNotExplicit,
// ... RWS
case_default_pos = NoPos }, case_default_pos = NoPos },
NoPos, var_store, expr_heap, opt_dynamics, cs) NoPos, var_store, expr_heap, opt_dynamics, cs)
convertSubPattern (AP_Basic basic_val opt_var) result_expr pattern_position var_store expr_heap opt_dynamics cs convertSubPattern (AP_Basic basic_val opt_var) result_expr pattern_position var_store expr_heap opt_dynamics cs
...@@ -1755,9 +1739,7 @@ convertSubPattern (AP_Basic basic_val opt_var) result_expr pattern_position var_ ...@@ -1755,9 +1739,7 @@ convertSubPattern (AP_Basic basic_val opt_var) result_expr pattern_position var_
= ({ fv_name = bind_src, fv_info_ptr = bind_dst, fv_def_level = NotALevel, fv_count = 0 }, = ({ fv_name = bind_src, fv_info_ptr = bind_dst, fv_def_level = NotALevel, fv_count = 0 },
Case { case_expr = Var { var_name = bind_src, var_info_ptr = bind_dst, var_expr_ptr = var_expr_ptr }, Case { case_expr = Var { var_name = bind_src, var_info_ptr = bind_dst, var_expr_ptr = var_expr_ptr },
case_guards = case_guards, case_default = No, case_ident = No, case_info_ptr = case_expr_ptr, case_guards = case_guards, case_default = No, case_ident = No, case_info_ptr = case_expr_ptr,
// RWS ... case_explicit = cCaseNotExplicit,
case_explicit = cCaseNotExplicit,
// ... RWS
case_default_pos = NoPos}, case_default_pos = NoPos},
NoPos, var_store, expr_heap, opt_dynamics, cs) NoPos, var_store, expr_heap, opt_dynamics, cs)
convertSubPattern (AP_Dynamic pattern type opt_var) result_expr pattern_position var_store expr_heap opt_dynamics cs convertSubPattern (AP_Dynamic pattern type opt_var) result_expr pattern_position var_store expr_heap opt_dynamics cs
...@@ -2334,9 +2316,7 @@ typeOfBasicValue (BVS _) cs ...@@ -2334,9 +2316,7 @@ typeOfBasicValue (BVS _) cs
buildTypeCase type_case_dynamic type_case_patterns type_case_default type_case_info_ptr case_explicit :== buildTypeCase type_case_dynamic type_case_patterns type_case_default type_case_info_ptr case_explicit :==
Case { case_expr = type_case_dynamic, case_guards = DynamicPatterns type_case_patterns, case_default = type_case_default, Case { case_expr = type_case_dynamic, case_guards = DynamicPatterns type_case_patterns, case_default = type_case_default,
case_info_ptr = type_case_info_ptr, case_ident = No, case_default_pos = NoPos, case_info_ptr = type_case_info_ptr, case_ident = No, case_default_pos = NoPos,
// RWS ... case_explicit = case_explicit
case_explicit = case_explicit
// ... RWS
} }
......
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