pike.git / src / docode.c

version» Context lines:

pike.git/src/docode.c:2516:    /* NB: Common case, here we can skip saving the return value. */    emit2(F_SAVE_STACK_TO_LOCAL,    Pike_compiler->compiler_frame->generator_local + 1, 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);    emit1(F_ASSIGN_LOCAL_AND_POP,    Pike_compiler->compiler_frame->generator_local); +  } else if (CDR(n) && CDR(n)->u.sval.u.integer) { +  if (CDR(n)->u.sval.u.integer == 1) { +  yywarning("Continue return statement in non-generator function."); +  } else { +  yywarning("Yield expression in non-generator function.");    } -  +  yywarning("Converted into a plain return."); +  }       /* Insert the appropriate number of F_ESCAPE_CATCH. The rest of    * the cleanup is handled wholesale in low_return et al.    * Alternatively we could handle this too in low_return and    * then allow tail recursion of these kind of returns too. */    for (p = current_label; p; p = p->prev) {    struct cleanup_frame *q;    for (q = p->cleanups; q; q = q->prev) {    if (q->cleanup == do_escape_catch) {    in_catch = 1;