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.290 2007/04/17 13:07:26 grubba Exp $ + || $Id: pike_types.c,v 1.291 2007/04/18 11:58:59 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:2285: Inside #if 0
   struct pike_type *top = NULL;   #if 0    fprintf(stderr, " lower_or_pike_types(");    simple_describe_type(t1);    fprintf(stderr, ", ");    simple_describe_type(t2);    fprintf(stderr, ")\n");   #endif    if (t1 == t2) {    t = t1; -  } else if (zero_implied && (t1->type == T_MIXED || t2->type == T_MIXED)) { -  t = mixed_type_string; +     } else if (t1->type < t2->type) {    t = t1;    ret = -1;    } else if (t1->type > t2->type) {    t = t2;    ret = 1;    } else {   #ifdef PIKE_DEBUG    if (t1->type != t2->type) {    Pike_fatal("Lost track of types t1->type: %d, t2->type: %d\n",
pike.git/src/pike_types.c:2381:    t = t1;    ret = -1;    break;    }    }    if (!elem_on_stack || ((top = peek_type_stack())->type != t->type)) {    push_finished_type(t);    } else {    switch(t->type) {    case T_FLOAT: +  case T_MIXED: +  case T_VOID: +  case T_ZERO:    /* There can only be one. */    break;    case T_INT:    {    INT32 min1 = CAR_TO_INT(t);    INT32 max1 = CDR_TO_INT(t);    INT32 min2 = CAR_TO_INT(top);    INT32 max2 = CDR_TO_INT(top);       if (zero_implied) {