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.68 2001/02/25 18:06:54 hubbe Exp $"); + RCSID("$Id: docode.c,v 1.69 2003/09/19 13:54:25 grubba Exp $");   #include "las.h"   #include "program.h"   #include "language.h"   #include "pike_types.h"   #include "stralloc.h"   #include "interpret.h"   #include "constants.h"   #include "array.h"   #include "pike_macros.h"   #include "error.h"
pike.git/src/docode.c:198:   static inline struct compiler_frame *find_local_frame(INT32 depth)   {    struct compiler_frame *f=compiler_frame;    while(--depth>=0) f=f->previous;    return f;   }      static int do_docode2(node *n,int flags)   {    INT32 tmp1,tmp2,tmp3; +  int ret;       if(!n) return 0;       if(flags & DO_LVALUE)    {    switch(n->token)    {    default:    yyerror("Illegal lvalue.");    emit(F_NUMBER,0);
pike.git/src/docode.c:554:    do_jump_when_non_zero(CAR(n),tmp2);    ins_label(current_break);       current_switch_jumptable = prev_switch_jumptable;    current_break=break_save;    current_continue=continue_save;    return 0;    }       case ' ': -  return do_docode(CAR(n),0)+do_docode(CDR(n),DO_LVALUE); +  ret = do_docode(CAR(n),0); +  return ret + do_docode(CDR(n),DO_LVALUE);       case F_FOREACH:    {    node *arr;    INT32 *prev_switch_jumptable = current_switch_jumptable;    INT32 break_save = current_break;    INT32 continue_save = current_continue;       current_switch_jumptable=0;    current_break=alloc_label();
pike.git/src/docode.c:1071:    emit2(F_THROW_ZERO);    ins_label(tmp1);       current_break=break_save;    current_continue=continue_save;    current_switch_jumptable = prev_switch_jumptable;    return 1;    }       case F_LVALUE_LIST: -  return do_docode(CAR(n),DO_LVALUE)+do_docode(CDR(n),DO_LVALUE); +  ret = do_docode(CAR(n),DO_LVALUE); +  return ret + do_docode(CDR(n),DO_LVALUE);       case F_ARRAY_LVALUE:    tmp1=do_docode(CAR(n),DO_LVALUE);   #ifdef PIKE_DEBUG    if(tmp1 & 1)    fatal("Very internal compiler error.\n");   #endif    emit(F_ARRAY_LVALUE, tmp1>>1);    return 2;   
pike.git/src/docode.c:1291:    {    emit(F_GLOBAL_LVALUE,n->u.id.number);    return 2;    }else{    emit(F_GLOBAL,n->u.id.number);    }    }    return 1;       case F_VAL_LVAL: -  return do_docode(CAR(n),flags)+do_docode(CDR(n),flags | DO_LVALUE); +  ret = do_docode(CAR(n),flags); +  return ret + do_docode(CDR(n),flags | DO_LVALUE);       default:    fatal("Infernal compiler error (unknown parse-tree-token).\n");    return 0; /* make gcc happy */    }   }      void do_code_block(node *n)   {    init_bytecode();