aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralimarin2003-06-16 11:55:36 +0000
committeralimarin2003-06-16 11:55:36 +0000
commitf3a1b56b32baf88a38dd8879a641c877a9df1c02 (patch)
tree4594544929a12295b7307e4318b2732a4741e9de
parentremoved commented code (diff)
fixed bug with field indexes in StdGeneric
now sd_field_nr used instead of fs_index git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1347 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r--frontend/generics1.icl7
1 files changed, 5 insertions, 2 deletions
diff --git a/frontend/generics1.icl b/frontend/generics1.icl
index ef5e590..1b72f5e 100644
--- a/frontend/generics1.icl
+++ b/frontend/generics1.icl
@@ -608,6 +608,7 @@ where
, td_arity_expr
, num_conses_expr
, td_conses_expr
+ // TODO: module_name_expr
]
predefs heaps
@@ -719,7 +720,9 @@ where
build_field_dsc group_index cons_dsc_ds field_dsc_ds {fs_ident, fs_index} (modules, heaps)
# name_expr = makeStringExpr fs_ident.id_name
- # index_expr = makeIntExpr fs_index
+ # ({sd_field_nr}, modules)
+ = modules! [td_module].com_selector_defs.[fs_index]
+ # index_expr = makeIntExpr sd_field_nr
# (cons_expr, heaps) = buildFunApp main_module_index cons_dsc_ds [] heaps
# (body_expr, heaps)
= buildPredefConsApp PD_CGenericFieldDescriptor
@@ -1088,7 +1091,7 @@ where
= build_case_expr case_patterns heaps
// REC case
- build_case_field var body_expr heaps
+ build_case_rec var body_expr heaps
# pat = buildPredefConsPattern PD_ConsREC [var] body_expr predefs
# {pds_module, pds_def} = predefs.[PD_TypeREC]
# case_patterns = AlgebraicPatterns {glob_module = pds_module, glob_object = pds_def} [pat]