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.93 2001/01/14 04:13:48 mast Exp $"); + RCSID("$Id: docode.c,v 1.94 2001/01/14 20:52:46 grubba 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:321:      static INT32 count_cases(node *n)   {    INT32 ret;    if(!n) return 0;    switch(n->token)    {    case F_DO:    case F_FOR:    case F_FOREACH: +  case F_LOOP:    case F_INC_LOOP:    case F_DEC_LOOP:    case F_INC_NEQ_LOOP:    case F_DEC_NEQ_LOOP:    case F_SWITCH:    case '?':    return 0;       case F_CASE:    return !!CAR(n)+!!CDR(n);
pike.git/src/docode.c:882:    low_insert_label( DO_NOT_WARN((INT32)tmp3));    do_jump(n->token, DO_NOT_WARN((INT32)tmp1));    ins_label(current_label->break_label);       current_switch_jumptable = prev_switch_jumptable;    POP_STATEMENT_LABEL;    POP_AND_DO_CLEANUP;    return 0;    }    +  case F_LOOP: +  { +  /* FIXME: No support for break or continue. */ +  PUSH_STATEMENT_LABEL; +  tmp1 = do_code(CAR(n)); +  if (tmp1 > 0) { +  do_pop(tmp1-1); +  tmp2 = do_branch(-1); +  tmp3 = ins_label(-1); +  PUSH_STATEMENT_LABEL; +  do_code(CDR(n)); +  POP_STATEMENT_LABEL; +  ins_label(tmp2); +  emit1(F_LOOP, tmp3); +  } +  POP_STATEMENT_LABEL; +  return 0; +  } +     case F_DO:    {    INT32 *prev_switch_jumptable = current_switch_jumptable;    PUSH_STATEMENT_LABEL;       current_switch_jumptable=0;    current_label->break_label=alloc_label();    current_label->continue_label=alloc_label();       tmp2=ins_label(-1);