pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1:   /* -  * $Id: interpret_functions.h,v 1.83 2001/07/27 08:32:03 hubbe Exp $ +  * $Id: interpret_functions.h,v 1.84 2001/07/27 15:02:04 grubba Exp $    *    * Opcode definitions for the interpreter.    */      #include "global.h"      #undef CJUMP   #undef AUTO_BIGNUM_LOOP_TEST   #undef LOOP   #undef COMPARISON
pike.git/src/interpret_functions.h:34:   #define OPCODE2(A, B, C) OPCODE2(A, B) C   #define OPCODE0_TAIL(A, B, C) OPCODE0_TAIL(A, B) C   #define OPCODE1_TAIL(A, B, C) OPCODE1_TAIL(A, B) C   #define OPCODE2_TAIL(A, B, C) OPCODE2_TAIL(A, B) C   #define OPCODE0_JUMP(A, B, C) OPCODE0_JUMP(A, B) C   #define OPCODE1_JUMP(A, B, C) OPCODE1_JUMP(A, B) C   #define OPCODE2_JUMP(A, B, C) OPCODE2_JUMP(A, B) C   #define OPCODE0_TAILJUMP(A, B, C) OPCODE0_TAILJUMP(A, B) C   #define OPCODE1_TAILJUMP(A, B, C) OPCODE1_TAILJUMP(A, B) C   #define OPCODE2_TAILJUMP(A, B, C) OPCODE2_TAILJUMP(A, B) C + #define OPCODE0_RETURN(A, B, C) OPCODE0_RETURN(A, B) C + #define OPCODE1_RETURN(A, B, C) OPCODE1_RETURN(A, B) C + #define OPCODE2_RETURN(A, B, C) OPCODE2_RETURN(A, B) C + #define OPCODE0_TAILRETURN(A, B, C) OPCODE0_TAILRETURN(A, B) C + #define OPCODE1_TAILRETURN(A, B, C) OPCODE1_TAILRETURN(A, B) C + #define OPCODE2_TAILRETURN(A, B, C) OPCODE2_TAILRETURN(A, B) C   #endif /* GEN_PROTOS */         #ifndef PROG_COUNTER   #define PROG_COUNTER pc   #endif      #ifndef INTER_ESCAPE_CATCH   #define INTER_ESCAPE_CATCH return -2   #endif
pike.git/src/interpret_functions.h:1110:    DO_DUMB_RETURN;    case 2:    DO_JUMP_TO(Pike_fp->pc);    break;    default:    DO_JUMP_TO(PROG_COUNTER + GET_JUMP());    }    /* NOT_REACHED */   });    - OPCODE0(F_ESCAPE_CATCH, "escape catch", { + OPCODE0_RETURN(F_ESCAPE_CATCH, "escape catch", {    Pike_fp->pc = PROG_COUNTER;    INTER_ESCAPE_CATCH;   });      OPCODE0(F_THROW_ZERO, "throw(0)", {    push_int(0);    f_throw(1);   });      OPCODE1(F_SWITCH, "switch", {
pike.git/src/interpret_functions.h:1260:    PIKE_ERROR("foreach", "Bad argument 1.\n", Pike_sp-3, 1);    if(foreach_iterate(Pike_sp[-5].u.object))    {    DOJUMP();    }else{    SKIPJUMP();    }   });       - OPCODE1(F_RETURN_LOCAL,"return local",{ + OPCODE1_RETURN(F_RETURN_LOCAL,"return local",{    DO_IF_DEBUG(    /* special case! Pike_interpreter.mark_stack may be invalid at the time we    * call return -1, so we must call the callbacks here to    * prevent false alarms! /Hubbe    */    if(d_flag>3) do_gc();    if(d_flag>4) do_debug();    check_threads_etc();    );    if(Pike_fp->expendible <= Pike_fp->locals + arg1)    {    pop_n_elems(Pike_sp-1 - (Pike_fp->locals + arg1));    }else{    push_svalue(Pike_fp->locals + arg1);    }    print_return_value();    DO_DUMB_RETURN;   });       - OPCODE0(F_RETURN_IF_TRUE,"return if true",{ + OPCODE0_RETURN(F_RETURN_IF_TRUE,"return if true",{    if(!IS_ZERO(Pike_sp-1)) DO_RETURN;    pop_stack();   });    - OPCODE0(F_RETURN_1,"return 1",{ + OPCODE0_RETURN(F_RETURN_1,"return 1",{    push_int(1);    DO_RETURN;   });    - OPCODE0(F_RETURN_0,"return 0",{ + OPCODE0_RETURN(F_RETURN_0,"return 0",{    push_int(0);    DO_RETURN;   });    - OPCODE0(F_RETURN, "return", { + OPCODE0_RETURN(F_RETURN, "return", {    DO_RETURN;   });    - OPCODE0(F_DUMB_RETURN,"dumb return", { + OPCODE0_RETURN(F_DUMB_RETURN,"dumb return", {    DO_DUMB_RETURN;   });      OPCODE0(F_NEGATE, "unary minus", {    if(Pike_sp[-1].type == PIKE_T_INT)    {    DO_IF_BIGNUM(    if(INT_TYPE_NEG_OVERFLOW(Pike_sp[-1].u.integer))    {    convert_stack_top_to_bignum();
pike.git/src/interpret_functions.h:1718:    ARG2, ARG3)) \    { \    Pike_fp->next->pc=PROG_COUNTER; \    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL | PIKE_FRAME_RETURN_POP; \    DO_JUMP_TO(Pike_fp->pc); \    }else{ \    pop_stack(); \    } \   }); \    \ - OP(PIKE_CONCAT3(F_,OPCODE,_AND_RETURN),NAME " & return", { \ + PIKE_CONCAT(OP,_RETURN)(PIKE_CONCAT3(F_,OPCODE,_AND_RETURN), \ +  NAME " & return", { \    if(low_mega_apply(TYPE,DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), \    ARG2,ARG3)) \    { \    PIKE_OPCODE_T *addr = Pike_fp->pc; \    DO_IF_DEBUG(Pike_fp->next->pc=0); \    unlink_previous_frame(); \    DO_JUMP_TO(addr); \    }else{ \    DO_DUMB_RETURN; \    } \
pike.git/src/interpret_functions.h:1753:    ARG2, ARG3)) \    { \    Pike_fp->next->pc=PROG_COUNTER; \    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL | PIKE_FRAME_RETURN_POP; \    DO_JUMP_TO(Pike_fp->pc); \    }else{ \    pop_stack(); \    } \   }); \    \ - OP(PIKE_CONCAT3(F_MARK_,OPCODE,_AND_RETURN),"mark, " NAME " & return", { \ + PIKE_CONCAT(OP,_RETURN)(PIKE_CONCAT3(F_MARK_,OPCODE,_AND_RETURN), \ +  "mark, " NAME " & return", { \    if(low_mega_apply(TYPE,0, \    ARG2,ARG3)) \    { \    PIKE_OPCODE_T *addr = Pike_fp->pc; \    DO_IF_DEBUG(Pike_fp->next->pc=0); \    unlink_previous_frame(); \    DO_JUMP_TO(addr); \    }else{ \    DO_DUMB_RETURN; \    } \
pike.git/src/interpret_functions.h:1824:      OPCODE1(F_CALL_BUILTIN, "call builtin", {    DO_CALL_BUILTIN(DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)));   });      OPCODE1(F_CALL_BUILTIN_AND_POP,"call builtin & pop", {    DO_CALL_BUILTIN(DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)));    pop_stack();   });    - OPCODE1(F_CALL_BUILTIN_AND_RETURN,"call builtin & return", { + OPCODE1_RETURN(F_CALL_BUILTIN_AND_RETURN,"call builtin & return", {    DO_CALL_BUILTIN(DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)));    DO_DUMB_RETURN;   });         OPCODE1(F_MARK_CALL_BUILTIN, "mark, call builtin", {    DO_CALL_BUILTIN(0);   });      OPCODE1(F_MARK_CALL_BUILTIN_AND_POP, "mark, call builtin & pop", {    DO_CALL_BUILTIN(0);    pop_stack();   });    - OPCODE1(F_MARK_CALL_BUILTIN_AND_RETURN, "mark, call builtin & return", { + OPCODE1_RETURN(F_MARK_CALL_BUILTIN_AND_RETURN, "mark, call builtin & return", {    DO_CALL_BUILTIN(0);    DO_DUMB_RETURN;   });         OPCODE1(F_CALL_BUILTIN1, "call builtin 1", {    DO_CALL_BUILTIN(1);   });      OPCODE1(F_CALL_BUILTIN1_AND_POP, "call builtin1 & pop", {