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.323 2008/05/02 04:15:14 mast Exp $ + || $Id: pike_types.c,v 1.324 2008/05/03 20:06: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:3676: Inside #if defined(PIKE_TYPE_DEBUG)
      fprintf(stderr, "%*s= %d\n", indent*2, "", res);    }    return res;   }      static int low_pike_types_le2(struct pike_type *a, struct pike_type *b,    int array_cnt, unsigned int flags)   #endif /* PIKE_TYPE_DEBUG */   { +  struct compilation *c = MAYBE_THIS_COMPILATION;    int ret;       recurse:   #if 0    fprintf(stderr, "low_pike_types_le(%d, %d, %d, 0x%08x)\n",    a->type, b->type, array_cnt, flags);   #endif /* 0 */       if(a == b) return 1;   
pike.git/src/pike_types.c:3744:    /* FALL_THROUGH */    case PIKE_T_NAME:    a = a->cdr;    goto recurse;    case PIKE_T_ATTRIBUTE:    if ((b->type == PIKE_T_ATTRIBUTE) && (a->car == b->car)) {    a = a->cdr;    b = b->cdr;    goto recurse;    } - #if 0 -  if (!flags & LE_USE_HANDLERS) { +  if (!c) {    a = a->cdr;    goto recurse;    } - #endif /* 0 */ +     if (!low_pike_types_le(a->cdr, b, array_cnt, flags)) return 0; - #if 0 +     ref_push_string((struct pike_string *)a->car);    ref_push_type_value(a->cdr);    ref_push_type_value(b); -  push_int(1); -  if (safe_apply_handler("handle_attribute", error_handler, compat_handler, -  4, 0)) { +  safe_apply_current2(PC_POP_TYPE_ATTRIBUTE_FUN_NUM, 3, +  "pop_type_attribute");    if ((Pike_sp[-1].type == T_INT) &&    (Pike_sp[-1].subtype == NUMBER_NUMBER) &&    (!Pike_sp[-1].u.integer)) {    pop_stack();    return 0;    }    pop_stack(); -  } - #endif /* 0 */ +     return 1;       case T_NOT:    if (b->type == T_NOT) {    struct pike_type *tmp = a->car;    a = b->car;    b = tmp;    array_cnt = -array_cnt;    flags ^= LE_A_B_SWAPPED   #ifdef TYPE_GROUPING
pike.git/src/pike_types.c:3902:    if (ret) return ret;   #endif    b = b->cdr;    goto recurse;       case PIKE_T_RING:    b = b->car;    goto recurse;       case PIKE_T_ATTRIBUTE: - #if 0 -  if (!flags & LE_USE_HANDLERS) { +  if (!c) {    b = b->cdr;    goto recurse;    } - #endif /* 0 */ +     if (!low_pike_types_le(a, b->cdr, array_cnt, flags)) return 0; - #if 0 +     ref_push_string((struct pike_string *)b->car);    ref_push_type_value(a);    ref_push_type_value(b->cdr); -  push_int(2); -  if (safe_apply_handler("handle_attribute", error_handler, compat_handler, -  4, 0)) { +  safe_apply_current2(PC_PUSH_TYPE_ATTRIBUTE_FUN_NUM, 3, +  "push_type_attribute");    if ((Pike_sp[-1].type == T_INT) &&    (Pike_sp[-1].subtype == NUMBER_NUMBER) &&    (!Pike_sp[-1].u.integer)) {    pop_stack();    return 0;    }    pop_stack(); -  } - #endif /* 0 */ +     return 1;    case PIKE_T_SCOPE:   #ifdef TYPE_GROUPING    flags |= LE_B_GROUPED;   #endif    /* FALL_THROUGH */    case PIKE_T_NAME:    b = b->cdr;    goto recurse;