changed stackheight computation to top element size computation

changed some parameters
This commit is contained in:
eck 1990-09-04 17:19:04 +00:00
parent 5badcb4296
commit 5c85d84228
5 changed files with 12 additions and 12 deletions

View file

@ -71,7 +71,7 @@ iocc_t iops[20];
%token TESTS %token TESTS
%token STACKINGRULES COERCIONS %token STACKINGRULES COERCIONS
%token INSTRUCTIONS %token INSTRUCTIONS
%token STACKHEIGHT FALLTHROUGH LABELDEF %token TOPELTSIZE FALLTHROUGH LABELDEF
%token PROC CALL EXAMPLE %token PROC CALL EXAMPLE
%token FROM TO %token FROM TO
%token TEST MOVE STACK RETURN %token TEST MOVE STACK RETURN
@ -846,7 +846,7 @@ gen_instruction
| TEST tokeninstance | TEST tokeninstance
{ $$ = gen_test($2);} { $$ = gen_test($2);}
| LABELDEF emarg | LABELDEF emarg
{ $$ = gen_label($2-1); use_shc++; } { $$ = gen_label($2-1); use_tes++; }
| RETURN | RETURN
{ $$ = gen_preturn(); } { $$ = gen_preturn(); }
; ;
@ -1012,8 +1012,8 @@ expr
{ $$ = make_expr(TYPBOOL,EX_DEFINED,i_expr($3),0); } { $$ = make_expr(TYPBOOL,EX_DEFINED,i_expr($3),0); }
| SAMESIGN '(' expr ',' expr ')' | SAMESIGN '(' expr ',' expr ')'
{ $$ = make_expr(TYPBOOL,EX_SAMESIGN,i_expr($3),i_expr($5)); } { $$ = make_expr(TYPBOOL,EX_SAMESIGN,i_expr($3),i_expr($5)); }
| STACKHEIGHT '(' emarg ')' | TOPELTSIZE '(' emarg ')'
{ $$ = make_expr(TYPINT,EX_STACKHEIGHT,$3-1,0); } { $$ = make_expr(TYPINT,EX_TOPELTSIZE,$3-1,0); }
| FALLTHROUGH '(' emarg ')' | FALLTHROUGH '(' emarg ')'
{ $$ = make_expr(TYPBOOL,EX_FALLTHROUGH,$3-1,0); } { $$ = make_expr(TYPBOOL,EX_FALLTHROUGH,$3-1,0); }
| SFIT '(' expr ',' expr ')' | SFIT '(' expr ',' expr ')'

View file

@ -36,7 +36,7 @@ extern int maxmembers;
extern int regclass; extern int regclass;
extern int maxtokensize; extern int maxtokensize;
extern int nprocargs, maxprocargs; extern int nprocargs, maxprocargs;
extern int use_shc; extern int use_tes;
extern char *mystrcpy(); extern char *mystrcpy();
extern char *myalloc(); extern char *myalloc();

View file

@ -43,7 +43,7 @@ reusing REUSING
rom ROM rom ROM
samesign SAMESIGN samesign SAMESIGN
sfit SFIT sfit SFIT
stackheight STACKHEIGHT topeltsize TOPELTSIZE
test TEST test TEST
to TO to TO
ufit UFIT ufit UFIT

View file

@ -11,7 +11,7 @@ int code_in_c=1; /* put code in "tables.c" */
int tabledebug=0; /* do not generate code for table debugging */ int tabledebug=0; /* do not generate code for table debugging */
#endif #endif
int verbose=0; /* print all statistics */ int verbose=0; /* print all statistics */
int use_shc; /* use stackheight information */ int use_tes; /* use top element size information */
char *c_file= "tables.c"; char *c_file= "tables.c";
char *h_file= "tables.H"; char *h_file= "tables.H";
char *cd_file= "code"; char *cd_file= "code";
@ -593,8 +593,8 @@ outdefs() {
} }
if (tabledebug) if (tabledebug)
cdef("TABLEDEBUG",1); cdef("TABLEDEBUG",1);
if (use_shc) if (use_tes)
cdef("USE_SHC",1); cdef("USE_TES",1);
} }
outars() { outars() {

View file

@ -19,10 +19,10 @@
#define MAXPROPS BORS(30,20) #define MAXPROPS BORS(30,20)
#define MAXTOKENS BORS(100,60) #define MAXTOKENS BORS(100,60)
#define MAXATT 6 #define MAXATT 6
#define MAXSETS BORS(150,100) #define MAXSETS BORS(200,100)
#define MAXINSTR BORS(200,125) #define MAXINSTR BORS(200,125)
#define MAXSTRINGS BORS(300,200) #define MAXSTRINGS BORS(300,200)
#define MAXNODES BORS(500,350) #define MAXNODES BORS(600,350)
#define EMPATMAX BORS(20,10) #define EMPATMAX BORS(20,10)
#define MAXPATTERNS BORS(40,30) #define MAXPATTERNS BORS(40,30)
#define MAXALLREG 5 #define MAXALLREG 5
@ -35,7 +35,7 @@
#define MAXSPLIT 3 #define MAXSPLIT 3
#define MAXPATBYTES BORS(14000,7000) #define MAXPATBYTES BORS(14000,7000)
#define MAXREGVAR 10 #define MAXREGVAR 10
#define MAXSOURCELINES 6000 #define MAXSOURCELINES 7000
#define MAXPROCARG 10 #define MAXPROCARG 10
/* end of tunable constants */ /* end of tunable constants */