pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:107:    (Pike_interpreter.trace_level>3 ? \    sprintf(trace_buffer, "- Target = %+ld\n", \    (long)LOW_GET_JUMP()), \    write_to_stderr(trace_buffer,strlen(trace_buffer)) : 0), \    LOW_GET_JUMP()))      #define SKIPJUMP() (GET_JUMP(), LOW_SKIPJUMP())      #else /* !PIKE_DEBUG */    - #define GET_JUMP() (/*write_to_stderr("GET_JUMP\n", 9),*/ LOW_GET_JUMP()) - #define SKIPJUMP() (/*write_to_stderr("SKIPJUMP\n", 9),*/ LOW_SKIPJUMP()) + #define GET_JUMP() (LOW_GET_JUMP()) + #define SKIPJUMP() (LOW_SKIPJUMP())      #endif /* PIKE_DEBUG */      #define DOJUMP() do { \    PIKE_OPCODE_T *addr; \    INT32 tmp; \    JUMP_SET_TO_PC_AT_NEXT (addr); \    tmp = GET_JUMP(); \    SET_PROG_COUNTER(addr + tmp); \    FETCH; \
pike.git/src/interpret_functions.h:1264:    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); */ +     DONT_BRANCH();    }else{    DO_BRANCH();    }    pop_stack();    });   });      OPCODE0_BRANCH(F_QUICK_BRANCH_WHEN_ZERO, "(Q) branch if zero", I_UPDATE_SP, {    if(Pike_sp[-1].u.integer)
pike.git/src/interpret_functions.h:1323:   /* fprintf(stderr,"******OBJECT OVERLOAD IN TYPEP***** %s\n",get_name_of_type(arg1)); */    push_text(get_name_of_type(arg1));    apply_low(o, fun +    o->prog->inherits[SUBTYPEOF(Pike_sp[-2])].identifier_level, 1);    arg1=UNSAFE_IS_ZERO(Pike_sp-1) ? T_FLOAT : T_OBJECT ;    pop_stack();    }    }    if(TYPEOF(Pike_sp[-1]) == arg1)    { -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    }else{    DO_BRANCH();    }    pop_stack();   });      OPCODE1_BRANCH(F_BRANCH_IF_LOCAL, "branch if local", 0, {    if(UNSAFE_IS_ZERO(Pike_fp->locals + arg1))    { -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    }else{    DO_BRANCH();    }   });      OPCODE1_BRANCH(F_BRANCH_IF_NOT_LOCAL, "branch if !local", 0, {    if(!UNSAFE_IS_ZERO(Pike_fp->locals + arg1))    { -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    }else{    DO_BRANCH();    }   });      #define CJUMP(X, DESC, Y) \    OPCODE0_BRANCH(X, DESC, I_UPDATE_SP, { \    if(Y(Pike_sp-2,Pike_sp-1)) { \    DO_BRANCH(); \    }else{ \ -  /* write_to_stderr("foreach\n", 8); */ \ +     DONT_BRANCH(); \    } \    pop_2_elems(); \    })      CJUMP(F_BRANCH_WHEN_EQ, "branch if ==", is_eq);   CJUMP(F_BRANCH_WHEN_NE, "branch if !=", !is_eq);   CJUMP(F_BRANCH_WHEN_LT, "branch if <", is_lt);   CJUMP(F_BRANCH_WHEN_LE, "branch if <=", is_le);   CJUMP(F_BRANCH_WHEN_GT, "branch if >", is_gt);   CJUMP(F_BRANCH_WHEN_GE, "branch if >=", is_ge);      OPCODE0_BRANCH(F_BRANCH_AND_POP_WHEN_ZERO, "branch & pop if zero", 0, {    if(!UNSAFE_IS_ZERO(Pike_sp-1))    { -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    }else{    DO_BRANCH();    pop_stack();    }   });      OPCODE0_BRANCH(F_BRANCH_AND_POP_WHEN_NON_ZERO, "branch & pop if !zero", 0, {    if(UNSAFE_IS_ZERO(Pike_sp-1))    { -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    }else{    DO_BRANCH();    pop_stack();    }   });      OPCODE0_BRANCH(F_LAND, "&&", I_UPDATE_SP, {    if(!UNSAFE_IS_ZERO(Pike_sp-1))    { -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    pop_stack();    }else{    DO_BRANCH();    }   });      OPCODE0_BRANCH(F_LOR, "||", I_UPDATE_SP, {    if(UNSAFE_IS_ZERO(Pike_sp-1))    { -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    pop_stack();    }else{    DO_BRANCH();    }   });      OPCODE0_BRANCH(F_EQ_OR, "==||", I_UPDATE_SP, {    if(!is_eq(Pike_sp-2,Pike_sp-1))    { -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    pop_2_elems();    }else{    DO_BRANCH();    pop_2_elems();    push_int(1);    }   });      OPCODE0_BRANCH(F_EQ_AND, "==&&", I_UPDATE_SP, {    if(is_eq(Pike_sp-2,Pike_sp-1))    { -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    pop_2_elems();    }else{    DO_BRANCH();    pop_2_elems();    push_int(0);    }   });      #ifndef ENTRY_PROLOGUE_SIZE
pike.git/src/interpret_functions.h:1633:    OPCODE0_BRANCH(ID, DESC, 0, { \    union anything *i=get_pointer_if_this_type(Pike_sp-2, T_INT); \    if(i && !INT_TYPE_ADD_OVERFLOW(i->integer,INC) && \    TYPEOF(Pike_sp[-3]) == T_INT) \    { \    i->integer += INC; \    if(i->integer OP2 Pike_sp[-3].u.integer) \    { \    DO_BRANCH(); \    }else{ \ -  /* write_to_stderr("loop\n", 8); */ \ +     DONT_BRANCH(); \    } \    }else{ \    lvalue_to_svalue_no_free(Pike_sp,Pike_sp-2); Pike_sp++; \    push_int(INC); \    f_add(2); \    assign_lvalue(Pike_sp-3,Pike_sp-1); \    if(OP4 ( Pike_sp-1, Pike_sp-4 )) \    { \    DO_BRANCH(); \    }else{ \ -  /* write_to_stderr("loop\n", 8); */ \ +     DONT_BRANCH(); \    } \    pop_stack(); \    } \    })      LOOP(F_INC_LOOP, "++Loop", 1, <, is_lt);   LOOP(F_DEC_LOOP, "--Loop", -1, >, is_gt);   LOOP(F_INC_NEQ_LOOP, "++Loop!=", 1, !=, !is_eq);   LOOP(F_DEC_NEQ_LOOP, "--Loop!=", -1, !=, !is_eq);
pike.git/src/interpret_functions.h:1675:    * l2:    * loop(l1)    */   OPCODE0_BRANCH(F_LOOP, "loop", I_UPDATE_SP, { /* loopcnt */    /* Use >= and 1 to be able to reuse the 1 for the subtraction. */    push_int(1);    if (!is_lt(Pike_sp-2, Pike_sp-1)) {    o_subtract();    DO_BRANCH();    } else { -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    pop_2_elems();    }   });      OPCODE0_BRANCH(F_FOREACH, "foreach", 0, { /* array, lvalue, i */    if(TYPEOF(Pike_sp[-4]) != 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)    {
pike.git/src/interpret_functions.h:1697:    /* Isn't this an internal compiler error? /mast */    Pike_error("Foreach loop variable is negative!\n"));    assign_lvalue(Pike_sp-3, Pike_sp[-4].u.array->item + Pike_sp[-1].u.integer);    DO_BRANCH();    Pike_sp[-1].u.integer++;    DO_IF_DEBUG (    if (SUBTYPEOF(Pike_sp[-1]))    Pike_fatal ("Got unexpected subtype in loop variable.\n");    );    }else{ -  /* write_to_stderr("foreach\n", 8); */ +     DONT_BRANCH();    }   });      OPCODE0(F_MAKE_ITERATOR, "get_iterator", 0, {    f_get_iterator(1);   });      /* Stack is: iterator, index lvalue, value lvalue. */   OPCODE0_BRANCH (F_FOREACH_START, "foreach start", 0, {