pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:498:       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));    free_type((struct pike_type *)debug_malloc_pass(cdr));
pike.git/src/pike_types.c:632: 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:741:    (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:932:    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:2486:    case T_MAPPING:    my_strcat("mapping");    if(t->car->type != T_MIXED || t->cdr->type != T_MIXED) {    my_strcat("(");    my_describe_type(t->car);    my_strcat(":");    my_describe_type(t->cdr);    my_strcat(")");    }    break; +  case PIKE_T_AUTO: +  my_strcat("auto"); +  break;    default:    {    char buf[20];    my_strcat("unknown code(");    sprintf(buf, "%d", t->type);    my_strcat(buf);    my_strcat(")");    break;    }    }