pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: pike_types.c,v 1.355 2008/09/11 11:46:13 grubba Exp $ + || $Id: pike_types.c,v 1.356 2008/09/12 11:15:07 grubba Exp $   */      #include "global.h"   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"
pike.git/src/pike_types.c:2490:   {    while(haystack->type == separator)    {    if(low_find_exact_type_match(needle, haystack->car, separator))    return 1;    haystack = haystack->cdr;    }    return low_is_same_type(needle, haystack);   }    - static void very_low_or_pike_types(struct pike_type *to_push, -  struct pike_type *not_push) - { -  while(to_push->type == T_OR) -  { -  very_low_or_pike_types(to_push->car, not_push); -  to_push = to_push->cdr; -  } -  /* FIXME: -  * this might use the 'le' operator -  */ -  -  if(!low_find_exact_type_match(to_push, not_push, T_OR)) -  { -  push_finished_type(to_push); -  push_type(T_OR); -  } - } -  +    static void low_or_pike_types(struct pike_type *t1,    struct pike_type *t2,    int zero_implied);      /* Push either t1, t2 or the OR of t1 and t2.    * Returns -1 if t1 was pushed.    * 0 if the OR was pushed. (Successful join)    * 1 if t2 was pushed.    */   static int lower_or_pike_types(struct pike_type *t1,
pike.git/src/pike_types.c:2863:    low_or_pike_types(a,b,1 /*zero_implied*/);    res = pop_unfinished_type();   #if 0    fprintf(stderr, " ==> ");    simple_describe_type(res);    fprintf(stderr, "\n");   #endif    return res;   }    - static void very_low_and_pike_types(struct pike_type *to_push, -  struct pike_type *not_push) - { -  while(to_push->type == T_AND) -  { -  very_low_and_pike_types(to_push->car, not_push); -  to_push = to_push->cdr; -  } -  if(!low_find_exact_type_match(to_push, not_push, T_AND)) -  { -  push_finished_type(to_push); -  push_type(T_AND); -  } - } -  +    static void even_lower_and_pike_types(struct pike_type *t1,    struct pike_type *t2)   {    while(t2->type == T_OR)    {    even_lower_and_pike_types(t1, t2->car);    t2 = t2->cdr;    }    if (t1->type == t2->type) {    if (t1->type == T_INT) {