Changeset 323 for trunk/thune/internal.h

Show
Ignore:
Timestamp:
12/26/06 22:10:34 (2 years ago)
Author:
krobillard
Message:

Rune is now stand-alone.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/internal.h

    r276 r323  
    4545 
    4646 
     47#ifdef LANG_THUNE 
    4748/* Control Stack */ 
    4849 
     
    109110    CECell iter; 
    110111    CECell reduce; 
    111     CECell localFrame; 
    112112    CEFunc func; 
    113113    //CEHold hold; 
     
    161161#endif 
    162162 
    163  
    164 #define UR_CALL_OP          ur_thread->callOp 
    165163 
    166164#define OP_NOP              0 
     
    198196 
    199197 
    200 /* Control Stack */ 
    201  
    202198#define UR_TOC              ((CEntry*) ur_thread->toc) 
    203199#define UR_BOC              ((CEntry*) ur_thread->cstack) 
     
    205201#define UR_C_DEC            --ur_thread->toc 
    206202#define UR_C_DECN(n)        ur_thread->toc -= n 
    207  
    208  
    209 #define UR_LF_BEG           ((CEntry*) ur_thread->localFT) 
    210 #define UR_LF_END           ((CEntry*) ur_thread->cstack + UR_CSTACK_SIZE) 
     203#endif 
     204 
     205 
     206#ifdef LANG_RUNE 
     207/* Control Stack */ 
     208 
     209#define OP_NOP              0 
     210#define OP_DO               1 
     211#define OP_THROW            2 
     212#define OP_REDUCE           3 
     213#define OP_HALT             4 
     214#define OP_QUIT             5 
     215 
     216 
     217#define UR_TOC              ur_thread->toc 
     218#define UR_BOC              ur_thread->cstack 
     219#define UR_C_GROW           ++ur_thread->toc 
     220#define UR_C_DEC            --ur_thread->toc 
     221#endif 
     222 
     223 
     224#define UR_CALL_OP          ur_thread->callOp 
     225 
     226 
     227/* Local Frame */ 
     228 
     229typedef union 
     230{ 
     231    UCell  makesUs16bytes; 
     232    struct 
     233    { 
     234        UCell*  cell;   // Points into data stack. 
     235        int32_t n; 
     236    } 
     237    localFrame; 
     238} 
     239LocalFrame; 
     240 
     241#define UR_LF_BEG           ((LocalFrame*) ur_thread->localFT) 
     242#define UR_LF_END           ((LocalFrame*)(ur_thread->cstack + UR_CSTACK_SIZE)) 
    211243#define UR_LF_POP           ++ur_thread->localFT 
    212244#define UR_LF_PUSH(negBN,ptr) \