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 {
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); +  SET_SVAL(Pike_fp->locals[arg1], PIKE_T_INT, 0, integer, arg2); + }); +    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);   });   
pike.git/src/interpret_functions.h:1118:    {    /* write_to_stderr("foreach\n", 8); */    DONT_BRANCH();    }else{    DO_BRANCH();    }    pop_stack();    });   });    + OPCODE0_BRANCH(F_QUICK_BRANCH_WHEN_ZERO, "(Q) branch if zero", I_UPDATE_SP, { +  if(Pike_sp[-1].u.integer) +  { +  DONT_BRANCH(); +  }else{ +  DO_BRANCH(); +  } +  pop_stack(); +  });    -  + OPCODE0_BRANCH(F_QUICK_BRANCH_WHEN_NON_ZERO, "(Q) branch if not zero", I_UPDATE_SP, { +  if(Pike_sp[-1].u.integer) +  { +  DO_BRANCH(); +  }else{ +  DONT_BRANCH(); +  } +  pop_stack(); + }); +    OPCODE0_BRANCH(F_BRANCH_WHEN_NON_ZERO, "branch if not zero", I_UPDATE_SP, {    if(UNSAFE_IS_ZERO(Pike_sp-1))    { -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    }else{    DO_BRANCH();    }    pop_stack();   });      OPCODE1_BRANCH(F_BRANCH_IF_TYPE_IS_NOT, "branch if type is !=", I_UPDATE_SP, {   /* fprintf(stderr,"******BRANCH IF TYPE IS NOT***** %s\n",get_name_of_type(arg1)); */    LOCAL_VAR(struct object *o);
pike.git/src/interpret_functions.h:1582:    /* 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(NULL, 0);    if(d_flag>4) do_debug();    );    if(Pike_fp->expendible <= Pike_fp->locals + arg1)    {    pop_n_elems(Pike_sp-1 - (Pike_fp->locals + arg1)); +  DO_IF_DEBUG(Pike_fp->num_locals = arg1);    }else{    push_svalue(Pike_fp->locals + arg1);    }    DO_DUMB_RETURN;   });         OPCODE0_RETURN(F_RETURN_IF_TRUE,"return if true", I_UPDATE_SP|I_UPDATE_FP, {    if(!UNSAFE_IS_ZERO(Pike_sp-1)) DO_RETURN;    pop_stack();