Branch: Tag:

1997-09-29

1997-09-29 00:57:55 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

({})->identifier implemented

Rev: src/array.c:1.14
Rev: src/object.c:1.24
Rev: src/opcodes.c:1.9
Rev: src/operators.c:1.18
Rev: src/pike_types.c:1.26
Rev: src/testsuite.in:1.55

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: pike_types.c,v 1.25 1997/08/30 18:35:51 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.26 1997/09/29 00:57:55 hubbe Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"
983:       case T_MAPPING:    t+=type_length(t); +  return make_shared_binary_string(t, type_length(t));       case T_ARRAY: -  +  if(low_match_types(string_type_string->str,CDR(n)->type->str,0)) +  { +  struct pike_string *a=low_index_type(t,n); +  if(!a)    return make_shared_binary_string(t, type_length(t)); -  +  +  type_stack_mark(); +  push_finished_type(a); +  free_string(a); +  push_type(T_ARRAY); +  if(low_match_types(int_type_string->str,CDR(n)->type->str,0)) +  { +  push_unfinished_type(t); +  push_type(T_OR);    } -  +  return pop_unfinished_type(); +  }else{ +  return make_shared_binary_string(t, type_length(t));    } -  +  } + }      struct pike_string *index_type(struct pike_string *type, node *n)   {
1012:    case T_NOT:    return !low_check_indexing(type,index_type,n);    -  case T_STRING: +     case T_ARRAY: -  +  if(low_match_types(string_type_string->str, index_type,0) && +  low_check_indexing(type, index_type,n)) +  return 1; +  +  case T_STRING:    return !!low_match_types(int_type_string->str, index_type,0);       case T_OBJECT: