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.7 1997/01/16 05:00:43 hubbe Exp $"); + RCSID("$Id: docode.c,v 1.8 1997/01/27 01:12:53 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 "macros.h"   #include "error.h"
pike.git/src/docode.c:341:    case F_SUB_EQ:    case F_MULT_EQ:    case F_MOD_EQ:    case F_DIV_EQ:    tmp1=do_docode(CAR(n),DO_LVALUE);   #ifdef DEBUG    if(tmp1 != 2)    fatal("HELP! FATAL INTERNAL COMPILER ERROR\n");   #endif    -  if(CAR(n)->type->str[0] == T_ARRAY) +  if(match_types(CAR(n)->type,array_type_string) || +  match_types(CAR(n)->type,string_type_string))    {    if(do_docode(CDR(n), 0)!=1)    fatal("Internal compiler error, shit happens\n");    emit2(F_LTOSVAL2);    }else{    emit2(F_LTOSVAL);    if(do_docode(CDR(n), 0)!=1)    fatal("Internal compiler error, shit happens (again)\n");    }   
pike.git/src/docode.c:392:    case F_LSH:    case F_RSH:    case F_ADD:    case F_MOD:    case F_SUBTRACT:    case F_DIVIDE:    case F_MULTIPLY:    if(node_is_eq(CDR(n),CAAR(n)))    {    tmp1=do_docode(CDR(n),DO_LVALUE); -  if(match_types(CDR(n)->type,array_type_string)) +  if(match_types(CDR(n)->type,array_type_string) || +  match_types(CDR(n)->type,string_type_string))    {    if(do_docode(CDAR(n),DO_NOT_COPY)!=1)    fatal("Infernal compiler error (dumpar core |ver hela mattan).\n");    emit2(F_LTOSVAL2);    }else{    emit2(F_LTOSVAL);    if(do_docode(CDAR(n),DO_NOT_COPY)!=1)    fatal("Infernal compiler error (dumpar core).\n");    }   
pike.git/src/docode.c:688:    {    emit2(F_MARK);    do_docode(CDR(n),0);    emit(F_CALL_LFUN, CAR(n)->u.number);    return 1;    }    else    {    struct pike_string *tmp;    struct efun *fun; +  node *foo;       emit2(F_MARK); -  tmp=make_shared_string("call_function"); -  if(!tmp) yyerror("No call_function efun."); -  fun=lookup_efun(tmp); -  if(!fun) yyerror("No call_function efun."); -  free_string(tmp); -  +     do_docode(CAR(n),0);    do_docode(CDR(n),0); -  tmp1=store_constant(& fun->function, 1); +  +  tmp=findstring("call_function"); +  if(!tmp) yyerror("No call_function efun."); +  if(!find_module_identifier(tmp)) +  { +  yyerror("No call_function efun."); +  }else{ +  tmp1=store_constant(sp-1, 1); +  pop_stack();    emit(F_APPLY, tmp1); -  +  }    return 1;    }       case F_ARG_LIST:    tmp1=do_docode(CAR(n),flags & ~DO_LVALUE);    tmp1+=do_docode(CDR(n),flags);    return tmp1;          /* Switch: