Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
e2d66af3
Commit
e2d66af3
authored
Jun 16, 2003
by
Artem Alimarine
Browse files
fixed bug with field indexes in StdGeneric
now sd_field_nr used instead of fs_index
parent
9e72ebd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/generics1.icl
View file @
e2d66af3
...
...
@@ -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
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment