pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:656:    t->hash = hash;    t->next = pike_type_hash[index];    pike_type_hash[index] = t;       if (flag_method) {    if (flag_method == PT_IS_MARKER) {    t->flags = PT_FLAG_MARKER_0 << (type-'0');    } else if (type == PIKE_T_SCOPE) {    /* The scope blocks propagation of markers. */    t->flags = cdr->flags & ~(PT_FLAG_MARKER|PT_FLAG_ASSIGN); -  } else if (type == T_OR) { +  } else if (type == T_NOT) {    if (car) { -  +  t->flags |= car->flags ^ ~PT_FLAG_MARK_ASSIGN; +  } +  } else if (flag_method & PT_COPY_MORE) { +  if (car && (flag_method & PT_COPY_CAR)) {    t->flags |= car->flags;    } -  if (cdr) { +  if (cdr && (flag_method & PT_COPY_CDR)) {    t->flags |= cdr->flags;    } -  } else if (type == T_NOT) { -  if (car) { -  t->flags |= car->flags ^ ~PT_FLAG_MARK_ASSIGN; -  } +     } else {    if (car && (flag_method & PT_COPY_CAR)) {    t->flags |= car->flags & PT_FLAG_MARK_ASSIGN;    }    if (cdr && (flag_method & PT_COPY_CDR)) {    t->flags |= cdr->flags & PT_FLAG_MARK_ASSIGN;;    }    }    }   
pike.git/src/pike_types.cmod:881:   void debug_push_object_type_backwards(int flag, INT32 id)   {    push_object_type(flag, id);   }      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); +  PT_COPY_MORE|PT_COPY_CDR);       TYPE_STACK_DEBUG("push_scope_type");   }      void debug_push_assign_type(int marker)   {    marker -= '0';   #ifdef PIKE_DEBUG    if ((marker < 0) || (marker > 9)) {    Pike_fatal("Bad assign marker: %d\n", marker);
pike.git/src/pike_types.cmod:909:    TYPE_STACK_DEBUG("push_assign_type");   }      void debug_push_type_attribute(struct pike_string *attr)   {    /* fprintf(stderr, "push_type_attribute(\"%s\")\n", attr->str); */    add_ref(attr);    *Pike_compiler->type_stackp = mk_type(PIKE_T_ATTRIBUTE,    (void *)attr,    *Pike_compiler->type_stackp, -  PT_COPY_CDR); +  PT_COPY_MORE|PT_COPY_CDR);    TYPE_STACK_DEBUG("push_type_attribute");   }      void debug_push_type_name(struct pike_string *name)   {    /* fprintf(stderr, "push_type_name(\"%s\")\n", name->str); */    add_ref(name);    *Pike_compiler->type_stackp = mk_type(PIKE_T_NAME,    (void *)name,    *Pike_compiler->type_stackp, -  PT_COPY_CDR); +  PT_COPY_MORE|PT_COPY_CDR);    TYPE_STACK_DEBUG("push_type_name");   }      static struct pike_type *apply_type_operator(enum PIKE_TYPE op,    struct pike_type *arg1,    struct pike_type *arg2);      void debug_push_type_operator(enum PIKE_TYPE op, struct pike_type *arg)   {    struct pike_type *t = *Pike_compiler->type_stackp;
pike.git/src/pike_types.cmod:1046:    /* Make a new type of the top two types. */    --Pike_compiler->type_stackp;   #ifdef PIKE_DEBUG    if ((*Pike_compiler->type_stackp)->type == type) {    Pike_fatal("Invalid CAR to push_reverse_joiner_type().\n");    }   #endif /* PIKE_DEBUG */    *Pike_compiler->type_stackp = mk_type(type,    *Pike_compiler->type_stackp,    *(Pike_compiler->type_stackp+1), +  ((type == T_OR)? PT_COPY_MORE : 0) |    PT_COPY_BOTH);    break;    default:    Pike_fatal("Illegal reverse joiner type: %d\n", type);    }   }   #define push_reverse_joiner_type(T) do { \    push_reverse_joiner_type(T); \    debug_malloc_touch(debug_peek_type_stack()); \    } while (0)