pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1:   /* -  * $Id: interpret_functions.h,v 1.39 2001/01/12 01:58:40 mast Exp $ +  * $Id: interpret_functions.h,v 1.40 2001/01/14 20:02:42 grubba Exp $    *    * Opcode definitions for the interpreter.    */      OPCODE0(F_UNDEFINED,"push UNDEFINED")    push_int(0);    Pike_sp[-1].subtype=NUMBER_UNDEFINED;   BREAK;      OPCODE0(F_CONST0, "push 0")
pike.git/src/interpret_functions.h:909:    constants[arg2].sval.u.array,Pike_fp->locals + arg1);    pc=(unsigned char *)DO_ALIGN(pc,sizeof(INT32));    pc+=(tmp>=0 ? 1+tmp*2 : 2*~tmp) * sizeof(INT32);    if(*(INT32*)pc < 0) fast_check_threads_etc(7);    pc+=*(INT32*)pc;   }   BREAK;          /* FIXME: Does this need bignum tests? /Fixed - Hubbe */ +  /* LOOP(OPCODE, INCREMENT, OPERATOR, IS_OPERATOR) */    LOOP(F_INC_LOOP, 1, <, is_lt);    LOOP(F_DEC_LOOP, -1, >, is_gt);    LOOP(F_INC_NEQ_LOOP, 1, !=, !is_eq);    LOOP(F_DEC_NEQ_LOOP, -1, !=, !is_eq);    -  + /* Use like: +  * +  * push(loopcnt) +  * branch(l2) +  * l1: +  * sync_mark +  * code +  * pop_sync_mark +  * l2: +  * loop(l1) +  */ + OPCODE0_JUMP(F_LOOP, "loop") /* loopcnt */ + { +  /* Use ge and 1 to be able to reuse the 1 for the subtraction. */ +  push_int(1); +  if (is_ge(sp-2, sp-1)) { +  o_subtract(); +  DOJUMP(); +  } else { +  pop_n_elems(2); +  SKIPJUMP(); +  } + } + BREAK; +     CASE(F_FOREACH) /* array, lvalue, X, i */    {    if(Pike_sp[-4].type != PIKE_T_ARRAY)    PIKE_ERROR("foreach", "Bad argument 1.\n", Pike_sp-3, 1);    if(Pike_sp[-1].u.integer < Pike_sp[-4].u.array->size)    {    fast_check_threads_etc(10);    index_no_free(Pike_sp,Pike_sp-4,Pike_sp-1);    Pike_sp++;    assign_lvalue(Pike_sp-4, Pike_sp-1);