--- gforth/engine/engine.c 2012/01/16 22:17:32 1.117 +++ gforth/engine/engine.c 2012/12/31 15:25:19 1.121 @@ -1,6 +1,6 @@ /* Gforth virtual machine (aka inner interpreter) - Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2010,2011 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2010,2011,2012 Free Software Foundation, Inc. This file is part of Gforth. @@ -208,6 +208,9 @@ extern Char *gforth_memcpy(Char * dest, #ifndef FTOSREG #define FTOSREG #endif +#ifndef OPREG +#define OPREG +#endif #ifndef CPU_DEP1 # define CPU_DEP1 0 @@ -269,11 +272,11 @@ extern Char *gforth_memcpy(Char * dest, #endif #ifdef STANDALONE -jmp_buf throw_jmp_buf; +jmp_buf * throw_jmp_handler; void throw(int code) { - longjmp(throw_jmp_buf,code); /* !! or use siglongjmp ? */ + longjmp(*throw_jmp_handler,code); /* !! or use siglongjmp ? */ } #endif @@ -317,7 +320,7 @@ void throw(int code) /* the asm(""); is there to get a stop compiled on Itanium */ #define LABEL2(name) K_##name: asm(""); -Label *gforth_engine(Xt *ip0, Cell *sp0, Cell *rp0, Float *fp0, Address lp0 sr_proto) +Label *gforth_engine(Xt *ip0 sr_proto) /* executes code at ip, if ip!=NULL returns array of machine code labels (for use in a loader), if ip==NULL */ @@ -332,11 +335,14 @@ Label *gforth_engine(Xt *ip0, Cell *sp0, #ifndef NO_IP register Xt *ip IPREG = ip0; #endif - register Cell *sp SPREG = sp0; - register Float *fp FPREG = fp0; - register Address lp LPREG = lp0; + register Cell *sp SPREG = gforth_SP; + register Float *fp FPREG = gforth_FP; + register Address lp LPREG = gforth_LP; register Xt cfa CFAREG; register Label real_ca CAREG; +#ifdef HAS_OBJECTS + register Char * op OPREG = NULL; +#endif #ifdef MORE_VARS MORE_VARS #endif @@ -396,7 +402,7 @@ Label *gforth_engine(Xt *ip0, Cell *sp0, CPU_DEP2 #endif - rp = rp0; + rp = gforth_RP; #ifdef DEBUG fprintf(stderr,"ip=%x, sp=%x, rp=%x, fp=%x, lp=%x, up=%x\n", (unsigned)ip0,(unsigned)sp,(unsigned)rp,