--- gforth/engine/engine.c 2002/01/04 20:31:54 1.37 +++ gforth/engine/engine.c 2002/02/04 21:25:18 1.40 @@ -282,14 +282,6 @@ static int ufileattr[6]= { # define CPU_DEP1 0 #endif -/* declare and compute cfa for certain threading variants */ -/* warning: this is nonsyntactical; it will not work in place of a statement */ -#ifndef GETCFA -#define DOCFA -#else -#define DOCFA Xt cfa; GETCFA(cfa) -#endif - /* instructions containing these must be the last instruction of a super-instruction (e.g., branches, EXECUTE, and other instructions ending the basic block). Instructions containing SET_IP get this @@ -327,17 +319,14 @@ Cell *rp; #endif Xt *primtable(Label symbols[], Cell size) + /* used in primitive primtable for peephole optimization */ { -#ifdef DIRECT_THREADED - return symbols; -#else /* !defined(DIRECT_THREADED) */ Xt *xts = (Xt *)malloc(size*sizeof(Xt)); Cell i; for (i=0; i=MAX_SYMBOLS) { fprintf(stderr,"gforth-ditc: more than %d primitives\n",MAX_SYMBOLS); exit(1); } - symbols[i] = &routines[i]; + xts[i] = symbols[i] = &routines[i]; } #endif /* defined(DOUBLY_INDIRECT) */ return symbols; @@ -438,7 +428,6 @@ define(enginerest, docol: { - DOCFA; #ifdef DEBUG { CFA_TO_NAME(cfa); @@ -468,7 +457,6 @@ define(enginerest, docon: { - DOCFA; #ifdef DEBUG fprintf(stderr,"%08lx: con: %08lx\n",(Cell)ip,*(Cell*)PFA1(cfa)); #endif @@ -484,7 +472,6 @@ define(enginerest, dovar: { - DOCFA; #ifdef DEBUG fprintf(stderr,"%08lx: var: %08lx\n",(Cell)ip,(Cell)PFA1(cfa)); #endif @@ -500,7 +487,6 @@ define(enginerest, douser: { - DOCFA; #ifdef DEBUG fprintf(stderr,"%08lx: user: %08lx\n",(Cell)ip,(Cell)PFA1(cfa)); #endif @@ -516,7 +502,6 @@ define(enginerest, dodefer: { - DOCFA; #ifdef DEBUG fprintf(stderr,"%08lx: defer: %08lx\n",(Cell)ip,*(Cell*)PFA1(cfa)); #endif @@ -526,7 +511,6 @@ define(enginerest, dofield: { - DOCFA; #ifdef DEBUG fprintf(stderr,"%08lx: field: %08lx\n",(Cell)ip,(Cell)PFA1(cfa)); #endif @@ -554,8 +538,6 @@ define(enginerest, */ { - DOCFA; - /* fprintf(stderr, "Got CFA %08lx at doescode %08lx/%08lx: does: %08lx\n",cfa,(Cell)ip,(Cell)PFA(cfa),(Cell)DOES_CODE1(cfa));*/ #ifdef DEBUG fprintf(stderr,"%08lx/%08lx: does: %08lx\n",(Cell)ip,(Cell)PFA(cfa),(Cell)DOES_CODE1(cfa));