Branch: Tag:

2012-11-15

2012-11-15 06:11:30 by Arne Goedeke <el@laramies.com>

mapping: optimize equal_p for disjunct type fields

121:    return (TYPEOF(*s) == PIKE_T_OBJECT || types & (BIT_OBJECT|(1 << TYPEOF(*s))));   }    + static INLINE int check_type_overlaps(TYPE_FIELD t1, TYPE_FIELD t2) { +  return t1 & t2 || (t1|t2) & BIT_OBJECT; + } +    #ifdef PIKE_DEBUG      /** This function checks that the type field isn't lacking any bits.
1880:       if(m_sizeof(a) != m_sizeof(b)) return 0;    +  if (!check_type_overlaps(a->data->ind_types, b->data->ind_types) || +  !check_type_overlaps(a->data->val_types, b->data->val_types)) return 0; +     curr.pointer_a = a;    curr.pointer_b = b;    curr.next = p;