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.175 2004/10/06 18:35:02 mast Exp $ + || $Id: interpret_functions.h,v 1.176 2004/10/30 11:38:25 mast Exp $   */      /*    * Opcode definitions for the interpreter.    */      #include "global.h"      #undef CJUMP   #undef AUTO_BIGNUM_LOOP_TEST
pike.git/src/interpret_functions.h:649:    dmalloc_touch_svalue(Pike_sp-1);    lvalue_to_svalue_no_free(Pike_sp, Pike_sp-2);    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;    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.
pike.git/src/interpret_functions.h:672:    {    LOCAL_VAR(struct svalue tmp);    tmp.type = PIKE_T_INT;    tmp.subtype = NUMBER_NUMBER;    tmp.u.integer = 0;    assign_lvalue(Pike_sp-4, &tmp);    }   });      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;    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
pike.git/src/interpret_functions.h:695:    (BIT_ARRAY | BIT_MULTISET | BIT_MAPPING | BIT_STRING) )    {    LOCAL_VAR(struct svalue tmp);    tmp.type = PIKE_T_INT;    tmp.subtype = NUMBER_NUMBER;    tmp.u.integer = 0;    assign_lvalue(Pike_sp-5, &tmp);    }   });    + OPCODE0(F_LTOSVAL1, "ltosval1", I_UPDATE_SP, { +  dmalloc_touch_svalue(Pike_sp-2); +  dmalloc_touch_svalue(Pike_sp-1); +  +  lvalue_to_svalue_no_free(Pike_sp, Pike_sp-2); +  Pike_sp++; +  +  /* See ltosval3. This opcode is used e.g. in foo = foo[..] where no +  * bound arguments are pushed on the stack. */ +  if( (1 << Pike_sp[-1].type) & +  (BIT_ARRAY | BIT_MULTISET | BIT_MAPPING | BIT_STRING) ) +  { +  LOCAL_VAR(struct svalue tmp); +  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, {    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(
pike.git/src/interpret_functions.h:1806:    struct pike_string *t = describe_type(Pike_sp[-2].u.type);    fprintf(stderr, "Soft cast to %s\n", t->str);    free_string(t);    }    });    }    stack_swap();    pop_stack();   });    - OPCODE0_ALIAS(F_RANGE, "range", I_UPDATE_SP, o_range); + OPCODE1_ALIAS(F_RANGE, "range", I_UPDATE_SP, o_range2);      OPCODE0(F_COPY_VALUE, "copy_value", 0, {    LOCAL_VAR(struct svalue tmp);    copy_svalues_recursively_no_free(&tmp,Pike_sp-1,1,0);    free_svalue(Pike_sp-1);    move_svalue (Pike_sp - 1, &tmp);    print_return_value();   });      OPCODE0(F_INDIRECT, "indirect", I_UPDATE_SP, {