pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:531:       case T_ARRAY:    case T_MULTISET:    case T_NOT:    case T_TYPE:    case T_PROGRAM:    case T_STRING:    /* Free car */    free_type((struct pike_type *)debug_malloc_pass(car));    break; +  case PIKE_T_AUTO: +  if( car ) +  free_type((struct pike_type *)debug_malloc_pass(car)); +  break;       case T_SCOPE:    case T_ASSIGN:    /* Free cdr */    free_type((struct pike_type *)debug_malloc_pass(cdr));    break;       case PIKE_T_ATTRIBUTE:    case PIKE_T_NAME:    free_string((struct pike_string *)debug_malloc_pass(car));
pike.git/src/pike_types.c:661: Inside #if defined(DEBUG_MALLOC)
   case '8':    case '9':    case T_FLOAT:    case T_MIXED:    case T_VOID:    case T_ZERO:    case PIKE_T_UNKNOWN:    case T_INT:    case T_OBJECT:    break; +  case PIKE_T_AUTO: +  break;       default:    Pike_fatal("mk_type(): Unhandled type-node: %d\n", type);    break;    }   #else /* !DEBUG_MALLOC */    if (type == T_ASSIGN) {    t->flags |= PT_FLAG_ASSIGN_0 << PTR_TO_INT(car);    }   #endif /* DEBUG_MALLOC */
pike.git/src/pike_types.c:762:    (void *)(ptrdiff_t)id, 0);       TYPE_STACK_DEBUG("push_object_type");   }      void debug_push_object_type_backwards(int flag, INT32 id)   {    push_object_type(flag, id);   }    + /* used while compiling to get the actual type of the auto type. */ + void debug_push_auto_typed_type( struct pike_type *aggregate ) + { +  copy_pike_type( *++Pike_compiler->type_stackp, +  mk_type(PIKE_T_AUTO, +  (void *)(ptrdiff_t)aggregate, +  NULL, +  0 ) ); +  + } +    void debug_push_scope_type(int level)   {    *Pike_compiler->type_stackp = mk_type(T_SCOPE,    (void *)(ptrdiff_t)level,    *Pike_compiler->type_stackp,    PT_COPY_CDR);       TYPE_STACK_DEBUG("push_scope_type");   }   
pike.git/src/pike_types.c:934:    case PIKE_T_NAME:    default:    /* Should not occur. */    Pike_fatal("Unsupported argument to push_type(): %d\n", type);    break;       case T_FLOAT:    case T_MIXED:    case T_VOID:    case T_ZERO: +  case PIKE_T_AUTO:    case PIKE_T_UNKNOWN:    /* Leaf type. */    *(++Pike_compiler->type_stackp) = mk_type(type, NULL, NULL, 0);    break;       case '0':    case '1':    case '2':    case '3':    case '4':
pike.git/src/pike_types.c:2223:    fprintf(stderr, ")");    break;    case T_NOT:    fprintf(stderr, "not(");    simple_describe_type(s->car);    fprintf(stderr, ")");    break;    case T_VOID: fprintf(stderr, "void"); break;    case T_ZERO: fprintf(stderr, "zero"); break;    case T_MIXED: fprintf(stderr, "mixed"); break; -  +  case PIKE_T_AUTO: fprintf(stderr, "auto"); break;    default:    fprintf(stderr, "Unknown type node: %d, %p:%p",    s->type, s->car, s->cdr);   #ifdef DEBUG_MALLOC    debug_malloc_dump_references(s, 0, 2, 0);   #endif    break;    }    if (s->flags) {    fprintf(stderr, "[%06x]", s->flags);
pike.git/src/pike_types.c:2518:    }    break;       case T_MAPPING:    if(t->car->type != T_MIXED || t->cdr->type != T_MIXED) {    string_builder_sprintf(s, "mapping(%T:%T)", t->car, t->cdr);    } else {    string_builder_strcat(s, "mapping");    }    break; +  case PIKE_T_AUTO: +  my_strcat("auto"); +  break;    default:    {    string_builder_sprintf(s, "unknown code(%d)", t->type);    break;    }    }   }      struct pike_string *describe_type(struct pike_type *type)   {