pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:122:      #else /* !PIKE_DEBUG */      #define GET_JUMP() (/*write_to_stderr("GET_JUMP\n", 9),*/ LOW_GET_JUMP())   #define SKIPJUMP() (/*write_to_stderr("SKIPJUMP\n", 9),*/ LOW_SKIPJUMP())      #endif /* PIKE_DEBUG */      #define DOJUMP() do { \    PIKE_OPCODE_T *addr; \ -  INT32 tmp; \ +  INT32 tmp; \    JUMP_SET_TO_PC_AT_NEXT (addr); \ -  tmp = GET_JUMP(); \ -  SET_PROG_COUNTER(addr + tmp); \ -  FETCH; \ -  if(tmp < 0) \ +  tmp = GET_JUMP(); \ +  SET_PROG_COUNTER(addr + tmp); \ +  FETCH; \ +  if(tmp < 0) \    FAST_CHECK_THREADS_ON_BRANCH(); \    } while(0)      #endif /* OVERRIDE_JUMPS */         /* WARNING:    * The surgeon general has stated that define code blocks    * without do{}while() can be hazardous to your health.    * However, in these cases it is required to handle break
pike.git/src/interpret_functions.h:503:    {    SET_SVAL(Pike_fp->locals[arg1+e], PIKE_T_INT, NUMBER_NUMBER, integer, 0);    }   });      OPCODE1(F_CLEAR_LOCAL, "clear local", 0, {    free_svalue(Pike_fp->locals + arg1);    SET_SVAL(Pike_fp->locals[arg1], PIKE_T_INT, NUMBER_NUMBER, integer, 0);   });    + OPCODE2(F_ADD_LOCALS_AND_POP, "local += local", 0,{ +  struct svalue *dst = Pike_fp->locals+arg1; +  struct svalue *src = Pike_fp->locals+arg2; +  if( dst->type == PIKE_T_INT +  && src->type == PIKE_T_INT +  DO_IF_BIGNUM( +  &&(!INT_TYPE_ADD_OVERFLOW(src->u.integer,dst->u.integer)))) +  { +  SET_SVAL_SUBTYPE(*dst,NUMBER_NUMBER); +  dst->u.integer += src->u.integer; +  } +  else +  { +  push_svalue( dst ); +  push_svalue( src ); +  f_add(2); +  assign_svalue( Pike_fp->locals+arg1,Pike_sp-1); +  pop_stack(); +  } + }); +  + OPCODE2(F_ADD_LOCAL_INT_AND_POP, "local += number", 0,{ +  struct svalue *dst = Pike_fp->locals+arg1; +  if( dst->type == PIKE_T_INT +  DO_IF_BIGNUM( +  &&(!INT_TYPE_ADD_OVERFLOW(dst->u.integer,arg2)))) +  { +  SET_SVAL_SUBTYPE(*dst,NUMBER_NUMBER); +  dst->u.integer += arg2; +  } +  else +  { +  push_svalue( dst ); +  push_int( arg2 ); +  f_add(2); +  assign_svalue( Pike_fp->locals+arg1,Pike_sp-1); +  pop_stack(); +  } + }); +    OPCODE1(F_INC_LOCAL, "++local", I_UPDATE_SP, {    if( (TYPEOF(Pike_fp->locals[arg1]) == PIKE_T_INT)    DO_IF_BIGNUM(    && (!INT_TYPE_ADD_OVERFLOW(Pike_fp->locals[arg1].u.integer, 1))    )    )    {    push_int(++(Pike_fp->locals[arg1].u.integer));    SET_SVAL_SUBTYPE(Pike_fp->locals[arg1], NUMBER_NUMBER); /* Could have UNDEFINED there before. */    } else {    push_svalue(Pike_fp->locals+arg1);    push_int(1);    f_add(2);    assign_svalue(Pike_fp->locals+arg1,Pike_sp-1); -  +  pop_stack();    }   });      OPCODE1(F_POST_INC_LOCAL, "local++", I_UPDATE_SP, {    push_svalue( Pike_fp->locals + arg1);       if( (TYPEOF(Pike_fp->locals[arg1]) == PIKE_T_INT)    DO_IF_BIGNUM(    && (!INT_TYPE_ADD_OVERFLOW(Pike_fp->locals[arg1].u.integer, 1))    )
pike.git/src/interpret_functions.h:1014:    assign_lvalue(Pike_sp-3, Pike_sp-1);    pop_n_elems(3);   });      OPCODE1(F_ASSIGN_LOCAL_AND_POP, "assign local and pop", I_UPDATE_SP, {    free_svalue(Pike_fp->locals + arg1);    move_svalue (Pike_fp->locals + arg1, Pike_sp - 1);    Pike_sp--;   });    + OPCODE2(F_ASSIGN_LOCAL_NUMBER_AND_POP, "assign local number and pop", 0, { +  free_svalue(Pike_fp->locals + arg1); +  Pike_fp->locals[arg1].u.integer = arg2; +  Pike_fp->locals[arg1].type = PIKE_T_INT; + }); +    OPCODE1(F_ASSIGN_GLOBAL, "assign global", 0, {    object_low_set_index(Pike_fp->current_object,    arg1 + Pike_fp->context->identifier_level,    Pike_sp-1);   });      OPCODE1(F_ASSIGN_GLOBAL_AND_POP, "assign global and pop", I_UPDATE_SP, {    object_low_set_index(Pike_fp->current_object,    arg1 + Pike_fp->context->identifier_level,    Pike_sp-1);    pop_stack();   });    -  + OPCODE2(F_ASSIGN_GLOBAL_NUMBER_AND_POP, "assign global number and pop", 0, { +  struct svalue tmp; +  SET_SVAL(tmp,PIKE_T_INT,0,integer,arg2); +  object_low_set_index(Pike_fp->current_object, +  arg1 + Pike_fp->context->identifier_level, +  &tmp); + });    -  +    /* Stack machine stuff */      OPCODE0(F_POP_VALUE, "pop", I_UPDATE_SP, {    pop_stack();   });      OPCODE1(F_POP_N_ELEMS, "pop_n_elems", I_UPDATE_SP, {    pop_n_elems(arg1);   });