Commit c7e3722b authored by Kenton Varda's avatar Kenton Varda
parent 608d7ed7
...@@ -119,10 +119,10 @@ struct WirePointer { ...@@ -119,10 +119,10 @@ struct WirePointer {
// ----------------------------------------------------------------- // -----------------------------------------------------------------
// Part of pointer that depends on the kind. // Part of pointer that depends on the kind.
union { // Note: Originally StructRef, ListRef, and FarRef were unnamed types, but this somehow
uint32_t upper32Bits; // tickled a bug in GCC:
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58192
struct { struct StructRef {
WireValue<WordCount16> dataSize; WireValue<WordCount16> dataSize;
WireValue<WirePointerCount16> ptrCount; WireValue<WirePointerCount16> ptrCount;
...@@ -138,10 +138,9 @@ struct WirePointer { ...@@ -138,10 +138,9 @@ struct WirePointer {
dataSize.set(size.data); dataSize.set(size.data);
ptrCount.set(size.pointers); ptrCount.set(size.pointers);
} }
} structRef; };
// Also covers capabilities.
struct { struct ListRef {
WireValue<uint32_t> elementSizeAndCount; WireValue<uint32_t> elementSizeAndCount;
KJ_ALWAYS_INLINE(FieldSize elementSize() const) { KJ_ALWAYS_INLINE(FieldSize elementSize() const) {
...@@ -164,15 +163,25 @@ struct WirePointer { ...@@ -164,15 +163,25 @@ struct WirePointer {
elementSizeAndCount.set(((wc / WORDS) << 3) | elementSizeAndCount.set(((wc / WORDS) << 3) |
static_cast<int>(FieldSize::INLINE_COMPOSITE)); static_cast<int>(FieldSize::INLINE_COMPOSITE));
} }
} listRef; };
struct { struct FarRef {
WireValue<SegmentId> segmentId; WireValue<SegmentId> segmentId;
KJ_ALWAYS_INLINE(void set(SegmentId si)) { KJ_ALWAYS_INLINE(void set(SegmentId si)) {
segmentId.set(si); segmentId.set(si);
} }
} farRef; };
union {
uint32_t upper32Bits;
StructRef structRef;
// Also covers capabilities.
ListRef listRef;
FarRef farRef;
}; };
KJ_ALWAYS_INLINE(bool isNull() const) { KJ_ALWAYS_INLINE(bool isNull() const) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment