pike.git / src / docode.c

version» Context lines:

pike.git/src/docode.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: docode.c,v 1.97 2001/01/15 00:26:51 mast Exp $"); + RCSID("$Id: docode.c,v 1.98 2001/01/15 18:53:24 mast Exp $");   #include "las.h"   #include "program.h"   #include "pike_types.h"   #include "stralloc.h"   #include "interpret.h"   #include "constants.h"   #include "array.h"   #include "pike_macros.h"   #include "pike_error.h"   #include "pike_memory.h"
pike.git/src/docode.c:108:    cleanup_frame__.cleanup(cleanup_frame__.cleanup_arg); \    POP_AND_DONT_CLEANUP      #define PUSH_STATEMENT_LABEL do { \    struct statement_label new_label__; \    new_label__.prev = current_label; \    if (current_label->break_label != -2) { \    /* Only cover the current label if it's closed. */ \    new_label__.name = 0; \    new_label__.break_label = new_label__.continue_label = -1; \ +  new_label__.emit_break_label = 0; \    new_label__.cleanups = 0; \    new_label__.stack_depth = current_stack_depth; \    current_label = &new_label__; \    } \    else { \    DO_IF_DEBUG( \    new_label__.cleanups = (void *)(ptrdiff_t) -1; \    new_label__.stack_depth = current_stack_depth; \    ) \    current_label->stack_depth = current_stack_depth; \
pike.git/src/docode.c:1341:    if (n->token == F_CONTINUE && label->continue_label < 0) {    my_yyerror("Cannot continue the non-loop statement on line %d.",    lbl_name->line_number);    return 0;    }    }       else {    if (n->token == F_BREAK) {    for (label = current_label; label; label = label->prev) -  if (label->break_label >= 0) +  if (label->break_label >= 0 && !label->emit_break_label)    goto label_found_2;    yyerror("Break outside loop or switch.");    return 0;    }    else {    for (label = current_label; label; label = label->prev)    if (label->continue_label >= 0)    goto label_found_2;    yyerror("Continue outside loop.");    return 0;
pike.git/src/docode.c:1402:    lex.current_line = save_line;    goto label_check_done;    }    }    label_check_done:       name.next = current_label->name;    current_label->name = &name;       if (!name.next) { -  current_label->emit_break_label = 0; +     if (n->token == F_CUSTOM_STMT_LABEL)    /* The statement we precede has custom label handling; leave    * the statement_label "open" so the statement will use it    * instead of covering it. */    current_label->break_label = -2;    else    current_label->break_label = -1;    }    DO_CODE_BLOCK(CDR(n));    if (!name.next && current_label->emit_break_label)