Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-compiler-and-rts
compiler
Commits
25492b19
Commit
25492b19
authored
Nov 16, 2006
by
John van Groningen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename ea entry for record to eu, to prevent conflict with ea
entry for constructor with the same name as the record
parent
7f0f1dcc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
9 deletions
+20
-9
backendC/CleanCompilerSources/codegen1.c
backendC/CleanCompilerSources/codegen1.c
+10
-9
backendC/CleanCompilerSources/instructions.c
backendC/CleanCompilerSources/instructions.c
+9
-0
backendC/CleanCompilerSources/instructions.h
backendC/CleanCompilerSources/instructions.h
+1
-0
No files found.
backendC/CleanCompilerSources/codegen1.c
View file @
25492b19
...
...
@@ -51,6 +51,7 @@ char d_pref[] = "d";
char
n_pref
[]
=
"n"
;
char
ea_pref
[]
=
"ea"
;
char
eu_pref
[]
=
"eu"
;
char
l_pref
[]
=
"l"
;
char
s_pref
[]
=
"s"
;
...
...
@@ -890,7 +891,7 @@ static void GenerateConstructorDescriptorAndFunction (ConstructorList constructo
static
void
GenLazyRecordEntry
(
SymbDef
rdef
)
{
LabDef
record_label
,
d_label
,
e
a
_label
,
*
e
a
_label_p
;
LabDef
record_label
,
d_label
,
e
u
_label
,
*
e
u
_label_p
;
States
argstates
;
int
asp
,
bsp
,
arity
;
int
maxasize
,
asize
,
bsize
;
...
...
@@ -905,31 +906,31 @@ static void GenLazyRecordEntry (SymbDef rdef)
if
(
rdef
->
sdef_boxed_record
){
if
(
rdef
->
sdef_exported
){
GenExportE
a
Entry
(
rdef
);
MakeSymbolLabel
(
&
e
a
_label
,
CurrentModule
,
e
a
_pref
,
rdef
,
0
);
GenExportE
u
Entry
(
rdef
);
MakeSymbolLabel
(
&
e
u
_label
,
CurrentModule
,
e
u
_pref
,
rdef
,
0
);
}
else
{
MakeSymbolLabel
(
&
e
a
_label
,
NULL
,
e
a
_pref
,
rdef
,
0
);
MakeSymbolLabel
(
&
e
u
_label
,
NULL
,
e
u
_pref
,
rdef
,
0
);
}
e
a
_label_p
=&
e
a
_label
;
e
u
_label_p
=&
e
u
_label
;
}
else
e
a
_label_p
=
NULL
;
e
u
_label_p
=
NULL
;
if
(
DoTimeProfiling
)
GenPB
(
rdef
->
sdef_ident
->
ident_name
);
GenLazyRecordDescriptorAndExport
(
rdef
);
GenLazyRecordNodeEntryDirective
(
arity
,
&
d_label
,
e
a
_label_p
);
GenLazyRecordNodeEntryDirective
(
arity
,
&
d_label
,
e
u
_label_p
);
GenOAStackLayout
(
1
);
GenLabelDefinition
(
&
CurrentAltLabel
);
GenPushNode
(
ReduceError
,
asp
);
if
(
e
a
_label_p
!=
NULL
){
if
(
e
u
_label_p
!=
NULL
){
GenOAStackLayout
(
arity
+
1
);
if
(
DoTimeProfiling
)
GenPN
();
GenLabelDefinition
(
&
e
a
_label
);
GenLabelDefinition
(
&
e
u
_label
);
}
asize
=
0
;
...
...
backendC/CleanCompilerSources/instructions.c
View file @
25492b19
...
...
@@ -91,6 +91,7 @@ static void ConvertOptionsToString (char *optstring)
#define L_PREFIX "l"
#define EA_PREFIX "ea"
#define EU_PREFIX "eu"
#define S_PREFIX "s"
#define R_PREFIX "r"
...
...
@@ -2564,6 +2565,14 @@ void GenExportEaEntry (SymbDef sdef)
}
}
void
GenExportEuEntry
(
SymbDef
sdef
)
{
if
(
sdef
->
sdef_calledwithrootnode
){
put_directive_
(
Dexport
);
FPrintF
(
OutFile
,
"e_%s_"
EU_PREFIX
"%s"
,
CurrentModule
,
sdef
->
sdef_ident
->
ident_name
);
}
}
void
GenDAStackLayout
(
int
asize
)
{
if
(
DoStackLayout
){
...
...
backendC/CleanCompilerSources/instructions.h
View file @
25492b19
...
...
@@ -145,6 +145,7 @@ void GenExportRecord (SymbDef sdef);
void
GenExportFieldSelector
(
SymbDef
sdef
);
void
GenExportStrictAndEaEntry
(
SymbDef
sdef
);
void
GenExportEaEntry
(
SymbDef
sdef
);
void
GenExportEuEntry
(
SymbDef
sdef
);
void
GenDAStackLayout
(
int
asize
);
void
GenDStackLayoutOfStates
(
int
asize
,
int
bsize
,
int
n_states
,
StateP
state_p
);
...
...
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