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.102 2001/01/31 22:02:12 mast Exp $"); + RCSID("$Id: docode.c,v 1.103 2001/02/05 21:13:10 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:1508:    case F_ARROW:    if(CDR(n)->token != F_CONSTANT || CDR(n)->u.sval.type!=T_STRING)    fatal("Bugg in F_ARROW, index not string.");    if(flags & WANT_LVALUE)    {    /* FIXME!!!! ??? I wonder what needs fixing... /Hubbe */    tmp1=do_docode(CAR(n), 0);    emit1(F_ARROW_STRING, store_prog_string(CDR(n)->u.sval.u.string));    return 2;    }else{ -  tmp1=do_docode(CAR(n), DO_NOT_COPY); +  tmp1 = do_docode(CAR(n), DO_NOT_COPY); +  if ((tmp2 = lfun_lookup_id(CDR(n)->u.sval.u.string)) != -1) { +  emit1(F_LOOKUP_LFUN, tmp2); +  } else {    emit1(F_ARROW, store_prog_string(CDR(n)->u.sval.u.string)); -  +  }    if(!(flags & DO_NOT_COPY))    {    while(n && (n->token==F_INDEX || n->token==F_ARROW)) n=CAR(n);    if(n->token==F_CONSTANT && !(n->node_info & OPT_EXTERNAL_DEPEND))    emit0(F_COPY_VALUE);    }    }    return DO_NOT_WARN((INT32)tmp1);       case F_INDEX: