pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1:   /* -  * $Id: interpret_functions.h,v 1.13 2000/04/20 14:03:39 grubba Exp $ +  * $Id: interpret_functions.h,v 1.14 2000/04/20 22:30:08 grubba 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:387:    Pike_fp->locals[instr].u.integer++;    assign_svalue_no_free(Pike_sp++,Pike_fp->locals+instr);    } else {    assign_svalue_no_free(Pike_sp++,Pike_fp->locals+instr);    push_int(1);    f_add(2);    assign_svalue(Pike_fp->locals+instr,Pike_sp-1);    }   BREAK;    -  CASE(F_POST_INC_LOCAL); -  instr=GET_ARG(); -  assign_svalue_no_free(Pike_sp++,Pike_fp->locals+instr); -  goto inc_local_and_pop; + 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++; +  } 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;    -  CASE(F_INC_LOCAL_AND_POP); -  instr=GET_ARG(); -  inc_local_and_pop: + OPCODE1(F_INC_LOCAL_AND_POP, "++local and pop") +  if( (Pike_fp->locals[arg1].type == PIKE_T_INT)   #ifdef AUTO_BIGNUM -  if(Pike_fp->locals[instr].type == PIKE_T_INT && -  !INT_TYPE_ADD_OVERFLOW(Pike_fp->locals[instr].u.integer, 1)) - #else -  if(Pike_fp->locals[instr].type == PIKE_T_INT) +  && (!INT_TYPE_ADD_OVERFLOW(Pike_fp->locals[arg1].u.integer, 1))   #endif /* AUTO_BIGNUM */ -  +  )    { -  Pike_fp->locals[instr].u.integer++; -  }else{ -  assign_svalue_no_free(Pike_sp++,Pike_fp->locals+instr); +  Pike_fp->locals[arg1].u.integer++; +  } else { +  assign_svalue_no_free(Pike_sp++, Pike_fp->locals + arg1);    push_int(1);    f_add(2); -  assign_svalue(Pike_fp->locals+instr,Pike_sp-1); +  assign_svalue(Pike_fp->locals + arg1, Pike_sp-1);    pop_stack();    } -  break; + BREAK;      OPCODE1(F_DEC_LOCAL, "--local")    instr = arg1;    if( (Pike_fp->locals[instr].type == PIKE_T_INT)   #ifdef AUTO_BIGNUM    && (!INT_TYPE_SUB_OVERFLOW(Pike_fp->locals[instr].u.integer, 1))   #endif /* AUTO_BIGNUM */    )    {    Pike_fp->locals[instr].u.integer--;    assign_svalue_no_free(Pike_sp++,Pike_fp->locals+instr);    } else {    assign_svalue_no_free(Pike_sp++,Pike_fp->locals+instr);    push_int(1);    o_subtract();    assign_svalue(Pike_fp->locals+instr,Pike_sp-1);    }   BREAK;    -  CASE(F_POST_DEC_LOCAL); -  instr=GET_ARG(); -  assign_svalue_no_free(Pike_sp++,Pike_fp->locals+instr); -  goto dec_local_and_pop; + 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--; +  } 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; + BREAK;    -  CASE(F_DEC_LOCAL_AND_POP); -  instr=GET_ARG(); -  dec_local_and_pop: + OPCODE1(F_DEC_LOCAL_AND_POP, "--local and pop") +  if( (Pike_fp->locals[arg1].type == PIKE_T_INT)   #ifdef AUTO_BIGNUM -  if(Pike_fp->locals[instr].type == PIKE_T_INT && -  !INT_TYPE_SUB_OVERFLOW(Pike_fp->locals[instr].u.integer, 1)) - #else -  if(Pike_fp->locals[instr].type == PIKE_T_INT) +  && (!INT_TYPE_SUB_OVERFLOW(Pike_fp->locals[arg1].u.integer, 1))   #endif /* AUTO_BIGNUM */ -  +  )    { -  Pike_fp->locals[instr].u.integer--; -  }else{ -  assign_svalue_no_free(Pike_sp++,Pike_fp->locals+instr); +  Pike_fp->locals[arg1].u.integer--; +  } else { +  assign_svalue_no_free(Pike_sp++, Pike_fp->locals + arg1);    push_int(1);    o_subtract(); -  assign_svalue(Pike_fp->locals+instr,Pike_sp-1); +  assign_svalue(Pike_fp->locals + arg1, Pike_sp-1);    pop_stack();    } -  break; + BREAK;      OPCODE0(F_LTOSVAL, "lvalue to svalue")    lvalue_to_svalue_no_free(Pike_sp, Pike_sp-2);    Pike_sp++;   BREAK;      OPCODE0(F_LTOSVAL2, "ltosval2")    Pike_sp[0] = Pike_sp[-1];    Pike_sp[-1].type = PIKE_T_INT;    Pike_sp++;