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.196 2007/12/17 18:01:52 grubba Exp $ + || $Id: interpret_functions.h,v 1.197 2008/01/26 22:34:20 mast Exp $   */      /*    * Opcode definitions for the interpreter.    */      #include "global.h"      #undef CJUMP   #undef AUTO_BIGNUM_LOOP_TEST
pike.git/src/interpret_functions.h:643:    Pike_sp++;    print_return_value();   });      OPCODE0(F_LTOSVAL2, "ltosval2", I_UPDATE_SP, {    dmalloc_touch_svalue(Pike_sp-3);    dmalloc_touch_svalue(Pike_sp-2);    dmalloc_touch_svalue(Pike_sp-1);       move_svalue (Pike_sp, Pike_sp - 1); -  Pike_sp[-1].type = PIKE_T_INT; +  mark_free_svalue (Pike_sp - 1);    Pike_sp++;    lvalue_to_svalue_no_free(Pike_sp-2, Pike_sp-4);    /* This is so that foo+=bar (and similar things) will be faster.    * It's done by freeing the old reference to foo after it has been    * pushed on the stack. That way foo can have only 1 reference if we    * are lucky, and then the low array/multiset/mapping manipulation    * routines can be destructive if they like.    */    if( (1 << Pike_sp[-2].type) &    (BIT_ARRAY | BIT_MULTISET | BIT_MAPPING | BIT_STRING) )
pike.git/src/interpret_functions.h:671:   });      OPCODE0(F_LTOSVAL3, "ltosval3", I_UPDATE_SP, {    dmalloc_touch_svalue(Pike_sp-4);    dmalloc_touch_svalue(Pike_sp-3);    dmalloc_touch_svalue(Pike_sp-2);    dmalloc_touch_svalue(Pike_sp-1);       move_svalue (Pike_sp, Pike_sp - 1);    move_svalue (Pike_sp - 1, Pike_sp - 2); -  Pike_sp[-2].type = PIKE_T_INT; +  mark_free_svalue (Pike_sp - 2);    Pike_sp++;    lvalue_to_svalue_no_free(Pike_sp-3, Pike_sp-5);       /* This is so that foo=foo[x..y] (and similar things) will be faster.    * It's done by freeing the old reference to foo after it has been    * pushed on the stack. That way foo can have only 1 reference if we    * are lucky, and then the low array/multiset/mapping manipulation    * routines can be destructive if they like.    */    if( (1 << Pike_sp[-3].type) &
pike.git/src/interpret_functions.h:715:    tmp.type = PIKE_T_INT;    tmp.subtype = NUMBER_NUMBER;    tmp.u.integer = 0;    assign_lvalue(Pike_sp-3, &tmp);    }   });      OPCODE0(F_ADD_TO, "+=", I_UPDATE_SP, {    ONERROR uwp;    move_svalue (Pike_sp, Pike_sp - 1); -  Pike_sp[-1].type=PIKE_T_INT; +  mark_free_svalue (Pike_sp - 1);    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:784:    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; +  mark_free_svalue (Pike_sp - 1);    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:1099:    /* Jumps */   OPCODE0_BRANCH(F_BRANCH, "branch", 0, {    DO_BRANCH();   });      OPCODE2_BRANCH(F_BRANCH_IF_NOT_LOCAL_ARROW, "branch if !local->x", 0, {    LOCAL_VAR(struct svalue tmp);    tmp.type=PIKE_T_STRING;    tmp.u.string=Pike_fp->context.prog->strings[arg1];    tmp.subtype=1; -  Pike_sp->type=PIKE_T_INT; +  mark_free_svalue (Pike_sp);    Pike_sp++;    index_no_free(Pike_sp-1,Pike_fp->locals+arg2, &tmp);    print_return_value();       /* Fall through */       OPCODE0_TAILBRANCH(F_BRANCH_WHEN_ZERO, "branch if zero", I_UPDATE_SP, {    if(!UNSAFE_IS_ZERO(Pike_sp-1))    {    /* write_to_stderr("foreach\n", 8); */
pike.git/src/interpret_functions.h:1371:    TRACE((3,"- Caught exception. catch context: %p\n", cc));    if (!cc) Pike_fatal ("Catch context dropoff.\n");    if (cc->frame != Pike_fp)    Pike_fatal ("Catch context doesn't belong to this frame.\n");    });       debug_malloc_touch_named (cc, "(3)");    UNSETJMP (cc->recovery);    Pike_fp->expendible = cc->save_expendible;    move_svalue (Pike_sp++, &throw_value); -  throw_value.type=T_INT; +  mark_free_svalue (&throw_value);    low_destruct_objects_to_destruct();       if (cc->continue_reladdr < 0)    fast_check_threads_etc(6);    addr = cc->next_addr + cc->continue_reladdr;       DO_IF_DEBUG({    TRACE((3,"- Popping catch context %p ==> %p\n",    cc, cc->prev));    if (!addr) Pike_fatal ("Unexpected null continue addr.\n");
pike.git/src/interpret_functions.h:1795:   });      OPCODE0(F_APPEND_ARRAY, "append array", I_UPDATE_SP|I_UPDATE_M_SP, {    o_append_array(Pike_sp - *(--Pike_mark_sp));    });      OPCODE2(F_LOCAL_LOCAL_INDEX, "local[local]", I_UPDATE_SP, {    LOCAL_VAR(struct svalue *s);    s = Pike_fp->locals + arg1;    if(s->type == PIKE_T_STRING) s->subtype=0; -  Pike_sp++->type=PIKE_T_INT; +  mark_free_svalue (Pike_sp++);    index_no_free(Pike_sp-1,Pike_fp->locals+arg2,s);   });      OPCODE1(F_LOCAL_INDEX, "local index", 0, {    LOCAL_VAR(struct svalue *s);    LOCAL_VAR(struct svalue tmp);    s = Pike_fp->locals + arg1;    if(s->type == PIKE_T_STRING) s->subtype=0;    index_no_free(&tmp,Pike_sp-1,s);    free_svalue(Pike_sp-1);
pike.git/src/interpret_functions.h:1826:    index_no_free(&tmp,Pike_sp-1,s);    free_svalue(Pike_sp-1);    move_svalue (Pike_sp - 1, &tmp);   });      OPCODE2(F_LOCAL_ARROW, "local->x", I_UPDATE_SP, {    LOCAL_VAR(struct svalue tmp);    tmp.type=PIKE_T_STRING;    tmp.u.string=Pike_fp->context.prog->strings[arg1];    tmp.subtype=1; -  Pike_sp->type=PIKE_T_INT; -  Pike_sp++; +  mark_free_svalue (Pike_sp++);    index_no_free(Pike_sp-1,Pike_fp->locals+arg2, &tmp);    print_return_value();   });      OPCODE1(F_ARROW, "->x", 0, {    LOCAL_VAR(struct svalue tmp);    LOCAL_VAR(struct svalue tmp2);    tmp.type=PIKE_T_STRING;    tmp.u.string=Pike_fp->context.prog->strings[arg1];    tmp.subtype=1;