pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1:   /* -  * $Id: interpret_functions.h,v 1.42 2001/01/15 00:21:47 mast Exp $ +  * $Id: interpret_functions.h,v 1.43 2004/10/06 18:47:05 mast Exp $    *    * Opcode definitions for the interpreter.    */      OPCODE0(F_UNDEFINED,"push UNDEFINED")    push_int(0);    Pike_sp[-1].subtype=NUMBER_UNDEFINED;   BREAK;      OPCODE0(F_CONST0, "push 0")
pike.git/src/interpret_functions.h:286:   BREAK;      OPCODE1(F_INC_LOCAL, "++local")    if( (Pike_fp->locals[arg1].type == PIKE_T_INT)   #ifdef AUTO_BIGNUM    && (!INT_TYPE_ADD_OVERFLOW(Pike_fp->locals[arg1].u.integer, 1))   #endif /* AUTO_BIGNUM */    )    {    Pike_fp->locals[arg1].u.integer++; +  Pike_fp->locals[arg1].subtype = NUMBER_NUMBER; /* Could have UNDEFINED there before. */    assign_svalue_no_free(Pike_sp++,Pike_fp->locals+arg1);    } else {    assign_svalue_no_free(Pike_sp++,Pike_fp->locals+arg1);    push_int(1);    f_add(2);    assign_svalue(Pike_fp->locals+arg1,Pike_sp-1);    }   BREAK;      OPCODE1(F_POST_INC_LOCAL, "local++")    assign_svalue_no_free(Pike_sp++, Pike_fp->locals + arg1);    if( (Pike_fp->locals[arg1].type == PIKE_T_INT)   #ifdef AUTO_BIGNUM    && (!INT_TYPE_ADD_OVERFLOW(Pike_fp->locals[arg1].u.integer, 1))   #endif /* AUTO_BIGNUM */    )    {    Pike_fp->locals[arg1].u.integer++; -  +  Pike_fp->locals[arg1].subtype = NUMBER_NUMBER; /* Could have UNDEFINED there before. */    } else {    assign_svalue_no_free(Pike_sp++, Pike_fp->locals + arg1);    push_int(1);    f_add(2);    assign_svalue(Pike_fp->locals + arg1, Pike_sp-1);    pop_stack();    }   BREAK;      OPCODE1(F_INC_LOCAL_AND_POP, "++local and pop")    if( (Pike_fp->locals[arg1].type == PIKE_T_INT)   #ifdef AUTO_BIGNUM    && (!INT_TYPE_ADD_OVERFLOW(Pike_fp->locals[arg1].u.integer, 1))   #endif /* AUTO_BIGNUM */    )    {    Pike_fp->locals[arg1].u.integer++; -  +  Pike_fp->locals[arg1].subtype = NUMBER_NUMBER; /* Could have UNDEFINED there before. */    } else {    assign_svalue_no_free(Pike_sp++, Pike_fp->locals + arg1);    push_int(1);    f_add(2);    assign_svalue(Pike_fp->locals + arg1, Pike_sp-1);    pop_stack();    }   BREAK;      OPCODE1(F_DEC_LOCAL, "--local")    if( (Pike_fp->locals[arg1].type == PIKE_T_INT)   #ifdef AUTO_BIGNUM    && (!INT_TYPE_SUB_OVERFLOW(Pike_fp->locals[arg1].u.integer, 1))   #endif /* AUTO_BIGNUM */    )    {    Pike_fp->locals[arg1].u.integer--; -  +  Pike_fp->locals[arg1].subtype = NUMBER_NUMBER; /* Could have UNDEFINED there before. */    assign_svalue_no_free(Pike_sp++,Pike_fp->locals+arg1);    } else {    assign_svalue_no_free(Pike_sp++,Pike_fp->locals+arg1);    push_int(1);    o_subtract();    assign_svalue(Pike_fp->locals+arg1,Pike_sp-1);    }   BREAK;      OPCODE1(F_POST_DEC_LOCAL, "local--")    assign_svalue_no_free(Pike_sp++, Pike_fp->locals + arg1);    if( (Pike_fp->locals[arg1].type == PIKE_T_INT)   #ifdef AUTO_BIGNUM    && (!INT_TYPE_SUB_OVERFLOW(Pike_fp->locals[arg1].u.integer, 1))   #endif /* AUTO_BIGNUM */    )    {    Pike_fp->locals[arg1].u.integer--; -  +  Pike_fp->locals[arg1].subtype = NUMBER_NUMBER; /* Could have UNDEFINED there before. */    } else {    assign_svalue_no_free(Pike_sp++, Pike_fp->locals + arg1);    push_int(1);    o_subtract();    assign_svalue(Pike_fp->locals + arg1, Pike_sp-1);    pop_stack();    }    /* Pike_fp->locals[instr].u.integer--; */   BREAK;      OPCODE1(F_DEC_LOCAL_AND_POP, "--local and pop")    if( (Pike_fp->locals[arg1].type == PIKE_T_INT)   #ifdef AUTO_BIGNUM    && (!INT_TYPE_SUB_OVERFLOW(Pike_fp->locals[arg1].u.integer, 1))   #endif /* AUTO_BIGNUM */    )    {    Pike_fp->locals[arg1].u.integer--; -  +  Pike_fp->locals[arg1].subtype = NUMBER_NUMBER; /* Could have UNDEFINED there before. */    } else {    assign_svalue_no_free(Pike_sp++, Pike_fp->locals + arg1);    push_int(1);    o_subtract();    assign_svalue(Pike_fp->locals + arg1, Pike_sp-1);    pop_stack();    }   BREAK;      OPCODE0(F_LTOSVAL, "lvalue to svalue")
pike.git/src/interpret_functions.h:1063:    if(Pike_sp[-1].type == PIKE_T_INT)    {   #ifdef AUTO_BIGNUM    if(INT_TYPE_NEG_OVERFLOW(Pike_sp[-1].u.integer))    {    convert_stack_top_to_bignum();    o_negate();    }    else   #endif /* AUTO_BIGNUM */ +  {    Pike_sp[-1].u.integer =- Pike_sp[-1].u.integer; -  +  Pike_sp[-1].subtype = NUMBER_NUMBER; /* Could have UNDEFINED there before. */    } -  +  }    else if(Pike_sp[-1].type == PIKE_T_FLOAT)    {    Pike_sp[-1].u.float_number =- Pike_sp[-1].u.float_number;    }else{    o_negate();    }   BREAK;      OPCODE0(F_COMPL, "~")    o_compl();   BREAK;      OPCODE0(F_NOT, "!")    switch(Pike_sp[-1].type)    {    case PIKE_T_INT:    Pike_sp[-1].u.integer =! Pike_sp[-1].u.integer; -  +  Pike_sp[-1].subtype = NUMBER_NUMBER; /* Could have UNDEFINED there before. */    break;       case PIKE_T_FUNCTION:    case PIKE_T_OBJECT:    if(IS_ZERO(Pike_sp-1))    {    pop_stack();    push_int(1);    }else{    pop_stack();    push_int(0);    }    break;       default:    free_svalue(Pike_sp-1);    Pike_sp[-1].type=PIKE_T_INT; -  +  Pike_sp[-1].subtype = NUMBER_NUMBER;    Pike_sp[-1].u.integer=0;    }   BREAK;      OPCODE0(F_LSH, "<<")    o_lsh();   BREAK;      OPCODE0(F_RSH, ">>")    o_rsh();
pike.git/src/interpret_functions.h:1130:   BREAK;      OPCODE0(F_ADD_INTS, "int+int")    if(Pike_sp[-1].type == T_INT && Pike_sp[-2].type == T_INT   #ifdef AUTO_BIGNUM    && (!INT_TYPE_ADD_OVERFLOW(Pike_sp[-1].u.integer, Pike_sp[-2].u.integer))   #endif    )    {    Pike_sp[-2].u.integer+=Pike_sp[-1].u.integer; +  Pike_sp[-2].subtype = NUMBER_NUMBER; /* Could have UNDEFINED there before. */    Pike_sp--;    }else{    f_add(2);    }   BREAK;      OPCODE0(F_ADD_FLOATS, "float+float")    if(Pike_sp[-1].type == T_FLOAT && Pike_sp[-2].type == T_FLOAT)    {    Pike_sp[-2].u.float_number+=Pike_sp[-1].u.float_number;
pike.git/src/interpret_functions.h:1182:   BREAK;      OPCODE1(F_ADD_INT, "add integer")    if(Pike_sp[-1].type == T_INT   #ifdef AUTO_BIGNUM    && (!INT_TYPE_ADD_OVERFLOW(Pike_sp[-1].u.integer, arg1))   #endif    )    {    Pike_sp[-1].u.integer+=arg1; +  Pike_sp[-1].subtype = NUMBER_NUMBER; /* Could have UNDEFINED there before. */    }else{    push_int(arg1);    f_add(2);    }   BREAK;      OPCODE1(F_ADD_NEG_INT, "add -integer")    if(Pike_sp[-1].type == T_INT   #ifdef AUTO_BIGNUM    && (!INT_TYPE_ADD_OVERFLOW(Pike_sp[-1].u.integer, -arg1))   #endif    )    {    Pike_sp[-1].u.integer-=arg1; -  +  Pike_sp[-1].subtype = NUMBER_NUMBER; /* Could have UNDEFINED there before. */    }else{    push_int(-arg1);    f_add(2);    }   BREAK;      OPCODE0(F_PUSH_ARRAY, "@")    switch(Pike_sp[-1].type)    {    default: