pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:681:       return t;   }      #ifdef DEBUG_MALLOC   #define mk_type(T,CAR,CDR,FLAG) ((struct pike_type *)debug_malloc_pass(debug_mk_type(T,CAR,CDR,FLAG)))   #else /* !DEBUG_MALLOC */   #define mk_type debug_mk_type   #endif /* DEBUG_MALLOC */    - #ifdef PIKE_DEBUG - void debug_check_type_string(struct pike_type *s) - { -  /* FIXME: Add verification code here */ - } -  - #endif /* PIKE_DEBUG */ -  +    struct pike_type **type_stack;   struct pike_type ***pike_type_mark_stack;      ptrdiff_t pop_stack_mark(void)   {    Pike_compiler->pike_type_mark_stackp--;    if(Pike_compiler->pike_type_mark_stackp<pike_type_mark_stack)    Pike_fatal("Type mark stack underflow\n");       TYPE_STACK_DEBUG("pop_stack_mark");
pike.git/src/pike_types.c:2615:   }      void my_describe_type(struct pike_type *type)   {    low_describe_type(type);   }      struct pike_string *describe_type(struct pike_type *type)   {    dynamic_buffer save_buf; -  check_type_string(type); +     if(!type) return make_shared_string("mixed");    init_buf(&save_buf);    low_describe_type(type);    return free_buf(&save_buf);   }         /******/      TYPE_T compile_type_to_runtime_type(struct pike_type *t)
pike.git/src/pike_types.c:4783:    push_type(T_MIXED);    return 1;    }    }    return 0;   }         int match_types(struct pike_type *a, struct pike_type *b)   { -  check_type_string(a); -  check_type_string(b); +     clear_markers();    return !!low_match_types(a, b, 0);   }      int pike_types_le(struct pike_type *a,struct pike_type *b)   { -  check_type_string(a); -  check_type_string(b); +     clear_markers();    return low_pike_types_le(a, b, 0, 0);   }         #ifdef DEBUG_MALLOC   #define low_index_type(X,Y,Z) ((struct pike_type *)debug_malloc_pass(debug_low_index_type((X),(Y),(Z))))   #else   #define low_index_type debug_low_index_type   #endif
pike.git/src/pike_types.c:5463:       default:    return 0;    }   }      int check_indexing(struct pike_type *type,    struct pike_type *index_type,    node *n)   { -  check_type_string(type); -  check_type_string(index_type); -  +     return low_check_indexing(type, index_type, n);   }      static int low_count_arguments(struct pike_type *q)   {    int num=0, num2;       switch(q->type)    {    case T_OR:
pike.git/src/pike_types.c:5519:    return num;    }   }      /* Count the number of arguments for a funciton type.    * return -1-n if the function can take number of arguments    * >= n (varargs)    */   int count_arguments(struct pike_type *s)   { -  check_type_string(s); -  +     return low_count_arguments(s);   }         static int low_minimum_arguments(struct pike_type *q)   {    int num;       switch(q->type)    {
pike.git/src/pike_types.c:5565:    case T_MANY:    return 0;    }   }      /* Count the minimum number of arguments for a function type.    */   int minimum_arguments(struct pike_type *s)   {    int ret; -  check_type_string(s); +        ret = low_minimum_arguments(s);      #if 0    fprintf(stderr,"minimum_arguments(");    simple_describe_type(s);    fprintf(stderr," ) -> %d\n",ret);   #endif       return ret;   }      struct pike_type *check_call(struct pike_type *args,    struct pike_type *type,    int strict)   { -  check_type_string(args); -  check_type_string(type); +     clear_markers();    type_stack_mark();    max_correct_args=0;       if(low_get_return_type(type, args))    {    if (strict) {    if (!strict_check_call(type, args)) {    struct pike_type *func_zero_type;