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
229880eb
Commit
229880eb
authored
Feb 22, 2001
by
Martin Wierich
Browse files
bugfix: explicit imports of instances did not work in conjunction with dcl
caching
parent
e6ba10e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
frontend/check.icl
View file @
229880eb
...
...
@@ -1928,6 +1928,14 @@ updateExplImpInfo super_components mod_index dcls_import dcls_local_for_import
dcl_modules
expl_imp_infos
cs_symbol_table
#
(
changed_symbols
,
(
expl_imp_infos
,
cs_symbol_table
))
=
mapSt
markExplImpSymbols
super_components
(
expl_imp_infos
,
cs_symbol_table
)
cs_symbol_table
=
switch_import_syntax
(
foldlArraySt
opt_store_instance_with_class_symbol
dcls_local_for_import
cs_symbol_table
)
cs_symbol_table
cs_symbol_table
=
switch_import_syntax
(
foldlArraySt
opt_store_instance_with_class_symbol
dcls_import
cs_symbol_table
)
cs_symbol_table
(
dcl_modules
,
expl_imp_infos
,
cs_symbol_table
)
=
foldlArraySt
(
update_expl_imp_for_marked_symbol
mod_index
)
dcls_local_for_import
(
dcl_modules
,
expl_imp_infos
,
cs_symbol_table
)
...
...
@@ -1939,6 +1947,16 @@ updateExplImpInfo super_components mod_index dcls_import dcls_local_for_import
changed_symbols
cs_symbol_table
=
(
dcl_modules
,
expl_imp_infos
,
cs_symbol_table
)
opt_store_instance_with_class_symbol
decl
=:{
dcl_kind
=
STE_Imported
(
STE_Instance
class_ident
)
_}
cs_symbol_table
/* This function is only for old import syntax.
All declared instances for a class have to be collected
*/
=
optStoreInstanceWithClassSymbol
decl
class_ident
cs_symbol_table
opt_store_instance_with_class_symbol
_
cs_symbol_table
=
cs_symbol_table
update_expl_imp_for_marked_symbol
mod_index
decl
=:{
dcl_ident
}
(
dcl_modules
,
expl_imp_infos
,
cs_symbol_table
)
#
(
ste
,
cs_symbol_table
)
=
readPtr
dcl_ident
.
id_info
cs_symbol_table
...
...
frontend/explicitimports.dcl
View file @
229880eb
...
...
@@ -19,6 +19,9 @@ markExplImpSymbols :: !Int !*(!*{!*{!u:ExplImpInfo}}, !*SymbolTable)
updateExplImpForMarkedSymbol
::
!
Index
!
Declaration
!
SymbolTableEntry
!
u
:{#
DclModule
}
!{!{!*
ExplImpInfo
}}
!*
SymbolTable
->
(!
u
:{#
DclModule
},
!{!{!.
ExplImpInfo
}},
!.
SymbolTable
)
optStoreInstanceWithClassSymbol
::
Declaration
!
Ident
!*
SymbolTable
->
.
SymbolTable
solveExplicitImports
::
!(
IntKeyHashtable
[(
Int
,
Position
,[
ImportNrAndIdents
])])
!{#
Int
}
!
Index
!*(!
v
:{#
DclModule
},!*{#
Int
},!{!*
ExplImpInfo
},!*
CheckState
)
->
(!.
SolvedImports
,!(!
v
:{#
DclModule
},!.{#
Int
},!{!.
ExplImpInfo
},!.
CheckState
))
...
...
frontend/explicitimports.icl
View file @
229880eb
...
...
@@ -70,16 +70,6 @@ updateExplImpForMarkedSymbol mod_index decl {ste_kind=STE_ExplImpComponentNrs co
dcl_modules
expl_imp_infos
cs_symbol_table
=
foldSt
(
addExplImpInfo
mod_index
decl
inst_indices
)
component_numbers
(
dcl_modules
,
expl_imp_infos
,
cs_symbol_table
)
updateExplImpForMarkedSymbol
_
decl
{
ste_kind
=
STE_Instance
class_ident
}
dcl_modules
expl_imp_infos
cs_symbol_table
// this alternative is only for old syntax (cs_symbol_table argument is not necessary for new syntax)
#
cs_symbol_table
=
optStoreInstanceWithClassSymbol
decl
class_ident
cs_symbol_table
=
(
dcl_modules
,
expl_imp_infos
,
cs_symbol_table
)
updateExplImpForMarkedSymbol
_
decl
{
ste_kind
=
STE_Imported
(
STE_Instance
class_ident
)
_}
dcl_modules
expl_imp_infos
cs_symbol_table
// this alternative is only for old syntax (cs_symbol_table argument is not necessary for new syntax)
#
cs_symbol_table
=
optStoreInstanceWithClassSymbol
decl
class_ident
cs_symbol_table
=
(
dcl_modules
,
expl_imp_infos
,
cs_symbol_table
)
updateExplImpForMarkedSymbol
_
_
entry
dcl_modules
expl_imp_infos
cs_symbol_table
=
(
dcl_modules
,
expl_imp_infos
,
cs_symbol_table
)
...
...
@@ -119,6 +109,7 @@ addExplImpInfo mod_index decl instances { cai_component_nr, cai_index } (dcl_mod
)
optStoreInstanceWithClassSymbol
::
Declaration
!
Ident
!*
SymbolTable
->
.
SymbolTable
optStoreInstanceWithClassSymbol
decl
class_ident
cs_symbol_table
// this function is only for old syntax
|
switch_import_syntax
False
True
...
...
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