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
a2ebe4df
Commit
a2ebe4df
authored
Jun 19, 2003
by
Ronny Wichers Schreur
🏘
Browse files
s/sd__ident/sd_ident/g
parent
d7318ae6
Changes
9
Show whitespace changes
Inline
Side-by-side
backend/backendconvert.icl
View file @
a2ebe4df
...
...
@@ -414,13 +414,13 @@ backEndConvertModulesH predefs {fe_icl =
, "dcl constructors"
, [constructor.cons_ident.id_name \\ constructor <-: currentDcl.dcl_common.com_cons_defs]
, "dcl selectors"
, [selector.sd_
_
ident.id_name \\ selector <-: currentDcl.dcl_common.com_selector_defs]
, [selector.sd_ident.id_name \\ selector <-: currentDcl.dcl_common.com_selector_defs]
, "dcl types"
, [type.td_ident.id_name \\ type <-: currentDcl.dcl_common.com_type_defs]
, "icl constructors"
, [constructor.cons_ident.id_name \\ constructor <-: icl_common.com_cons_defs]
, "icl selectors"
, [selector.sd_
_
ident.id_name \\ selector <-: icl_common.com_selector_defs]
, [selector.sd_ident.id_name \\ selector <-: icl_common.com_selector_defs]
, "icl types"
, [type.td_ident.id_name \\ type <-: icl_common.com_type_defs]
)
...
...
@@ -875,7 +875,7 @@ convertSelectors moduleIndex selectors symbols strictness
convertSelector
::
ModuleIndex
{#
SelectorDef
}
Bool
FieldSymbol
->
BEMonad
BEFieldListP
convertSelector
moduleIndex
selectorDefs
is_strict
{
fs_index
}
=
\
be0
->
let
(
selectorType
,
be
)
=
selectorTypeFunction
be0
in
(
appBackEnd
(
BEDeclareField
fs_index
moduleIndex
selectorDef
.
sd_
_
ident
.
id_name
)
(
appBackEnd
(
BEDeclareField
fs_index
moduleIndex
selectorDef
.
sd_ident
.
id_name
)
o`
beField
fs_index
moduleIndex
(
convertAnnotAndTypeNode
(
if
is_strict
AN_Strict
AN_None
)
(
selectorType
.
st_result
)))
be
where
selectorDef
...
...
frontend/check.icl
View file @
a2ebe4df
...
...
@@ -1281,8 +1281,8 @@ where
=
(
inc
decl_index
,
[
Declaration
{
decl_ident
=
td_ident
,
decl_pos
=
td_pos
,
decl_kind
=
STE_Type
,
decl_index
=
decl_index
}
:
decls
])
cons_def_to_dcl
{
cons_ident
,
cons_pos
}
(
decl_index
,
decls
)
=
(
inc
decl_index
,
[
Declaration
{
decl_ident
=
cons_ident
,
decl_pos
=
cons_pos
,
decl_kind
=
STE_Constructor
,
decl_index
=
decl_index
}
:
decls
])
selector_def_to_dcl
{
sd_
_
ident
,
sd_field
,
sd_pos
}
(
decl_index
,
decls
)
=
(
inc
decl_index
,
[
Declaration
{
decl_ident
=
sd_field
,
decl_pos
=
sd_pos
,
decl_kind
=
STE_Field
sd_
_
ident
,
decl_index
=
decl_index
}
:
decls
])
selector_def_to_dcl
{
sd_ident
,
sd_field
,
sd_pos
}
(
decl_index
,
decls
)
=
(
inc
decl_index
,
[
Declaration
{
decl_ident
=
sd_field
,
decl_pos
=
sd_pos
,
decl_kind
=
STE_Field
sd_ident
,
decl_index
=
decl_index
}
:
decls
])
class_def_to_dcl
{
class_ident
,
class_pos
}
(
decl_index
,
decls
)
=
(
inc
decl_index
,
[
Declaration
{
decl_ident
=
class_ident
,
decl_pos
=
class_pos
,
decl_kind
=
STE_Class
,
decl_index
=
decl_index
}
:
decls
])
member_def_to_dcl
{
me_ident
,
me_pos
}
(
decl_index
,
decls
)
...
...
@@ -1468,7 +1468,7 @@ renumber_icl_definitions_as_dcl_definitions (Yes icl_to_dcl_index_table) icl_siz
{
td_ident
=
dummy_ident
,
td_index
=
-1
,
td_arity
=
0
,
td_args
=[],
td_attrs
=[],
td_context
=[],
td_rhs
=
UnknownType
,
td_attribute
=
TA_None
,
td_pos
=
NoPos
,
td_used_types
=[]}
#
dummy_symbol_type
={
st_vars
=[],
st_args
=[],
st_args_strictness
=
NotStrict
,
st_arity
=
0
,
st_result
={
at_attribute
=
TA_None
,
at_type
=
TE
},
st_context
=[],
st_attr_vars
=[],
st_attr_env
=[]}
#
com_selector_defs
=
reorder_and_enlarge_array
com_selector_defs
n_dictionary_selectors
icl_to_dcl_index_table
.[
cSelectorDefs
]
{
sd_
_
ident
=
dummy_ident
,
sd_field
=
dummy_ident
,
sd_type
=
dummy_symbol_type
,
sd_exi_vars
=[],
sd_field_nr
=
0
,
sd_type_index
=
0
,
sd_type_ptr
=
nilPtr
,
sd_pos
=
NoPos
}
{
sd_ident
=
dummy_ident
,
sd_field
=
dummy_ident
,
sd_type
=
dummy_symbol_type
,
sd_exi_vars
=[],
sd_field_nr
=
0
,
sd_type_index
=
0
,
sd_type_ptr
=
nilPtr
,
sd_pos
=
NoPos
}
#
com_cons_defs
=
reorder_and_enlarge_array
com_cons_defs
n_dictionary_constructors
icl_to_dcl_index_table
.[
cConstructorDefs
]
{
cons_ident
=
dummy_ident
,
cons_type
=
dummy_symbol_type
,
cons_arg_vars
=[],
cons_priority
=
NoPrio
,
cons_index
=
-1
,
cons_type_index
=
-1
,
cons_exi_vars
=[],
cons_type_ptr
=
nilPtr
,
cons_pos
=
NoPos
}
#
com_class_defs
=
reorder_array
com_class_defs
icl_to_dcl_index_table
.[
cClassDefs
]
...
...
@@ -2941,11 +2941,11 @@ addImportedSymbolsToSymbolTable importing_mod opt_macro_range modules_in_compone
=
([],
dcl_modules
,
cs
)
add_field
importing_mod
mod_index
{
fs_index
}
(
declarations_accu
,
dcl_modules
,
cs
)
#
(
sd
=:{
sd_
_
ident
,
sd_field
,
sd_pos
},
dcl_modules
)
#
(
sd
=:{
sd_ident
,
sd_field
,
sd_pos
},
dcl_modules
)
=
dcl_modules
![
mod_index
].
dcl_common
.
com_selector_defs
.[
fs_index
]
declaration
=
Declaration
{
decl_ident
=
sd_field
,
decl_pos
=
sd_pos
,
decl_kind
=
STE_Imported
(
STE_Field
sd_
_
ident
)
mod_index
,
decl_index
=
fs_index
}
decl_kind
=
STE_Imported
(
STE_Field
sd_ident
)
mod_index
,
decl_index
=
fs_index
}
(
is_new
,
cs
)
=
add_declaration_to_symbol_table
No
declaration
importing_mod
cs
|
is_new
...
...
frontend/checksupport.icl
View file @
a2ebe4df
...
...
@@ -619,7 +619,7 @@ where
instance
toIdent
SelectorDef
where
toIdent
sd
=
sd
.
sd_
_
ident
toIdent
sd
=
sd
.
sd_ident
/*
instance toIdent DeltaRule
...
...
frontend/checktypes.icl
View file @
a2ebe4df
...
...
@@ -1491,7 +1491,7 @@ where
(
sd_type_ptr
,
var_heap
)
=
newPtr
VI_Empty
var_heap
field_id
=
{
id_name
=
field_name
,
id_info
=
id_info
}
sel_def
=
{
sd_
_
ident
=
field_id
{
sd_ident
=
field_id
,
sd_field
=
field_id
,
sd_type
=
{
st_vars
=
[],
st_args
=
[
rec_type
],
st_args_strictness
=
Strict
1
,
st_result
=
field_type
,
st_arity
=
1
,
st_context
=
[],
st_attr_vars
=
[],
st_attr_env
=
[]
}
...
...
frontend/comparedefimp.icl
View file @
a2ebe4df
...
...
@@ -614,8 +614,8 @@ instance getIdentPos ConsDef where
=
newPosition
cons_ident
cons_pos
instance
getIdentPos
SelectorDef
where
getIdentPos
{
sd_
_
ident
,
sd_pos
}
=
newPosition
sd_
_
ident
sd_pos
getIdentPos
{
sd_ident
,
sd_pos
}
=
newPosition
sd_ident
sd_pos
instance
getIdentPos
ClassDef
where
getIdentPos
{
class_ident
,
class_pos
}
...
...
frontend/convertimportedtypes.icl
View file @
a2ebe4df
...
...
@@ -49,7 +49,7 @@ convertSelectorTypes selector_defs main_dcl_module_n common_defs types_and_heaps
=
iFoldSt
(
convert_selector_type
common_defs
selector_defs
)
0
(
size
selector_defs
)
types_and_heaps
where
convert_selector_type
common_defs
selector_defs
sel_index
(
imported_types
,
imported_conses
,
var_heap
,
type_heaps
)
#!{
sd_type_ptr
,
sd_type
,
sd_
_
ident
}
=
selector_defs
.[
sel_index
]
#!{
sd_type_ptr
,
sd_type
,
sd_ident
}
=
selector_defs
.[
sel_index
]
(
sd_type
,
imported_types
,
imported_conses
,
type_heaps
,
var_heap
)
=
convertSymbolType
cDontRemoveAnnotations
common_defs
sd_type
main_dcl_module_n
imported_types
imported_conses
type_heaps
var_heap
=
(
imported_types
,
imported_conses
,
var_heap
<:=
(
sd_type_ptr
,
VI_ExpandedType
sd_type
),
type_heaps
)
...
...
@@ -124,7 +124,7 @@ where
where
convert_type_of_imported_field
module_index
selector_defs
fields
field_index
(
imported_types
,
conses
,
type_heaps
,
var_heap
)
#!
field_index
=
fields
.[
field_index
].
fs_index
{
sd_type_ptr
,
sd_type
,
sd_
_
ident
}
=
selector_defs
.[
field_index
]
{
sd_type_ptr
,
sd_type
,
sd_ident
}
=
selector_defs
.[
field_index
]
(
sd_type
,
imported_types
,
conses
,
type_heaps
,
var_heap
)
=
convertSymbolType
cDontRemoveAnnotations
common_defs
sd_type
main_dcl_module_n
imported_types
conses
type_heaps
var_heap
=
(
imported_types
,
conses
,
type_heaps
,
var_heap
<:=
(
sd_type_ptr
,
VI_ExpandedType
sd_type
))
frontend/explicitimports.icl
View file @
a2ebe4df
...
...
@@ -229,10 +229,10 @@ solveExplicitImports expl_imp_indices_ikh modules_in_component_set importing_mod
decl_index
=
ds_index
},
dcl_modules
)
BS_Fields
rt_fields
#
{
fs_ident
,
fs_index
}
=
rt_fields
.[
belong_nr
]
({
sd_
_
ident
},
dcl_modules
)
({
sd_ident
},
dcl_modules
)
=
dcl_modules
![
def_mod_index
].
dcl_common
.
com_selector_defs
.[
fs_index
]
->
(
Declaration
{
decl_ident
=
fs_ident
,
decl_pos
=
position
,
decl_kind
=
STE_Imported
(
STE_Field
sd_
_
ident
)
def_mod_index
,
decl_kind
=
STE_Imported
(
STE_Field
sd_ident
)
def_mod_index
,
decl_index
=
fs_index
},
dcl_modules
)
BS_Members
class_members
#
{
ds_ident
,
ds_index
}
=
class_members
.[
belong_nr
]
...
...
frontend/syntax.dcl
View file @
a2ebe4df
...
...
@@ -839,7 +839,7 @@ cNonRecursiveAppl :== False
}
::
SelectorDef
=
{
sd_
_
ident
::
!
Ident
{
sd_ident
::
!
Ident
,
sd_field
::
!
Ident
,
sd_type
::
!
SymbolType
,
sd_exi_vars
::
![
ATypeVar
]
...
...
@@ -1406,7 +1406,7 @@ MakeTypeSymbIdent type_index name arity
:==
{
newTypeSymbIdentCAF
&
type_ident
=
name
,
type_arity
=
arity
,
type_index
=
type_index
}
ParsedSelectorToSelectorDef
sd_type_index
ps
:==
{
sd_
_
ident
=
ps
.
ps_selector_ident
,
sd_field_nr
=
NoIndex
,
sd_pos
=
ps
.
ps_field_pos
,
sd_type_index
=
sd_type_index
,
{
sd_ident
=
ps
.
ps_selector_ident
,
sd_field_nr
=
NoIndex
,
sd_pos
=
ps
.
ps_field_pos
,
sd_type_index
=
sd_type_index
,
sd_exi_vars
=
[],
sd_type_ptr
=
nilPtr
,
sd_field
=
ps
.
ps_field_ident
,
sd_type
=
{
st_vars
=
[],
st_args
=
[],
st_args_strictness
=
NotStrict
,
st_result
=
ps
.
ps_field_type
,
st_arity
=
0
,
st_context
=
[],
st_attr_env
=
[],
st_attr_vars
=
[]
}}
...
...
frontend/syntax.icl
View file @
a2ebe4df
...
...
@@ -735,7 +735,7 @@ where
instance
<<<
SelectorDef
where
(<<<)
file
{
sd_
_
ident
}
=
file
<<<
sd_
_
ident
(<<<)
file
{
sd_ident
}
=
file
<<<
sd_ident
instance
<<<
ClassDef
where
...
...
Write
Preview
Supports
Markdown
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