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.306 2007/05/07 10:55:28 grubba Exp $ + || $Id: pike_types.c,v 1.307 2007/05/07 12:18:42 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:2567: 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_ZERO)) { +  t = t2; +  } else if (zero_implied && (t2->type == T_ZERO)) { +  t = t1;    } 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:2662:    ret = 1;    break;    }    /* FALL_THOUGH */    default:    t = t1;    ret = -1;    break;    }    } -  if (!elem_on_stack || ((top = peek_type_stack())->type != t->type)) { +  if (!elem_on_stack) {    push_finished_type(t); -  +  } else if ((top = peek_type_stack())->type != t->type) { +  if (zero_implied && (top->type == T_ZERO)) { +  Pike_compiler->type_stackp--; +  free_type(top); +  push_finished_type(t); +  } else if (zero_implied && (t->type == T_ZERO)) { +  /* The zero is implied. */    } else { -  +  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);