Skip to content
GitLab
Menu
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
bc1011b5
Commit
bc1011b5
authored
Aug 21, 2001
by
Vincent Zweije
Browse files
Partition generated functions into groups
parent
1dff6355
Changes
3
Hide whitespace changes
Inline
Side-by-side
frontend/frontend.icl
View file @
bc1011b5
...
...
@@ -207,8 +207,8 @@ frontEndInterface opts mod_ident dcl_modules functions_and_macros predef_symbols
= analyseGroups common_defs array_instances main_dcl_module_n (components -*-> "Analyse") fun_defs var_heap expression_heap
-> transformGroups cleanup_info main_dcl_module_n (components -*-> "Transform") fun_defs acc_args common_defs imported_funs dcl_types used_conses_in_dynamics type_def_infos var_heap type_heaps expression_heap
FS_online
# (fun_defs,var_heap,expression_heap
)
= supercompile dcl_mods main_dcl_module_n fun_defs var_heap expression_heap
# (fun_defs,var_heap,expression_heap
,supercompile_range) = supercompile dcl_mods main_dcl_module_n fun_defs var_heap expression_heap
# (components, fun_defs) = partitionateFunctions fun_defs [global_fun_range, icl_instances, icl_specials, generic_range, supercompile_range]
-> (components, fun_defs, dcl_types, used_conses_in_dynamics, var_heap, type_heaps, expression_heap)
FS_none
-> (components, fun_defs, dcl_types, used_conses_in_dynamics, var_heap, type_heaps, expression_heap)
...
...
sucl/supercompile.dcl
View file @
bc1011b5
...
...
@@ -27,4 +27,5 @@ supercompile ::
->
(
!*{#
FunDef
}
// fun_defs
,
!*
VarHeap
// var_heap
,
!*
ExpressionHeap
// expression_heap
,
IndexRange
// Range of newly generated functions (already existing functions are overwritten)
)
sucl/supercompile.icl
View file @
bc1011b5
...
...
@@ -20,10 +20,11 @@ supercompile ::
->
(
!*{#
FunDef
}
// fun_defs
,
!*
VarHeap
// var_heap
,
!*
ExpressionHeap
// expression_heap
,
IndexRange
// Range of newly generated functions (already existing functions are overwritten)
)
supercompile
dcl_mods
main_dcl_module_n
fun_defs0
var_heap
expression_heap
=
(
fundefs
4
,
var_heap`
,
expression_heap`
)
=
(
fundefs
5
,
var_heap`
,
expression_heap`
,
generated_range
)
where
// Determine defined functions
(
sucl_typerules
,
sucl_stricts
,
sucl_bodies
,
sucl_kinds
,
fun_defs1
)
=
cts_function
main_dcl_module_n
fun_defs0
// Determine exported functions
...
...
@@ -39,5 +40,8 @@ supercompile dcl_mods main_dcl_module_n fun_defs0 var_heap expression_heap
symredresults
=
fullsymred
fresh_symbols
sucl_module
// Create and fill new fundef array
(
expression_heap`
,
var_heap`
,
fundefs4
)
=
stc_funcdefs
dcl_mods
main_dcl_module_n
n_fun_defs
expression_heap
var_heap
symredresults
fun_defs3
// Determine which were the newly generated functions
(
newlimit
,
fundefs5
)
=
usize
fundefs4
generated_range
=
{
ir_from
=
n_fun_defs
,
ir_to
=
newlimit
}
mkglobal
gmod
gob
=
{
glob_module
=
gmod
,
glob_object
=
gob
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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