pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1:   /* -  * $Id: interpret_functions.h,v 1.95 2001/09/29 06:19:27 hubbe Exp $ +  * $Id: interpret_functions.h,v 1.96 2001/09/29 08:47:03 hubbe Exp $    *    * Opcode definitions for the interpreter.    */      #include "global.h"      #undef CJUMP   #undef AUTO_BIGNUM_LOOP_TEST   #undef LOOP   #undef COMPARISON
pike.git/src/interpret_functions.h:191:      OPCODE1(F_NEG_NUMBER, "push -int", {    push_int(-arg1);   });      OPCODE1(F_CONSTANT, "constant", {    push_svalue(& Pike_fp->context.prog->constants[arg1].sval);    print_return_value();   });    - OPCODE0(F_SWAP,"swap",{ -  struct svalue tmp; -  tmp=Pike_sp[-2]; -  Pike_sp[-2]=Pike_sp[-1]; -  Pike_sp[-1]=tmp; +  + /* Generic swap instruction: +  * swaps the arg1 top values with the arg2 values beneath +  */ + OPCODE2(F_REARRANGE,"rearrange",{ +  int e; +  check_stack(arg2); +  MEMCPY(Pike_sp,Pike_sp-arg1-arg2,sizeof(struct svalue)*arg2); +  MEMMOVE(Pike_sp-arg1-arg2,Pike_sp-arg1,sizeof(struct svalue)*arg1); +  MEMCPY(Pike_sp-arg2,Pike_sp,sizeof(struct svalue)*arg2);   });      /* The rest of the basic 'push value' instructions */      OPCODE1_TAIL(F_MARK_AND_STRING, "mark & string", {    *(Pike_mark_sp++)=Pike_sp;       OPCODE1(F_STRING, "string", {    copy_shared_string(Pike_sp->u.string,Pike_fp->context.prog->strings[arg1]);    Pike_sp->type=PIKE_T_STRING;
pike.git/src/interpret_functions.h:576:    o_subtract();    stack_pop_to(Pike_fp->locals + arg1);    }   });      OPCODE0(F_LTOSVAL, "lvalue to svalue", {    dmalloc_touch_svalue(Pike_sp-2);    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", {    dmalloc_touch_svalue(Pike_sp-3);    dmalloc_touch_svalue(Pike_sp-2);    dmalloc_touch_svalue(Pike_sp-1);    Pike_sp[0] = Pike_sp[-1];    Pike_sp[-1].type = PIKE_T_INT;    Pike_sp++;    lvalue_to_svalue_no_free(Pike_sp-2, Pike_sp-4);