pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file is part of Pike. For copyright information see COPYRIGHT.   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.283 2002/03/04 16:02:37 mast Exp $"); + RCSID("$Id: las.c,v 1.284 2002/03/04 22:00:13 mast Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:1223:      node *debug_mkapplynode(node *func,node *args)   {    return mknode(F_APPLY, func, args);   }      node *debug_mkefuncallnode(char *function, node *args)   {    struct pike_string *name;    node *n; +  /* Force resolving since we don't want to get tangled up in the +  * placeholder object here. The problem is really that the +  * placeholder purport itself to contain every identifier, which +  * makes it hide the real ones in find_module_identifier. This +  * kludge will fail if the class being placeholded actually contains +  * these identifiers, but then again I think it's a bit odd in the +  * first place to look up these efuns in the module being compiled. +  * Wouldn't it be better if this function consulted +  * compiler_handler->get_default_module? /mast */ +  int orig_force_resolve = force_resolve; +  force_resolve = 1;    name = make_shared_string(function);    if(!name || !(n=find_module_identifier(name,0)))    {    free_string(name);    my_yyerror("Internally used efun undefined: %s",function); -  +  force_resolve = orig_force_resolve;    return mkintnode(0);    }    free_string(name);    n = mkapplynode(n, args); -  +  force_resolve = orig_force_resolve;    return n;   }      node *debug_mkopernode(char *oper_id, node *arg1, node *arg2)   {    if(arg1 && arg2)    arg1=mknode(F_ARG_LIST,arg1,arg2);       return mkefuncallnode(oper_id, arg1);   }
pike.git/src/las.c:1816: Inside #if 1
   if(Pike_sp[-1].type == T_OBJECT)    p=Pike_sp[-1].u.object->prog;    else    p=Pike_sp[-1].u.program;       if(p && !(p->flags & PROGRAM_PASS_1_DONE))    {    if(report_compiler_dependency(p))    {    pop_stack(); + #if 0 +  fprintf(stderr, "Placeholder deployed for %p\n", p); + #endif    ref_push_object(placeholder_object);    break;    }    }    }   #endif       default:    {    ptrdiff_t c;
pike.git/src/las.c:1884:    if (thrown.type != PIKE_T_UNKNOWN) {    *(Pike_sp++) = thrown;    thrown.type = PIKE_T_INT;    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1);    if (SAFE_IS_ZERO(sp-1)) yy_describe_exception(&thrown);    pop_stack();    }    }else if (!force_resolve) {    /* Hope it's there in pass 2 */    pop_stack(); + #if 0 +  fprintf(stderr, "Placeholder deployed when indexing "); +  print_tree(n); +  fprintf(stderr, "with %s\n", id->str); + #endif    ref_push_object(placeholder_object);    if (thrown.type != PIKE_T_UNKNOWN)    free_svalue(&thrown);    }    }    }    END_CYCLIC();    }    }    }