2002-05-05
2002-05-05 16:31:08 by Martin Stjernholm <mast@lysator.liu.se>
-
f34f648a5feb8117623d1211e287994f69a03b94
(30 lines)
(+19/-11)
[
Show
| Annotate
]
Branch: 7.9
Implemented global.Foo to be able to resolve the module Foo even when there
is a local identifier with that name.
Rev: src/language.yacc:1.277
Rev: src/program.c:1.423
Rev: src/program.h:1.157
Rev: src/testsuite.in:1.510
5:
\*/
/**/
#include "global.h"
- RCSID("$Id: program.c,v 1.422 2002/05/01 21:25:55 mast Exp $");
+ RCSID("$Id: program.c,v 1.423 2002/05/05 16:31:07 mast Exp $");
#include "program.h"
#include "object.h"
#include "dynamic_buffer.h"
950:
return 0;
}
+ struct node_s *resolve_identifier(struct pike_string *ident);
+
struct node_s *find_module_identifier(struct pike_string *ident,
int see_inherit)
{
1014:
return mkconstantsvaluenode(&s);
}
+ return resolve_identifier(ident);
+ }
+
+ struct node_s *resolve_identifier(struct pike_string *ident)
+ {
+ struct node_s *ret;
+
if(resolve_cache)
{
struct svalue *tmp=low_mapping_string_lookup(resolve_cache,ident);
3197: Inside #if defined(PROGRAM_BUILD_DEBUG)
#ifdef PROGRAM_BUILD_DEBUG
{
- fprintf (stderr, "%.*sdefining variable (pass=%d): ",
- compilation_depth, " ", Pike_compiler->compiler_pass);
- push_string (describe_type (t));
- print_svalue (stderr, Pike_sp - 1);
- pop_stack();
+ struct pike_string *d = describe_type (t);
+ fprintf (stderr, "%.*sdefining variable (pass=%d): %s ",
+ compilation_depth, " ", Pike_compiler->compiler_pass, d->str);
+ free_string (d);
push_string (n);
print_svalue (stderr, --Pike_sp);
putc ('\n', stderr);
3228: Inside #if defined(PROGRAM_BUILD_DEBUG)
#ifdef PROGRAM_BUILD_DEBUG
{
- fprintf (stderr, "%.*sdefining variable (pass=%d): ",
- compilation_depth, " ", Pike_compiler->compiler_pass);
- push_string (describe_type (type));
- print_svalue (stderr, Pike_sp - 1);
- pop_stack();
+ struct pike_string *d = describe_type (type);
+ fprintf (stderr, "%.*sdefining variable (pass=%d): %s ",
+ compilation_depth, " ", Pike_compiler->compiler_pass, d->str);
+ free_string (d);
push_string (name);
print_svalue (stderr, --Pike_sp);
putc ('\n', stderr);