pike.git/
src/
mapping.c
Branch:
Tag:
Non-build tags
All tags
No tags
2014-12-04
2014-12-04 19:22:58 by Arne Goedeke <el@laramies.com>
aaf25423291cdfa31b0dc3f5dde04d1fb60d2ceb (
8
lines) (+
8
/-
0
)
[
Show
|
Annotate
]
Branch:
bill/master_archive_support
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;