pike.git / src / docode.c

version» Context lines:

pike.git/src/docode.c:2502: Inside #if defined(PIKE_DEBUG)
   q->cleanup == (cleanup_func) do_cleanup_synch_mark) {    /* Use the ordinary pop mark instruction here since we know    * the stack isn't in synch and we don't want debug checks    * for that. */    do_pop_mark (NULL);    }   #endif    }    }    -  if (Pike_compiler->compiler_frame->generator_local != -1) { -  emit1(F_SAVE_STACK, Pike_compiler->compiler_frame->generator_local + 1); -  if (CDR(n) && CDR(n)->u.sval.u.integer) { +  if ((Pike_compiler->compiler_frame->generator_local != -1) && +  CDR(n) && CDR(n)->u.sval.u.integer) {    /* Continue return. */ -  +  emit1(F_SAVE_STACK_TO_LOCAL, +  Pike_compiler->compiler_frame->generator_local + 1);    continue_label = alloc_label();    /* NB: Subtract 1 to compensate for starting cases at -1. */    emit1(F_NUMBER,    Pike_compiler->compiler_frame->generator_index-1); -  } else { -  emit1(F_NUMBER, -1); -  } +     emit1(F_ASSIGN_LOCAL_AND_POP,    Pike_compiler->compiler_frame->generator_local);    }       emit0(in_catch ? F_VOLATILE_RETURN : F_RETURN);       if (continue_label != -1) {    modify_stack_depth(-1);    Pike_compiler->compiler_frame->generator_jumptable[    Pike_compiler->compiler_frame->generator_index++] =
pike.git/src/docode.c:2951:       if (Pike_compiler->compiler_frame->generator_local != -1) {    INT32 e, states;       /* Zap any initial junk on the stack. */    emit1(F_MARK_AT, 0);    emit0(F_POP_TO_MARK);       /* Restore the stack content and zap extra references. */    emit1(F_LOCAL, Pike_compiler->compiler_frame->generator_local + 1); -  emit0(F_PUSH_ARRAY_AND_CLEAR); +  emit0(F_PUSH_ARRAY_AND_EMPTY);       /* Emit the state-machine switch for the generator. */    emit1(F_LOCAL, Pike_compiler->compiler_frame->generator_local); -  +  emit1(F_NUMBER, -1); +  emit1(F_ASSIGN_LOCAL_AND_POP, +  Pike_compiler->compiler_frame->generator_local);    generator_switch = emit1(F_SWITCH, 0);    emit1(F_ALIGN, sizeof(INT32));       /* NB: Three implicit states:    * -1: return UNDEFINED; // Termination state.    * 0: code // Code start.    * ...    * *: return UNDEFINED; // Termination state (again).    *    * Jumptable: