Diff for /gforth/engine/main.c between versions 1.196 and 1.197

version 1.196, 2008/01/08 19:55:55 version 1.197, 2008/01/13 21:50:26
Line 82  void gforth_callback(Xt* fcall, void * a Line 82  void gforth_callback(Xt* fcall, void * a
   
   gforth_clist = (va_alist)alist;    gforth_clist = (va_alist)alist;
   
   gforth_engine(fcall, sp, rp, fp, lp);    gforth_engine(fcall, sp, rp, fp, lp sr_call);
   
   /* restore global variables */    /* restore global variables */
   gforth_RP = rp;    gforth_RP = rp;
Line 104  void * gforth_ritem; Line 104  void * gforth_ritem;
   
 void gforth_callback(ffi_cif * cif, void * resp, void ** args, void * ip)  void gforth_callback(ffi_cif * cif, void * resp, void ** args, void * ip)
 {  {
   Cell *rp = gforth_RP;    Cell *rp1 = gforth_RP;
   Cell *sp = gforth_SP;    Cell *sp = gforth_SP;
   Float *fp = gforth_FP;    Float *fp = gforth_FP;
   Address lp = gforth_LP;    Address lp = gforth_LP;
Line 114  void gforth_callback(ffi_cif * cif, void Line 114  void gforth_callback(ffi_cif * cif, void
   gforth_clist = args;    gforth_clist = args;
   gforth_ritem = resp;    gforth_ritem = resp;
   
   gforth_engine((Xt *)ip, sp, rp, fp, lp);    gforth_engine((Xt *)ip, sp, rp1, fp, lp sr_call);
   
   /* restore global variables */    /* restore global variables */
   gforth_RP = rp;    gforth_RP = rp1;
   gforth_SP = sp;    gforth_SP = sp;
   gforth_FP = fp;    gforth_FP = fp;
   gforth_LP = lp;    gforth_LP = lp;
Line 130  void gforth_callback(ffi_cif * cif, void Line 130  void gforth_callback(ffi_cif * cif, void
 /* define some VM registers as global variables, so they survive exceptions;  /* define some VM registers as global variables, so they survive exceptions;
    global register variables are not up to the task (according to the      global register variables are not up to the task (according to the 
    GNU C manual) */     GNU C manual) */
   #if defined(GLOBALS_NONRELOC)
   saved_regs saved_regs_v;
   saved_regs *saved_regs_p = &saved_regs_v;
   #else /* !defined(GLOBALS_NONRELOC) */
 Xt *saved_ip;  Xt *saved_ip;
 Cell *rp;  Cell *rp;
 #endif  #endif /* !defined(GLOBALS_NONRELOC) */
   #endif /* !defined(GFORTH_DEBUGGING) */
   
 #ifdef NO_IP  #ifdef NO_IP
 Label next_code;  Label next_code;
Line 759  int gforth_go(Address image, int stack, Line 764  int gforth_go(Address image, int stack,
     /* fprintf(stderr, "rp=$%x\n",rp0);*/      /* fprintf(stderr, "rp=$%x\n",rp0);*/
           
     return((int)(Cell)gforth_engine(image_header->throw_entry, signal_data_stack+15,      return((int)(Cell)gforth_engine(image_header->throw_entry, signal_data_stack+15,
                        rp0, signal_fp_stack, 0));                         rp0, signal_fp_stack, 0 sr_call));
   }    }
 #endif  #endif
   
   return((int)(Cell)gforth_engine(ip0,sp0,rp0,fp0,lp0));    return((int)(Cell)gforth_engine(ip0,sp0,rp0,fp0,lp0 sr_call));
 }  }
   
 #if !defined(INCLUDE_IMAGE) && !defined(STANDALONE)  #if !defined(INCLUDE_IMAGE) && !defined(STANDALONE)
Line 970  static void check_prims(Label symbols1[] Line 975  static void check_prims(Label symbols1[]
 #ifndef NO_DYNAMIC  #ifndef NO_DYNAMIC
   if (no_dynamic)    if (no_dynamic)
     return;      return;
   symbols2=gforth_engine2(0,0,0,0,0);    symbols2=gforth_engine2(0,0,0,0,0 sr_call);
 #if NO_IP  #if NO_IP
   symbols3=gforth_engine3(0,0,0,0,0);    symbols3=gforth_engine3(0,0,0,0,0 sr_call);
 #else  #else
   symbols3=symbols1;    symbols3=symbols1;
 #endif  #endif
Line 1868  Address gforth_loader(FILE *imagefile, c Line 1873  Address gforth_loader(FILE *imagefile, c
 #endif  #endif
     ;      ;
   
   vm_prims = gforth_engine(0,0,0,0,0);    vm_prims = gforth_engine(0,0,0,0,0 sr_call);
   check_prims(vm_prims);    check_prims(vm_prims);
   prepare_super_table();    prepare_super_table();
 #ifndef DOUBLY_INDIRECT  #ifndef DOUBLY_INDIRECT
Line 2330  int main(int argc, char **argv, char **e Line 2335  int main(int argc, char **argv, char **e
 #endif  #endif
   
 #ifdef STANDALONE  #ifdef STANDALONE
   image = gforth_engine(0, 0, 0, 0, 0);    image = gforth_engine(0, 0, 0, 0, 0 sr_call);
   alloc_stacks((ImageHeader *)image);    alloc_stacks((ImageHeader *)image);
 #else  #else
   image_file = open_image_file(imagename, path);    image_file = open_image_file(imagename, path);

Removed from v.1.196  
changed lines
  Added in v.1.197


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