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

View file

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

View file

@ -43,7 +43,7 @@ reusing REUSING
rom ROM
samesign SAMESIGN
sfit SFIT
stackheight STACKHEIGHT
topeltsize TOPELTSIZE
test TEST
to TO
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 */
#endif
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 *h_file= "tables.H";
char *cd_file= "code";
@ -593,8 +593,8 @@ outdefs() {
}
if (tabledebug)
cdef("TABLEDEBUG",1);
if (use_shc)
cdef("USE_SHC",1);
if (use_tes)
cdef("USE_TES",1);
}
outars() {

View file

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