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
777c3dbf
Commit
777c3dbf
authored
Jan 09, 2003
by
John van Groningen
Browse files
fix label names for unboxed lists of records with dynamics
parent
3e7a6df3
Changes
3
Hide whitespace changes
Inline
Side-by-side
backendC/CleanCompilerSources/codegen1.c
View file @
777c3dbf
...
...
@@ -1179,12 +1179,17 @@ void GenerateCodeForLazyUnboxedRecordListFunctions (void)
type_node_arguments_p
=
fun_def
->
sdef_rule_type
->
rule_type_rule
->
type_alt_lhs
->
type_node_arguments
;
tail_strict
=
type_node_arguments_p
->
type_arg_next
->
type_arg_node
->
type_node_symbol
->
symb_tail_strictness
;
unboxed_record_cons_lab
.
lab_mod
=
ExportLocalLabels
?
CurrentModule
:
NULL
;
if
(
ExportLocalLabels
){
unboxed_record_cons_lab
.
lab_mod
=
CurrentModule
;
unboxed_record_cons_lab
.
lab_symbol
=
type_node_arguments_p
->
type_arg_node
->
type_node_symbol
->
symb_def
;
unboxed_record_cons_lab
.
lab_issymbol
=
True
;
}
else
{
unboxed_record_cons_lab
.
lab_name
=
type_node_arguments_p
->
type_arg_node
->
type_node_symbol
->
symb_def
->
sdef_ident
->
ident_name
;
unboxed_record_cons_lab
.
lab_issymbol
=
False
;
}
unboxed_record_cons_lab
.
lab_pref
=
tail_strict
?
"r_Cons#!"
:
"r_Cons#"
;
unboxed_record_cons_lab
.
lab_issymbol
=
False
;
unboxed_record_cons_lab
.
lab_name
=
type_node_arguments_p
->
type_arg_node
->
type_node_symbol
->
symb_def
->
sdef_ident
->
ident_name
;
unboxed_record_cons_lab
.
lab_post
=
'\0'
;
GenFillR
(
&
unboxed_record_cons_lab
,
a_size
,
b_size
,
a_size
,
0
,
0
,
ReleaseAndFill
,
True
);
GenRtn
(
1
,
0
,
OnAState
);
...
...
@@ -2386,8 +2391,6 @@ SymbDef create_match_function (SymbolP constructor_symbol,int constructor_arity,
#if STRICT_LISTS
if
(
constructor_symbol
->
symb_kind
==
cons_symb
&&
(
constructor_symbol
->
symb_head_strictness
>
1
||
constructor_symbol
->
symb_tail_strictness
)){
constructor_symbol
->
symb_def
->
sdef_constructor
->
cl_state_p
;
if
(
constructor_symbol
->
symb_head_strictness
>
1
){
if
(
constructor_symbol
->
symb_head_strictness
==
4
)
head_and_tail_states
[
0
]
=*
constructor_symbol
->
symb_state_p
;
...
...
backendC/CleanCompilerSources/codegen2.c
View file @
777c3dbf
...
...
@@ -2879,10 +2879,15 @@ LabDef *unboxed_cons_label (SymbolP cons_symbol_p)
if
(
cons_symbol_p
->
symb_unboxed_cons_state_p
->
state_type
==
SimpleState
&&
BETWEEN
(
IntObj
,
FileObj
,
cons_symbol_p
->
symb_unboxed_cons_state_p
->
state_object
))
return
&
unboxed_cons_labels
[
cons_symbol_p
->
symb_unboxed_cons_state_p
->
state_object
-
IntObj
][
cons_symbol_p
->
symb_tail_strictness
];
else
if
(
cons_symbol_p
->
symb_unboxed_cons_state_p
->
state_type
==
RecordState
){
unboxed_record_cons_lab
.
lab_mod
=
ExportLocalLabels
?
CurrentModule
:
NULL
;
if
(
ExportLocalLabels
){
unboxed_record_cons_lab
.
lab_mod
=
CurrentModule
;
unboxed_record_cons_lab
.
lab_symbol
=
cons_symbol_p
->
symb_unboxed_cons_state_p
->
state_record_symbol
;
unboxed_record_cons_lab
.
lab_issymbol
=
True
;
}
else
{
unboxed_record_cons_lab
.
lab_name
=
cons_symbol_p
->
symb_unboxed_cons_state_p
->
state_record_symbol
->
sdef_ident
->
ident_name
;
unboxed_record_cons_lab
.
lab_issymbol
=
False
;
}
unboxed_record_cons_lab
.
lab_pref
=
cons_symbol_p
->
symb_tail_strictness
?
"r_Cons#!"
:
"r_Cons#"
;
unboxed_record_cons_lab
.
lab_issymbol
=
False
;
unboxed_record_cons_lab
.
lab_name
=
cons_symbol_p
->
symb_unboxed_cons_state_p
->
state_record_symbol
->
sdef_ident
->
ident_name
;
unboxed_record_cons_lab
.
lab_post
=
'\0'
;
return
&
unboxed_record_cons_lab
;
...
...
backendC/CleanCompilerSources/instructions.c
View file @
777c3dbf
...
...
@@ -2812,7 +2812,10 @@ void GenUnboxedConsRecordDescriptor (SymbDef sdef,int tail_strict)
DetermineSizeOfState
(
tuple_state
,
&
asize
,
&
bsize
);
FPrintF
(
OutFile
,
tail_strict
?
" %d %d
\"
[#%s!]
\"
"
:
" %d %d
\"
[#%s]
\"
"
,
asize
,
bsize
,
name
);
if
(
ExportLocalLabels
)
FPrintF
(
OutFile
,
tail_strict
?
" %d %d
\"
_Cons#!%s
\"
"
:
" %d %d
\"
_Cons#
\"
"
,
asize
,
bsize
,
name
);
else
FPrintF
(
OutFile
,
tail_strict
?
" %d %d
\"
[#%s!]
\"
"
:
" %d %d
\"
[#%s]
\"
"
,
asize
,
bsize
,
name
);
}
#endif
...
...
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