pike.git / src / docode.c

version» Context lines:

pike.git/src/docode.c:262: Inside #if defined(PIKE_DEBUG)
   struct compilation *c = THIS_COMPILATION;   #ifdef PIKE_DEBUG    if (x < 0) Pike_fatal("Cannot do pop of %d args.\n", x);   #endif    switch(x)    {    case 0: return;    case 1: emit0(F_POP_VALUE); break;    default: emit1(F_POP_N_ELEMS,x); break;    } -  current_stack_depth -= x; +  modify_stack_depth(-x);   }      static void do_pop_mark(void *UNUSED(ignored))   {    struct compilation *c = THIS_COMPILATION;    emit0(F_POP_MARK);   }      static void do_pop_to_mark(void *UNUSED(ignored))   {
pike.git/src/docode.c:384:    }       code_expression(n, flags | DO_NOT_COPY, "condition");       if(flags & DO_POP)    {    if(iftrue)    do_jump(F_BRANCH_WHEN_NON_ZERO, label);    else    do_jump(F_BRANCH_WHEN_ZERO, label); -  current_stack_depth--; +  modify_stack_depth(-1);    }else{    if(iftrue)    do_jump(F_LOR, label);    else    do_jump(F_LAND, label);    }   }      #define do_jump_when_zero(N,L) do_cond_jump(N,L,0,DO_POP|DO_NOT_COPY)   #define do_jump_when_non_zero(N,L) do_cond_jump(N,L,1,DO_POP|DO_NOT_COPY)
pike.git/src/docode.c:1683:    /* New-style */    tmp1=do_docode(CAR(arr), DO_NOT_COPY_TOPLEVEL);    emit0(F_MAKE_ITERATOR);       if(CADR(arr))    {    do_docode(CADR(arr), DO_LVALUE);    }else{    emit0(F_CONST0);    emit0(F_CONST0); -  current_stack_depth+=2; +  modify_stack_depth(2);    }       if(CDDR(arr))    {    do_docode(CDDR(arr), DO_LVALUE);    }else{    emit0(F_CONST0);    emit0(F_CONST0); -  current_stack_depth+=2; +  modify_stack_depth(2);    }       PUSH_CLEANUP_FRAME(do_pop, 5);       PUSH_STATEMENT_LABEL;    current_switch.jumptable=0;    current_label->break_label=alloc_label();    current_label->continue_label=alloc_label();       /* Doubt it's necessary to use a label separate from
pike.git/src/docode.c:1757:    do_jump(F_BRANCH_WHEN_GE, tmp1);    /* The value is negative. replace it with zero. */    emit0(F_POP_VALUE);    emit0(F_CONST0);    low_insert_label((INT32)tmp1);    goto foreach_arg_pushed;    }    }    do_docode(arr,DO_NOT_COPY);    emit0(F_CONST0); -  current_stack_depth++; +  modify_stack_depth(1);    foreach_arg_pushed:    PUSH_CLEANUP_FRAME(do_pop, 4);       PUSH_STATEMENT_LABEL;    current_switch.jumptable=0;    current_label->break_label=alloc_label();    current_label->continue_label=alloc_label();       tmp3=do_branch(-1);    tmp1=ins_label(-1);
pike.git/src/docode.c:2135:       if (!(CAR(n) && (current_switch.type = CAR(n)->type))) {    current_switch.type = mixed_type_string;    }       current_label->break_label=alloc_label();       cases=count_cases(CDR(n));       tmp1=emit1(F_SWITCH,0); -  current_stack_depth--; +  modify_stack_depth(-1);    emit1(F_ALIGN,sizeof(INT32));       current_switch.values_on_stack=0;    current_switch.index=2;    current_switch.less_label=-1;    current_switch.greater_label=-1;    current_switch.default_label=-1;    current_switch.jumptable=xalloc(sizeof(INT32)*(cases*2+2));    jumptable=xalloc(sizeof(INT32)*(cases*2+2));   
pike.git/src/docode.c:2485:    current_label->break_label=alloc_label();       DO_CODE_BLOCK(CAR(n));       ins_label(current_label->break_label);    emit0(F_EXIT_CATCH);    POP_STATEMENT_LABEL;    current_switch.jumptable = prev_switch_jumptable;    do_branch (tmp1);    -  current_stack_depth++; +  modify_stack_depth(1);    /* Entry point called via catching_eval_instruction() after    * catching an error.    *    * NB: This is reached by subtracting ENTRY_PROLOGUE_SIZE    * from the label below.    * NB: The label must be after the entry, since it may expand to code    * that requires the entry code to have run.    */    emit0(F_ENTRY);    ins_label((INT32)tmp1);