Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-compiler-and-rts
compiler
Commits
5597ae38
Commit
5597ae38
authored
Feb 15, 2002
by
Ronny Wichers Schreur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initialise number for failing case label for each compile
parent
790a8ad5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
backendC/CleanCompilerSources/instructions.c
backendC/CleanCompilerSources/instructions.c
+11
-4
No files found.
backendC/CleanCompilerSources/instructions.c
View file @
5597ae38
...
...
@@ -1257,6 +1257,9 @@ extern Symbol UnboxedArrayFunctionSymbols [];
static
Label
ApplyLabel
;
static
StateS
ApplyState
;
#if CLEAN2
static
int
CaseFailNumber
;
#endif
extern
SymbDef
ApplyDef
;
/* from codegen2.c */
...
...
@@ -3391,9 +3394,9 @@ void GenNoMatchError (SymbDef sdef,int asp,int bsp,int string_already_generated)
}
#if CLEAN2
void
GenCaseNoMatchError
(
SymbDefP
case_def
,
int
asp
,
int
bsp
)
{
static
int
case_number
;
GenPopA
(
asp
);
GenPopB
(
bsp
);
...
...
@@ -3402,16 +3405,16 @@ void GenCaseNoMatchError (SymbDefP case_def,int asp,int bsp)
FPrintF
(
OutFile
,
"m_%s"
,
CurrentModule
);
put_instruction_b
(
pushD
);
FPrintF
(
OutFile
,
"case_fail%u"
,
c
ase
_n
umber
);
FPrintF
(
OutFile
,
"case_fail%u"
,
C
ase
FailN
umber
);
GenJmp
(
&
match_error_lab
);
put_directive_
(
Dstring
);
FPrintF
(
OutFile
,
"case_fail%u
\"
"
,
c
ase
_n
umber
);
FPrintF
(
OutFile
,
"case_fail%u
\"
"
,
C
ase
FailN
umber
);
PrintSymbolOfIdent
(
case_def
->
sdef_ident
,
case_def
->
sdef_line
,
OutFile
);
FPrintF
(
OutFile
,
"
\"
"
);
c
ase
_n
umber
++
;
C
ase
FailN
umber
++
;
}
#endif
...
...
@@ -3631,6 +3634,10 @@ void GenImpLib (char *lib_name)
void
InitInstructions
(
void
)
{
#if CLEAN2
CaseFailNumber
=
0
;
#endif
ABCFileName
=
NULL
;
SetUnaryState
(
&
ApplyState
,
StrictRedirection
,
UnknownObj
);
ApplyLabel
=
NULL
;
...
...
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