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
bfb99888
Commit
bfb99888
authored
Sep 05, 2001
by
John van Groningen
Browse files
moved function getBelongingSymbolsFromID from checksupport to explicitimports
moved function get_ident from checksupport to check
parent
03c6bc8d
Changes
4
Hide whitespace changes
Inline
Side-by-side
frontend/check.icl
View file @
bfb99888
...
...
@@ -1356,6 +1356,13 @@ checkDclModules imports_of_icl_mod dcl_modules icl_functions heaps cs=:{cs_symbo
=
foldSt
(
get_symbol
imp_decl
)
idents
state
get_expl_imp_symbol
imp_decl
state
=
get_symbol
imp_decl
(
get_ident
imp_decl
)
state
where
get_ident
::
!
ImportDeclaration
->
Ident
get_ident
(
ID_Function
{
ii_ident
})
=
ii_ident
get_ident
(
ID_Class
{
ii_ident
}
_)
=
ii_ident
get_ident
(
ID_Type
{
ii_ident
}
_)
=
ii_ident
get_ident
(
ID_Record
{
ii_ident
}
_)
=
ii_ident
get_ident
(
ID_Instance
class_ident
instance_ident
_)
=
instance_ident
get_symbol
imp_decl
ident
=:{
id_info
}
(
expl_imp_symbols_accu
,
nr_of_expl_imp_symbols
,
expl_imp_indices_accu
,
cs_symbol_table
)
#
(
ste
,
cs_symbol_table
)
...
...
frontend/checksupport.dcl
View file @
bfb99888
...
...
@@ -52,9 +52,7 @@ cConversionTableSize :== 9 // AA
::
CommonDefs
=
{
com_type_defs
::
!.{#
CheckedTypeDef
}
,
com_unexpanded_type_defs
::
!{#
CheckedTypeDef
}
,
com_cons_defs
::
!.{#
ConsDef
}
,
com_selector_defs
::
!.{#
SelectorDef
}
,
com_class_defs
::
!.{#
ClassDef
}
...
...
@@ -177,9 +175,6 @@ newFreeVariable :: !FreeVar ![FreeVar] ->(!Bool, ![FreeVar])
local_declaration_for_import
::
!
u
:
Declaration
.
Index
->
v
:
Declaration
,
[
u
<=
v
]
get_ident
::
!
ImportDeclaration
->
Ident
getBelongingSymbolsFromID
::
!
ImportDeclaration
->
Optional
[
ImportedIdent
]
::
BelongingSymbols
=
BS_Constructors
![
DefinedSymbol
]
|
BS_Fields
!{#
FieldSymbol
}
...
...
frontend/checksupport.icl
View file @
bfb99888
...
...
@@ -540,20 +540,6 @@ local_declaration_for_import decl=:(Declaration {decl_kind=STE_Imported _ _}) mo
local_declaration_for_import
decl
=:(
Declaration
declaration_record
=:{
decl_kind
})
module_n
=
Declaration
{
declaration_record
&
decl_kind
=
STE_Imported
decl_kind
module_n
}
get_ident
::
!
ImportDeclaration
->
Ident
get_ident
(
ID_Function
{
ii_ident
})
=
ii_ident
get_ident
(
ID_Class
{
ii_ident
}
_)
=
ii_ident
get_ident
(
ID_Type
{
ii_ident
}
_)
=
ii_ident
get_ident
(
ID_Record
{
ii_ident
}
_)
=
ii_ident
get_ident
(
ID_Instance
class_ident
instance_ident
_)
=
instance_ident
getBelongingSymbolsFromID
::
!
ImportDeclaration
->
Optional
[
ImportedIdent
]
getBelongingSymbolsFromID
(
ID_Class
_
x
)
=
x
getBelongingSymbolsFromID
(
ID_Type
_
x
)
=
x
getBelongingSymbolsFromID
(
ID_Record
_
x
)
=
x
getBelongingSymbolsFromID
_
=
No
class
toIdent
a
::
!
a
->
Ident
instance
toIdent
SymbIdent
...
...
frontend/explicitimports.icl
View file @
bfb99888
...
...
@@ -136,6 +136,12 @@ imp_decl_to_string (ID_OldSyntax idents) = "ID_OldSyntax "+++idents_to_string id
idents_to_string [{id_name}:l] = toString id_name+++","+++idents_to_string l
*/
getBelongingSymbolsFromID
::
!
ImportDeclaration
->
Optional
[
ImportedIdent
]
getBelongingSymbolsFromID
(
ID_Class
_
x
)
=
x
getBelongingSymbolsFromID
(
ID_Type
_
x
)
=
x
getBelongingSymbolsFromID
(
ID_Record
_
x
)
=
x
getBelongingSymbolsFromID
_
=
No
solveExplicitImports
::
!(
IntKeyHashtable
[(
Int
,
Position
,[
ImportNrAndIdents
])])
!{#
Int
}
!
Index
!*(!
v
:{#
DclModule
},!*{#
Int
},!{!*
ExplImpInfo
},!*
CheckState
)
->
(!.
SolvedImports
,!(!
v
:{#
DclModule
},!.{#
Int
},!{!.
ExplImpInfo
},!.
CheckState
))
...
...
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