pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: interpret_functions.h,v 1.194 2007/06/11 16:13:27 grubba Exp $ + || $Id: interpret_functions.h,v 1.195 2007/06/11 18:13:27 grubba Exp $   */      /*    * Opcode definitions for the interpreter.    */      #include "global.h"      #undef CJUMP   #undef AUTO_BIGNUM_LOOP_TEST
pike.git/src/interpret_functions.h:782:    */    SET_ONERROR(uwp, o_assign_lvalue, Pike_sp-4);    f_add(2);    CALL_AND_UNSET_ONERROR(uwp); /* assign_lvalue(Pike_sp-3,Pike_sp-1); */    stack_pop_2_elems_keep_top();    add_to_done:    ; /* make gcc happy */   });      OPCODE0(F_ADD_TO_AND_POP, "+= and pop", I_UPDATE_SP, { +  ONERROR uwp;    move_svalue (Pike_sp, Pike_sp - 1);    Pike_sp[-1].type=PIKE_T_INT;    Pike_sp++;    lvalue_to_svalue_no_free(Pike_sp-2,Pike_sp-4);       if( Pike_sp[-1].type == PIKE_T_INT &&    Pike_sp[-2].type == PIKE_T_INT )    {    DO_IF_BIGNUM(    if(!INT_TYPE_ADD_OVERFLOW(Pike_sp[-1].u.integer, Pike_sp[-2].u.integer))
pike.git/src/interpret_functions.h:835:    LFUN_ADD_EQ)) != -1)    {    apply_low(o, i + p->inherits[Pike_sp[-2].subtype].identifier_level, 1);    /* NB: The lvalue already contains the object, so    * no need to reassign it.    */    pop_n_elems(4);    goto add_to_and_pop_done;    }    } +  /* NOTE: Pike_sp-4 is the lvalue, Pike_sp-2 is the original value. +  * If an error gets thrown, the original value will thus be restored. +  * If f_add() succeeds, Pike_sp-2 will hold the result. +  */ +  SET_ONERROR(uwp, o_assign_lvalue, Pike_sp-4);    f_add(2); -  assign_lvalue(Pike_sp-3,Pike_sp-1); +  CALL_AND_UNSET_ONERROR(uwp); /* assign_lvalue(Pike_sp-3,Pike_sp-1); */    pop_n_elems(3);    add_to_and_pop_done:    ; /* make gcc happy */   });      OPCODE1(F_GLOBAL_LVALUE, "& global", I_UPDATE_SP, {    ref_push_object(Pike_fp->current_object);    push_obj_index(arg1 + Pike_fp->context.identifier_level);   });