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
c984b138
Commit
c984b138
authored
Jan 21, 2002
by
Martijn Vervoort
Browse files
bug fix: unused dynamics were not recursively removed from fi_dynamics
parent
2de3e767
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/transform.icl
View file @
c984b138
...
...
@@ -1492,6 +1492,8 @@ where
_
->
(
fun_defs
,
symbol_table
)
import
RWSDebug
expandMacrosInBody
::
[.
FunCall
]
CheckedBody
![
ExprInfoPtr
]
PredefSymbolsForTransform
*
ExpandState
->
([
FreeVar
],
Expression
,[
FreeVar
],[
FunCall
],![
ExprInfoPtr
],.
ExpandState
);
expandMacrosInBody
fi_calls
{
cb_args
,
cb_rhs
}
fi_dynamics
predef_symbols_for_transform
es
=:{
es_symbol_table
,
es_symbol_heap
,
es_fun_defs
,
es_macro_defs
}
#
(
prev_calls
,
fun_defs
,
macro_defs
,
es_symbol_table
)
...
...
@@ -1517,10 +1519,18 @@ where
=
case
expr_info
of
EI_UnmarkedDynamic
_
_
->
(
used_dynamics
,
symbol_heap
)
_
EI_Dynamic
opt_dyn_type
ptrs
#
(
new_ptrs
,
cos_symbol_heap
)
=
foldSt
collect_used_dynmic
ptrs
([],
cos_symbol_heap
)
#
cos_symbol_heap
=
writePtr
dyn_expr_ptr
(
EI_Dynamic
opt_dyn_type
new_ptrs
)
->
([
dyn_expr_ptr
:
used_dynamics
],
symbol_heap
)
EI_DynamicTypeWithVars
type_vars
dyn_type
ptrs
#
(
new_ptrs
,
cos_symbol_heap
)
=
foldSt
collect_used_dynmic
ptrs
([],
cos_symbol_heap
)
#
cos_symbol_heap
=
writePtr
dyn_expr_ptr
(
EI_DynamicTypeWithVars
type_vars
dyn_type
new_ptrs
)
->
(
used_dynamics
,
symbol_heap
)
expandCheckedAlternative
{
ca_rhs
,
ca_position
}
ei
#
(
ca_rhs
,
ei
)
=
expand
ca_rhs
ei
...
...
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