pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: program.c,v 1.594 2005/06/23 13:33:03 grubba Exp $ + || $Id: program.c,v 1.595 2005/08/10 11:55:49 grubba Exp $   */      #include "global.h"   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "lex.h"
pike.git/src/program.c:1444:    }    }    UNSETJMP(tmp);    }      /* fprintf(stderr,"***Undefined.\n"); */       return 0;   }    - /*! @decl constant UNDEFINED -  *! -  *! The undefined value; ie a zero for which @[zero_type()] returns 1. -  */ -  +    struct node_s *resolve_identifier(struct pike_string *ident);      struct node_s *find_module_identifier(struct pike_string *ident,    int see_inherit)   {    struct node_s *ret;       struct svalue *modules=(struct svalue *)    (used_modules.s.str + used_modules.s.len);   
pike.git/src/program.c:1490:    p->num_used_modules,    modules))) return ret;    modules-=p->num_used_modules;   #ifdef PIKE_DEBUG    if( ((char *)modules ) < used_modules.s.str)    Pike_fatal("Modules out of whack!\n");   #endif    }    }    +  return resolve_identifier(ident); + } +  + /*! @decl constant UNDEFINED +  *! +  *! The undefined value; ie a zero for which @[zero_type()] returns 1. +  */ +  + struct node_s *resolve_identifier(struct pike_string *ident) + {    /* Handle UNDEFINED */    if (ident == UNDEFINED_string) {    struct svalue s;    s.type = T_INT;    s.subtype = NUMBER_UNDEFINED;    s.u.integer = 0;    return mkconstantsvaluenode(&s);    }    -  return resolve_identifier(ident); - } -  - struct node_s *resolve_identifier(struct pike_string *ident) - { +     if(resolve_cache)    {    struct svalue *tmp=low_mapping_string_lookup(resolve_cache,ident);    if(tmp)    {    if(!(SAFE_IS_ZERO(tmp) && tmp->subtype==1))    return mkconstantsvaluenode(tmp);       return 0;    }