pike.git / src / las.c

version» Context lines:

pike.git/src/las.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: las.c,v 1.134 1999/12/05 19:40:41 mast Exp $"); + RCSID("$Id: las.c,v 1.135 1999/12/07 09:40:56 hubbe 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:2107:    }    if(!match_types(CAR(n)->type,mixed_type_string))    yyerror("Bad conditional expression.");       if (!CDR(n) || CDR(n)->type == void_type_string)    copy_shared_string(n->type,void_type_string);    else if(n->token == F_LAND || CAR(n)->type == CDR(n)->type)    {    copy_shared_string(n->type,CDR(n)->type);    }else{ -  n->type = or_pike_types(CAR(n)->type, CDR(n)->type); +  n->type = or_pike_types(CAR(n)->type, CDR(n)->type, 0);    }    break;       case F_ASSIGN:    if (!CAR(n) || (CAR(n)->type == void_type_string)) {    my_yyerror("Assigning a void expression.");    copy_shared_string(n->type, void_type_string);    break;    } else if(CAR(n) && CDR(n)) {    /* Ensure that the type-fields are up to date. */
pike.git/src/las.c:2166:    if (!CAR(n) || (CAR(n)->type == void_type_string)) {    my_yyerror("Indexing a void expression.");    /* The optimizer converts this to an expression returning 0. */    copy_shared_string(n->type, zero_type_string);    } else {    type_a=CAR(n)->type;    type_b=CDR(n)->type;    if(!check_indexing(type_a, type_b, n))    if(!catch_level)    my_yyerror("Indexing on illegal type."); -  n->type=index_type(type_a,n); +  n->type=index_type(type_a, type_b,n);    }    break;       case F_APPLY:    if (!CAR(n) || (CAR(n)->type == void_type_string)) {    my_yyerror("Calling a void expression.");    } else {    struct pike_string *s;    struct pike_string *f;    char *name;
pike.git/src/las.c:2288:    copy_shared_string(n->type,void_type_string);    break;    }       if(CADR(n)->type == CDDR(n)->type)    {    copy_shared_string(n->type,CADR(n)->type);    break;    }    -  n->type = or_pike_types(CADR(n)->type, CDDR(n)->type); +  n->type = or_pike_types(CADR(n)->type, CDDR(n)->type, 0);    break;       case F_AND_EQ:    case F_OR_EQ:    case F_XOR_EQ:    case F_LSH_EQ:    case F_RSH_EQ:    case F_ADD_EQ:    case F_SUB_EQ:    case F_MULT_EQ: