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.50 1999/09/16 23:56:09 hubbe Exp $"); + RCSID("$Id: docode.c,v 1.51 1999/09/18 09:21:17 hubbe 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:703:    if(CAR(n)->u.sval.type == T_FUNCTION)    {    if(CAR(n)->u.sval.subtype == FUNCTION_BUILTIN) /* driver fun? */    {    if(!CAR(n)->u.sval.u.efun->docode ||    !CAR(n)->u.sval.u.efun->docode(n))    {    emit2(F_MARK);    do_docode(CDR(n),0);    tmp1=store_constant(& CAR(n)->u.sval, -  !(CAR(n)->tree_info & OPT_EXTERNAL_DEPEND)); +  !(CAR(n)->tree_info & OPT_EXTERNAL_DEPEND), +  CAR(n)->name);    emit(F_APPLY,tmp1);    }    if(n->type == void_type_string)    return 0;       return 1;    }else{    if(CAR(n)->u.sval.u.object == fake_object)    {    emit2(F_MARK);    do_docode(CDR(n),0);    emit(F_CALL_LFUN, CAR(n)->u.sval.subtype);    return 1;    }    }    }       emit2(F_MARK);    do_docode(CDR(n),0);    tmp1=store_constant(& CAR(n)->u.sval, -  !(CAR(n)->tree_info & OPT_EXTERNAL_DEPEND)); +  !(CAR(n)->tree_info & OPT_EXTERNAL_DEPEND), +  CAR(n)->name);    emit(F_APPLY,tmp1);       return 1;    }    else if(CAR(n)->token == F_IDENTIFIER &&    IDENTIFIER_IS_FUNCTION(ID_FROM_INT(new_program, CAR(n)->u.number)->identifier_flags))    {    emit2(F_MARK);    do_docode(CDR(n),0);    emit(F_CALL_LFUN, CAR(n)->u.number);
pike.git/src/docode.c:760:    if(!foo || !foo->token==F_CONSTANT)    {    yyerror("No call_function efun.");    }else{    if(foo->u.sval.type == T_FUNCTION &&    foo->u.sval.subtype == FUNCTION_BUILTIN &&    foo->u.sval.u.efun->function == f_call_function)    {    emit2(F_CALL_FUNCTION);    }else{ -  tmp1=store_constant(& foo->u.sval, 1); +  /* We might want to put "predef::"+foo->name here /Hubbe */ +  tmp1=store_constant(& foo->u.sval, 1, foo->name);    emit(F_APPLY, tmp1);    }    }    free_node(foo);    return 1;    }       case F_ARG_LIST:    tmp1=do_docode(CAR(n),flags & ~WANT_LVALUE);    tmp1+=do_docode(CDR(n),flags);
pike.git/src/docode.c:865:    current_switch_jumptable[e]=current_switch_default;       order_array(sp[-1].u.array,order);       reorder((void *)(current_switch_jumptable+2),cases,sizeof(INT32)*2,order);    free((char *)order);       for(e=1; e<cases*2+2; e++)    update_arg(jumptable[e], current_switch_jumptable[e]);    -  update_arg(tmp1, store_constant(sp-1,1)); +  update_arg(tmp1, store_constant(sp-1,1,0));       pop_stack();    free((char *)jumptable);    free((char *)current_switch_jumptable);       current_switch_jumptable = prev_switch_jumptable;    current_switch_default = prev_switch_default;    current_switch_case = prev_switch_case;    current_switch_values_on_stack = prev_switch_values_on_stack ;   
pike.git/src/docode.c:1131:    }    }      #ifdef PIKE_DEBUG    case T_OBJECT:    if(n->u.sval.u.object->next == n->u.sval.u.object)    fatal("Internal error: Pointer to parent cannot be a compile time constant!\n");   #endif       default: -  tmp1=store_constant(&(n->u.sval),!(n->tree_info & OPT_EXTERNAL_DEPEND)); +  tmp1=store_constant(&(n->u.sval), +  !(n->tree_info & OPT_EXTERNAL_DEPEND), +  n->name);    emit(F_CONSTANT,tmp1);    return 1;       case T_ARRAY:    case T_MAPPING:    case T_MULTISET: -  tmp1=store_constant(&(n->u.sval),!(n->tree_info & OPT_EXTERNAL_DEPEND)); +  tmp1=store_constant(&(n->u.sval), +  !(n->tree_info & OPT_EXTERNAL_DEPEND), +  n->name);    emit(F_CONSTANT,tmp1);       /* copy now or later ? */    if(!(flags & DO_NOT_COPY) && !(n->tree_info & OPT_EXTERNAL_DEPEND))    emit2(F_COPY_VALUE);    return 1;       }       case F_LOCAL: