Diff for /gforth/Attic/engine.c between versions 1.40 and 1.41

version 1.40, 1997/02/16 20:51:07 version 1.41, 1997/03/04 17:49:48
Line 190  static int ufileattr[6]= { Line 190  static int ufileattr[6]= {
 #define FTOSREG  #define FTOSREG
 #endif  #endif
   
   #ifndef CPU_DEP1
   # define CPU_DEP1 0
   #endif
   
 /* declare and compute cfa for certain threading variants */  /* declare and compute cfa for certain threading variants */
 /* warning: this is nonsyntactical; it will not work in place of a statement */  /* warning: this is nonsyntactical; it will not work in place of a statement */
 #ifdef CFA_NEXT  #ifdef CFA_NEXT
Line 214  Label *engine(Xt *ip0, Cell *sp0, Cell * Line 218  Label *engine(Xt *ip0, Cell *sp0, Cell *
   register Address up UPREG = UP;    register Address up UPREG = UP;
   IF_TOS(register Cell TOS TOSREG;)    IF_TOS(register Cell TOS TOSREG;)
   IF_FTOS(register Float FTOS FTOSREG;)    IF_FTOS(register Float FTOS FTOSREG;)
   #if defined(DOUBLY_INDIRECT)
     static Label *symbols;
     static void *routines[]= {
   #else /* !defined(DOUBLY_INDIRECT) */
   static Label symbols[]= {    static Label symbols[]= {
   #endif /* !defined(DOUBLY_INDIRECT) */
     &&docol,      &&docol,
     &&docon,      &&docon,
     &&dovar,      &&dovar,
Line 224  Label *engine(Xt *ip0, Cell *sp0, Cell * Line 233  Label *engine(Xt *ip0, Cell *sp0, Cell *
     &&dodoes,      &&dodoes,
     /* the following entry is normally unused;      /* the following entry is normally unused;
        it's there because its index indicates a does-handler */         it's there because its index indicates a does-handler */
 #ifdef CPU_DEP1  
     CPU_DEP1,      CPU_DEP1,
 #else  
     (Label)0,  
 #endif  
 #include "prim_labels.i"  #include "prim_labels.i"
     (Label)0      0
   };    };
 #ifdef CPU_DEP2  #ifdef CPU_DEP2
   CPU_DEP2    CPU_DEP2
Line 242  Label *engine(Xt *ip0, Cell *sp0, Cell * Line 247  Label *engine(Xt *ip0, Cell *sp0, Cell *
           (unsigned)fp,(unsigned)lp,(unsigned)up);            (unsigned)fp,(unsigned)lp,(unsigned)up);
 #endif  #endif
   
   if (ip == NULL)    if (ip == NULL) {
     return symbols;  #if defined(DOUBLY_INDIRECT)
   #define MAX_SYMBOLS 1000
       int i;
       Cell code_offset = offset_image? 11*sizeof(Cell) : 0;
   
       symbols = (Label *)(malloc(MAX_SYMBOLS*sizeof(Cell)+code_offset)+code_offset);
       for (i=0; i<DOESJUMP+1; i++)
         symbols[i] = (Label)routines[i];
       for (; routines[i]!=0; i++) {
         if (i>=MAX_SYMBOLS) {
           fprintf(stderr,"gforth-ditc: more than %d primitives\n",MAX_SYMBOLS);
           exit(1);
       }
       symbols[i] = &routines[i];
     }
   #endif /* defined(DOUBLY_INDIRECT) */
     return symbols;
   }
   
   IF_TOS(TOS = sp[0]);    IF_TOS(TOS = sp[0]);
   IF_FTOS(FTOS = fp[0]);    IF_FTOS(FTOS = fp[0]);

Removed from v.1.40  
changed lines
  Added in v.1.41


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>