Commit 8b0489d8 authored by Kenton Varda's avatar Kenton Varda

Make non-CAPNP_DEBUG_TYPES builds work again.

parent 093fac4a
......@@ -407,6 +407,7 @@ using kj::ThrowOverflow;
using kj::assumeBits;
using kj::assumeMax;
using kj::subtractChecked;
using kj::trySubtract;
template <typename T, typename U>
inline constexpr U* operator+(U* ptr, kj::Quantity<T, U> offset) {
......@@ -530,7 +531,183 @@ inline constexpr kj::ArrayPtr<U> arrayPtr(U* ptr, kj::Quantity<T, U> size) {
#else
#error TODO
template <uint width, typename T = uint>
using BitCountN = T;
template <uint width, typename T = uint>
using ByteCountN = T;
template <uint width, typename T = uint>
using WordCountN = T;
template <uint width, typename T = uint>
using ElementCountN = T;
template <uint width, typename T = uint>
using WirePointerCountN = T;
// XXX
typedef BitCountN<8, uint8_t> BitCount8;
typedef BitCountN<16, uint16_t> BitCount16;
typedef BitCountN<32, uint32_t> BitCount32;
typedef BitCountN<64, uint64_t> BitCount64;
typedef BitCountN<sizeof(uint) * 8, uint> BitCount;
typedef ByteCountN<8, uint8_t> ByteCount8;
typedef ByteCountN<16, uint16_t> ByteCount16;
typedef ByteCountN<32, uint32_t> ByteCount32;
typedef ByteCountN<64, uint64_t> ByteCount64;
typedef ByteCountN<sizeof(uint) * 8, uint> ByteCount;
typedef WordCountN<8, uint8_t> WordCount8;
typedef WordCountN<16, uint16_t> WordCount16;
typedef WordCountN<32, uint32_t> WordCount32;
typedef WordCountN<64, uint64_t> WordCount64;
typedef WordCountN<sizeof(uint) * 8, uint> WordCount;
typedef ElementCountN<8, uint8_t> ElementCount8;
typedef ElementCountN<16, uint16_t> ElementCount16;
typedef ElementCountN<32, uint32_t> ElementCount32;
typedef ElementCountN<64, uint64_t> ElementCount64;
typedef ElementCountN<sizeof(uint) * 8, uint> ElementCount;
typedef WirePointerCountN<8, uint8_t> WirePointerCount8;
typedef WirePointerCountN<16, uint16_t> WirePointerCount16;
typedef WirePointerCountN<32, uint32_t> WirePointerCount32;
typedef WirePointerCountN<64, uint64_t> WirePointerCount64;
typedef WirePointerCountN<sizeof(uint) * 8, uint> WirePointerCount;
template <uint width>
using BitsPerElementN = decltype(BitCountN<width>() / ElementCountN<width>());
template <uint width>
using BytesPerElementN = decltype(ByteCountN<width>() / ElementCountN<width>());
template <uint width>
using WordsPerElementN = decltype(WordCountN<width>() / ElementCountN<width>());
template <uint width>
using PointersPerElementN = decltype(WirePointerCountN<width>() / ElementCountN<width>());
using kj::ThrowOverflow;
// YYY
template <uint i> inline constexpr uint guarded() { return i; }
template <typename T> inline constexpr T guarded(T i) { return i; }
template <typename T> inline constexpr T unguard(T i) { return i; }
template <typename T, typename U> inline constexpr T unguardAs(U i) { return i; }
template <uint64_t requestedMax, typename T> inline constexpr uint unguardMax(T i) { return i; }
template <uint bits, typename T> inline constexpr uint unguardMaxBits(T i) { return i; }
template <uint newMax, typename T, typename ErrorFunc>
inline constexpr T assertMax(T value, ErrorFunc&& func) {
if (KJ_UNLIKELY(value > newMax)) func();
return value;
}
template <typename T, typename ErrorFunc>
inline constexpr T assertMax(uint newMax, T value, ErrorFunc&& func) {
if (KJ_UNLIKELY(value > newMax)) func();
return value;
}
template <uint bits, typename T, typename ErrorFunc = ThrowOverflow>
inline constexpr T assertMaxBits(T value, ErrorFunc&& func = ErrorFunc()) {
if (KJ_UNLIKELY(value > kj::maxValueForBits<bits>())) func();
return value;
}
template <typename T, typename ErrorFunc = ThrowOverflow>
inline constexpr T assertMaxBits(uint bits, T value, ErrorFunc&& func = ErrorFunc()) {
if (KJ_UNLIKELY(value > (1ull << bits) - 1)) func();
return value;
}
template <typename T, typename U> inline constexpr T upgradeGuard(U i) { return i; }
template <uint bits, typename T> inline constexpr T assumeBits(T i) { return i; }
template <uint64_t max, typename T> inline constexpr T assumeMax(T i) { return i; }
template <typename T, typename U, typename ErrorFunc = ThrowOverflow>
inline auto subtractChecked(T a, U b, ErrorFunc&& errorFunc = ErrorFunc())
-> decltype(a - b) {
if (b > a) errorFunc();
return a - b;
}
template <typename T, typename U>
inline auto trySubtract(T a, U b) -> kj::Maybe<decltype(a - b)> {
if (b > a) {
return nullptr;
} else {
return a - b;
}
}
constexpr uint BITS = 1;
constexpr uint BYTES = 1;
constexpr uint WORDS = 1;
constexpr uint ELEMENTS = 1;
constexpr uint POINTERS = 1;
constexpr uint ZERO = 0;
constexpr uint ONE = 1;
// GCC 4.7 actually gives unused warnings on these constants in opt mode...
constexpr uint BITS_PER_BYTE KJ_UNUSED = 8;
constexpr uint BITS_PER_WORD KJ_UNUSED = 64;
constexpr uint BYTES_PER_WORD KJ_UNUSED = 8;
constexpr uint BITS_PER_POINTER KJ_UNUSED = 64;
constexpr uint BYTES_PER_POINTER KJ_UNUSED = 8;
constexpr uint WORDS_PER_POINTER KJ_UNUSED = 1;
// XXX
constexpr uint POINTER_SIZE_IN_WORDS = ONE * POINTERS * WORDS_PER_POINTER;
constexpr uint SEGMENT_WORD_COUNT_BITS = 29; // Number of words in a segment.
constexpr uint LIST_ELEMENT_COUNT_BITS = 29; // Number of elements in a list.
constexpr uint STRUCT_DATA_WORD_COUNT_BITS = 16; // Number of words in a Struct data section.
constexpr uint STRUCT_POINTER_COUNT_BITS = 16; // Number of pointers in a Struct pointer section.
constexpr uint BLOB_SIZE_BITS = 29; // Number of bytes in a blob.
typedef WordCountN<SEGMENT_WORD_COUNT_BITS> SegmentWordCount;
typedef ElementCountN<LIST_ELEMENT_COUNT_BITS> ListElementCount;
typedef WordCountN<STRUCT_DATA_WORD_COUNT_BITS, uint16_t> StructDataWordCount;
typedef WirePointerCountN<STRUCT_POINTER_COUNT_BITS, uint16_t> StructPointerCount;
typedef ByteCountN<BLOB_SIZE_BITS> BlobSize;
// YYY
constexpr auto MAX_SEGMENT_WORDS = kj::maxValueForBits<SEGMENT_WORD_COUNT_BITS>();
constexpr auto MAX_LIST_ELEMENTS = kj::maxValueForBits<LIST_ELEMENT_COUNT_BITS>();
constexpr auto MAX_STUCT_DATA_WORDS = kj::maxValueForBits<STRUCT_DATA_WORD_COUNT_BITS>();
constexpr auto MAX_STRUCT_POINTER_COUNT = kj::maxValueForBits<STRUCT_POINTER_COUNT_BITS>();
typedef uint StructDataBitCount;
typedef uint StructDataOffset;
typedef uint StructPointerOffset;
inline StructDataOffset assumeDataOffset(uint32_t offset) { return offset; }
inline StructPointerOffset assumePointerOffset(uint32_t offset) { return offset; }
constexpr uint MAX_TEXT_SIZE = kj::maxValueForBits<BLOB_SIZE_BITS>() - 1;
typedef uint TextSize;
template <typename T>
inline KJ_CONSTEXPR() size_t bytesPerElement() { return sizeof(T); }
template <typename T>
inline KJ_CONSTEXPR() size_t bitsPerElement() { return sizeof(T) * 8; }
template <typename T>
inline constexpr ptrdiff_t intervalLength(const T* a, const T* b, uint) {
return b - a;
}
template <typename T, typename U>
inline constexpr kj::ArrayPtr<const U> arrayPtr(const U* ptr, T size) {
return kj::arrayPtr(ptr, size);
}
template <typename T, typename U>
inline constexpr kj::ArrayPtr<U> arrayPtr(U* ptr, T size) {
return kj::arrayPtr(ptr, size);
}
#endif
......
......@@ -413,11 +413,11 @@ private:
inline ::capnp::JsonValue::Which JsonValue::Reader::which() const {
return _reader.getDataField<Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline ::capnp::JsonValue::Which JsonValue::Builder::which() {
return _builder.getDataField<Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline bool JsonValue::Reader::isNull() const {
......@@ -430,20 +430,20 @@ inline ::capnp::Void JsonValue::Reader::getNull() const {
KJ_IREQUIRE((which() == JsonValue::NULL_),
"Must check which() before get()ing a union member.");
return _reader.getDataField< ::capnp::Void>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline ::capnp::Void JsonValue::Builder::getNull() {
KJ_IREQUIRE((which() == JsonValue::NULL_),
"Must check which() before get()ing a union member.");
return _builder.getDataField< ::capnp::Void>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline void JsonValue::Builder::setNull( ::capnp::Void value) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::NULL_);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::NULL_);
_builder.setDataField< ::capnp::Void>(
::kj::guarded<0>() * ::capnp::ELEMENTS, value);
::capnp::guarded<0>() * ::capnp::ELEMENTS, value);
}
inline bool JsonValue::Reader::isBoolean() const {
......@@ -456,20 +456,20 @@ inline bool JsonValue::Reader::getBoolean() const {
KJ_IREQUIRE((which() == JsonValue::BOOLEAN),
"Must check which() before get()ing a union member.");
return _reader.getDataField<bool>(
::kj::guarded<16>() * ::capnp::ELEMENTS);
::capnp::guarded<16>() * ::capnp::ELEMENTS);
}
inline bool JsonValue::Builder::getBoolean() {
KJ_IREQUIRE((which() == JsonValue::BOOLEAN),
"Must check which() before get()ing a union member.");
return _builder.getDataField<bool>(
::kj::guarded<16>() * ::capnp::ELEMENTS);
::capnp::guarded<16>() * ::capnp::ELEMENTS);
}
inline void JsonValue::Builder::setBoolean(bool value) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::BOOLEAN);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::BOOLEAN);
_builder.setDataField<bool>(
::kj::guarded<16>() * ::capnp::ELEMENTS, value);
::capnp::guarded<16>() * ::capnp::ELEMENTS, value);
}
inline bool JsonValue::Reader::isNumber() const {
......@@ -482,20 +482,20 @@ inline double JsonValue::Reader::getNumber() const {
KJ_IREQUIRE((which() == JsonValue::NUMBER),
"Must check which() before get()ing a union member.");
return _reader.getDataField<double>(
::kj::guarded<1>() * ::capnp::ELEMENTS);
::capnp::guarded<1>() * ::capnp::ELEMENTS);
}
inline double JsonValue::Builder::getNumber() {
KJ_IREQUIRE((which() == JsonValue::NUMBER),
"Must check which() before get()ing a union member.");
return _builder.getDataField<double>(
::kj::guarded<1>() * ::capnp::ELEMENTS);
::capnp::guarded<1>() * ::capnp::ELEMENTS);
}
inline void JsonValue::Builder::setNumber(double value) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::NUMBER);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::NUMBER);
_builder.setDataField<double>(
::kj::guarded<1>() * ::capnp::ELEMENTS, value);
::capnp::guarded<1>() * ::capnp::ELEMENTS, value);
}
inline bool JsonValue::Reader::isString() const {
......@@ -507,49 +507,49 @@ inline bool JsonValue::Builder::isString() {
inline bool JsonValue::Reader::hasString() const {
if (which() != JsonValue::STRING) return false;
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool JsonValue::Builder::hasString() {
if (which() != JsonValue::STRING) return false;
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::Text::Reader JsonValue::Reader::getString() const {
KJ_IREQUIRE((which() == JsonValue::STRING),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::Text::Builder JsonValue::Builder::getString() {
KJ_IREQUIRE((which() == JsonValue::STRING),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void JsonValue::Builder::setString( ::capnp::Text::Reader value) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::STRING);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::STRING);
::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::Text::Builder JsonValue::Builder::initString(unsigned int size) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::STRING);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::STRING);
return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void JsonValue::Builder::adoptString(
::capnp::Orphan< ::capnp::Text>&& value) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::STRING);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::STRING);
::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::Text> JsonValue::Builder::disownString() {
KJ_IREQUIRE((which() == JsonValue::STRING),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool JsonValue::Reader::isArray() const {
......@@ -561,49 +561,49 @@ inline bool JsonValue::Builder::isArray() {
inline bool JsonValue::Reader::hasArray() const {
if (which() != JsonValue::ARRAY) return false;
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool JsonValue::Builder::hasArray() {
if (which() != JsonValue::ARRAY) return false;
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::List< ::capnp::JsonValue>::Reader JsonValue::Reader::getArray() const {
KJ_IREQUIRE((which() == JsonValue::ARRAY),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::List< ::capnp::JsonValue>::Builder JsonValue::Builder::getArray() {
KJ_IREQUIRE((which() == JsonValue::ARRAY),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void JsonValue::Builder::setArray( ::capnp::List< ::capnp::JsonValue>::Reader value) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::ARRAY);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::ARRAY);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::List< ::capnp::JsonValue>::Builder JsonValue::Builder::initArray(unsigned int size) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::ARRAY);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::ARRAY);
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void JsonValue::Builder::adoptArray(
::capnp::Orphan< ::capnp::List< ::capnp::JsonValue>>&& value) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::ARRAY);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::ARRAY);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::JsonValue>> JsonValue::Builder::disownArray() {
KJ_IREQUIRE((which() == JsonValue::ARRAY),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool JsonValue::Reader::isObject() const {
......@@ -615,49 +615,49 @@ inline bool JsonValue::Builder::isObject() {
inline bool JsonValue::Reader::hasObject() const {
if (which() != JsonValue::OBJECT) return false;
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool JsonValue::Builder::hasObject() {
if (which() != JsonValue::OBJECT) return false;
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::List< ::capnp::JsonValue::Field>::Reader JsonValue::Reader::getObject() const {
KJ_IREQUIRE((which() == JsonValue::OBJECT),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue::Field>>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::List< ::capnp::JsonValue::Field>::Builder JsonValue::Builder::getObject() {
KJ_IREQUIRE((which() == JsonValue::OBJECT),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue::Field>>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void JsonValue::Builder::setObject( ::capnp::List< ::capnp::JsonValue::Field>::Reader value) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::OBJECT);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::OBJECT);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue::Field>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::List< ::capnp::JsonValue::Field>::Builder JsonValue::Builder::initObject(unsigned int size) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::OBJECT);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::OBJECT);
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue::Field>>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void JsonValue::Builder::adoptObject(
::capnp::Orphan< ::capnp::List< ::capnp::JsonValue::Field>>&& value) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::OBJECT);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::OBJECT);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue::Field>>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::JsonValue::Field>> JsonValue::Builder::disownObject() {
KJ_IREQUIRE((which() == JsonValue::OBJECT),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue::Field>>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool JsonValue::Reader::isCall() const {
......@@ -669,100 +669,100 @@ inline bool JsonValue::Builder::isCall() {
inline bool JsonValue::Reader::hasCall() const {
if (which() != JsonValue::CALL) return false;
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool JsonValue::Builder::hasCall() {
if (which() != JsonValue::CALL) return false;
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::JsonValue::Call::Reader JsonValue::Reader::getCall() const {
KJ_IREQUIRE((which() == JsonValue::CALL),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::JsonValue::Call>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::JsonValue::Call::Builder JsonValue::Builder::getCall() {
KJ_IREQUIRE((which() == JsonValue::CALL),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::JsonValue::Call>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void JsonValue::Builder::setCall( ::capnp::JsonValue::Call::Reader value) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::CALL);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::CALL);
::capnp::_::PointerHelpers< ::capnp::JsonValue::Call>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::JsonValue::Call::Builder JsonValue::Builder::initCall() {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::CALL);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::CALL);
return ::capnp::_::PointerHelpers< ::capnp::JsonValue::Call>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void JsonValue::Builder::adoptCall(
::capnp::Orphan< ::capnp::JsonValue::Call>&& value) {
_builder.setDataField<JsonValue::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, JsonValue::CALL);
::capnp::guarded<0>() * ::capnp::ELEMENTS, JsonValue::CALL);
::capnp::_::PointerHelpers< ::capnp::JsonValue::Call>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::JsonValue::Call> JsonValue::Builder::disownCall() {
KJ_IREQUIRE((which() == JsonValue::CALL),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::JsonValue::Call>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool JsonValue::Field::Reader::hasName() const {
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool JsonValue::Field::Builder::hasName() {
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::Text::Reader JsonValue::Field::Reader::getName() const {
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::Text::Builder JsonValue::Field::Builder::getName() {
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void JsonValue::Field::Builder::setName( ::capnp::Text::Reader value) {
::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::Text::Builder JsonValue::Field::Builder::initName(unsigned int size) {
return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void JsonValue::Field::Builder::adoptName(
::capnp::Orphan< ::capnp::Text>&& value) {
::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::Text> JsonValue::Field::Builder::disownName() {
return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool JsonValue::Field::Reader::hasValue() const {
return !_reader.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS).isNull();
::capnp::guarded<1>() * ::capnp::POINTERS).isNull();
}
inline bool JsonValue::Field::Builder::hasValue() {
return !_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS).isNull();
::capnp::guarded<1>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::JsonValue::Reader JsonValue::Field::Reader::getValue() const {
return ::capnp::_::PointerHelpers< ::capnp::JsonValue>::get(_reader.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
inline ::capnp::JsonValue::Builder JsonValue::Field::Builder::getValue() {
return ::capnp::_::PointerHelpers< ::capnp::JsonValue>::get(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
#if !CAPNP_LITE
inline ::capnp::JsonValue::Pipeline JsonValue::Field::Pipeline::getValue() {
......@@ -771,88 +771,88 @@ inline ::capnp::JsonValue::Pipeline JsonValue::Field::Pipeline::getValue() {
#endif // !CAPNP_LITE
inline void JsonValue::Field::Builder::setValue( ::capnp::JsonValue::Reader value) {
::capnp::_::PointerHelpers< ::capnp::JsonValue>::set(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), value);
::capnp::guarded<1>() * ::capnp::POINTERS), value);
}
inline ::capnp::JsonValue::Builder JsonValue::Field::Builder::initValue() {
return ::capnp::_::PointerHelpers< ::capnp::JsonValue>::init(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
inline void JsonValue::Field::Builder::adoptValue(
::capnp::Orphan< ::capnp::JsonValue>&& value) {
::capnp::_::PointerHelpers< ::capnp::JsonValue>::adopt(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<1>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::JsonValue> JsonValue::Field::Builder::disownValue() {
return ::capnp::_::PointerHelpers< ::capnp::JsonValue>::disown(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
inline bool JsonValue::Call::Reader::hasFunction() const {
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool JsonValue::Call::Builder::hasFunction() {
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::Text::Reader JsonValue::Call::Reader::getFunction() const {
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::Text::Builder JsonValue::Call::Builder::getFunction() {
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void JsonValue::Call::Builder::setFunction( ::capnp::Text::Reader value) {
::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::Text::Builder JsonValue::Call::Builder::initFunction(unsigned int size) {
return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void JsonValue::Call::Builder::adoptFunction(
::capnp::Orphan< ::capnp::Text>&& value) {
::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::Text> JsonValue::Call::Builder::disownFunction() {
return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool JsonValue::Call::Reader::hasParams() const {
return !_reader.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS).isNull();
::capnp::guarded<1>() * ::capnp::POINTERS).isNull();
}
inline bool JsonValue::Call::Builder::hasParams() {
return !_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS).isNull();
::capnp::guarded<1>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::List< ::capnp::JsonValue>::Reader JsonValue::Call::Reader::getParams() const {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::get(_reader.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
inline ::capnp::List< ::capnp::JsonValue>::Builder JsonValue::Call::Builder::getParams() {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::get(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
inline void JsonValue::Call::Builder::setParams( ::capnp::List< ::capnp::JsonValue>::Reader value) {
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::set(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), value);
::capnp::guarded<1>() * ::capnp::POINTERS), value);
}
inline ::capnp::List< ::capnp::JsonValue>::Builder JsonValue::Call::Builder::initParams(unsigned int size) {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::init(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), size);
::capnp::guarded<1>() * ::capnp::POINTERS), size);
}
inline void JsonValue::Call::Builder::adoptParams(
::capnp::Orphan< ::capnp::List< ::capnp::JsonValue>>&& value) {
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::adopt(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<1>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::JsonValue>> JsonValue::Call::Builder::disownParams() {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::JsonValue>>::disown(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
} // namespace
......
......@@ -1082,7 +1082,7 @@ private:
" \"Must check which() before get()ing a union member.\");\n"),
kj::str(
" _builder.setDataField<", scope, "Which>(\n"
" ::kj::guarded<", discrimOffset, ">() * ::capnp::ELEMENTS, ",
" ::capnp::guarded<", discrimOffset, ">() * ::capnp::ELEMENTS, ",
scope, upperCase, ");\n"),
kj::strTree(" inline bool is", titleCase, "() const;\n"),
kj::strTree(" inline bool is", titleCase, "();\n"),
......@@ -1180,11 +1180,11 @@ private:
return kj::strTree();
case Section::DATA:
return kj::strTree(
" _builder.setDataField<", maskType(slot.whichType), ">(::kj::guarded<",
" _builder.setDataField<", maskType(slot.whichType), ">(::capnp::guarded<",
slot.offset, ">() * ::capnp::ELEMENTS, 0);\n");
case Section::POINTERS:
return kj::strTree(
" _builder.getPointerField(::kj::guarded<", slot.offset,
" _builder.getPointerField(::capnp::guarded<", slot.offset,
">() * ::capnp::POINTERS).clear();\n");
}
KJ_UNREACHABLE;
......@@ -1344,20 +1344,20 @@ private:
"inline ", type, " ", scope, "Reader::get", titleCase, "() const {\n",
unionDiscrim.check,
" return _reader.getDataField<", type, ">(\n"
" ::kj::guarded<", offset, ">() * ::capnp::ELEMENTS", defaultMaskParam, ");\n",
" ::capnp::guarded<", offset, ">() * ::capnp::ELEMENTS", defaultMaskParam, ");\n",
"}\n"
"\n",
templateContext.allDecls(),
"inline ", type, " ", scope, "Builder::get", titleCase, "() {\n",
unionDiscrim.check,
" return _builder.getDataField<", type, ">(\n"
" ::kj::guarded<", offset, ">() * ::capnp::ELEMENTS", defaultMaskParam, ");\n",
" ::capnp::guarded<", offset, ">() * ::capnp::ELEMENTS", defaultMaskParam, ");\n",
"}\n",
templateContext.allDecls(),
"inline void ", scope, "Builder::set", titleCase, "(", type, " value) {\n",
unionDiscrim.set,
" _builder.setDataField<", type, ">(\n"
" ::kj::guarded<", offset, ">() * ::capnp::ELEMENTS, value", defaultMaskParam, ");\n",
" ::capnp::guarded<", offset, ">() * ::capnp::ELEMENTS, value", defaultMaskParam, ");\n",
"}\n"
"\n")
};
......@@ -1397,26 +1397,26 @@ private:
"inline bool ", scope, "Reader::has", titleCase, "() const {\n",
unionDiscrim.has,
" return !_reader.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
"}\n",
templateContext.allDecls(),
"inline bool ", scope, "Builder::has", titleCase, "() {\n",
unionDiscrim.has,
" return !_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
"}\n"
"#if !CAPNP_LITE\n",
templateContext.allDecls(),
"inline ", clientType, " ", scope, "Reader::get", titleCase, "() const {\n",
unionDiscrim.check,
" return ::capnp::_::PointerHelpers<", type, ">::get(_reader.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS));\n"
"}\n",
templateContext.allDecls(),
"inline ", clientType, " ", scope, "Builder::get", titleCase, "() {\n",
unionDiscrim.check,
" return ::capnp::_::PointerHelpers<", type, ">::get(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS));\n"
"}\n",
hasDiscriminantValue(proto) ? kj::strTree() : kj::strTree(
templateContext.allDecls(),
......@@ -1427,26 +1427,26 @@ private:
"inline void ", scope, "Builder::set", titleCase, "(", clientType, "&& cap) {\n",
unionDiscrim.set,
" ::capnp::_::PointerHelpers<", type, ">::set(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS), kj::mv(cap));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS), kj::mv(cap));\n"
"}\n",
templateContext.allDecls(),
"inline void ", scope, "Builder::set", titleCase, "(", clientType, "& cap) {\n",
unionDiscrim.set,
" ::capnp::_::PointerHelpers<", type, ">::set(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS), cap);\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS), cap);\n"
"}\n",
templateContext.allDecls(),
"inline void ", scope, "Builder::adopt", titleCase, "(\n"
" ::capnp::Orphan<", type, ">&& value) {\n",
unionDiscrim.set,
" ::capnp::_::PointerHelpers<", type, ">::adopt(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS), kj::mv(value));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS), kj::mv(value));\n"
"}\n",
templateContext.allDecls(),
"inline ::capnp::Orphan<", type, "> ", scope, "Builder::disown", titleCase, "() {\n",
unionDiscrim.check,
" return ::capnp::_::PointerHelpers<", type, ">::disown(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS));\n"
"}\n"
"#endif // !CAPNP_LITE\n"
"\n")
......@@ -1475,31 +1475,31 @@ private:
"inline bool ", scope, "Reader::has", titleCase, "() const {\n",
unionDiscrim.has,
" return !_reader.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
"}\n",
templateContext.allDecls(),
"inline bool ", scope, "Builder::has", titleCase, "() {\n",
unionDiscrim.has,
" return !_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
"}\n",
templateContext.allDecls(),
"inline ::capnp::AnyPointer::Reader ", scope, "Reader::get", titleCase, "() const {\n",
unionDiscrim.check,
" return ::capnp::AnyPointer::Reader(_reader.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS));\n"
"}\n",
templateContext.allDecls(),
"inline ::capnp::AnyPointer::Builder ", scope, "Builder::get", titleCase, "() {\n",
unionDiscrim.check,
" return ::capnp::AnyPointer::Builder(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS));\n"
"}\n",
templateContext.allDecls(),
"inline ::capnp::AnyPointer::Builder ", scope, "Builder::init", titleCase, "() {\n",
unionDiscrim.set,
" auto result = ::capnp::AnyPointer::Builder(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS));\n"
" result.clear();\n"
" return result;\n"
"}\n"
......@@ -1644,26 +1644,26 @@ private:
"inline bool ", scope, "Reader::has", titleCase, "() const {\n",
unionDiscrim.has,
" return !_reader.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
"}\n",
templateContext.allDecls(),
"inline bool ", scope, "Builder::has", titleCase, "() {\n",
unionDiscrim.has,
" return !_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS).isNull();\n"
"}\n",
COND(shouldExcludeInLiteMode, "#if !CAPNP_LITE\n"),
templateContext.allDecls(),
"inline ", readerType, " ", scope, "Reader::get", titleCase, "() const {\n",
unionDiscrim.check,
" return ::capnp::_::PointerHelpers<", type, ">::get(_reader.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS)", defaultParam, ");\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS)", defaultParam, ");\n"
"}\n",
templateContext.allDecls(),
"inline ", builderType, " ", scope, "Builder::get", titleCase, "() {\n",
unionDiscrim.check,
" return ::capnp::_::PointerHelpers<", type, ">::get(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS)", defaultParam, ");\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS)", defaultParam, ");\n"
"}\n",
COND(shouldIncludePipelineGetter,
"#if !CAPNP_LITE\n",
......@@ -1676,14 +1676,14 @@ private:
"inline void ", scope, "Builder::set", titleCase, "(", readerType, " value) {\n",
unionDiscrim.set,
" ::capnp::_::PointerHelpers<", type, ">::set(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS), value);\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS), value);\n"
"}\n",
COND(shouldIncludeArrayInitializer,
templateContext.allDecls(),
"inline void ", scope, "Builder::set", titleCase, "(::kj::ArrayPtr<const ", elementReaderType, "> value) {\n",
unionDiscrim.set,
" ::capnp::_::PointerHelpers<", type, ">::set(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS), value);\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS), value);\n"
"}\n"),
COND(shouldIncludeStructInit,
COND(shouldTemplatizeInit,
......@@ -1694,14 +1694,14 @@ private:
" \"", proto.getName(), " must be a struct\");\n",
unionDiscrim.set,
" return ::capnp::_::PointerHelpers<T_>::init(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS));\n"
"}\n"),
COND(!shouldTemplatizeInit,
templateContext.allDecls(),
"inline ", builderType, " ", scope, "Builder::init", titleCase, "() {\n",
unionDiscrim.set,
" return ::capnp::_::PointerHelpers<", type, ">::init(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS));\n"
"}\n")),
COND(shouldIncludeSizedInit,
COND(shouldTemplatizeInit,
......@@ -1712,21 +1712,21 @@ private:
" \"", proto.getName(), " must be a list\");\n",
unionDiscrim.set,
" return ::capnp::_::PointerHelpers<T_>::init(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS), size);\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS), size);\n"
"}\n"),
COND(!shouldTemplatizeInit,
templateContext.allDecls(),
"inline ", builderType, " ", scope, "Builder::init", titleCase, "(unsigned int size) {\n",
unionDiscrim.set,
" return ::capnp::_::PointerHelpers<", type, ">::init(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS), size);\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS), size);\n"
"}\n")),
templateContext.allDecls(),
"inline void ", scope, "Builder::adopt", titleCase, "(\n"
" ::capnp::Orphan<", type, ">&& value) {\n",
unionDiscrim.set,
" ::capnp::_::PointerHelpers<", type, ">::adopt(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS), kj::mv(value));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS), kj::mv(value));\n"
"}\n",
COND(type.hasDisambiguatedTemplate(),
"#ifndef _MSC_VER\n"
......@@ -1735,7 +1735,7 @@ private:
"inline ::capnp::Orphan<", type, "> ", scope, "Builder::disown", titleCase, "() {\n",
unionDiscrim.check,
" return ::capnp::_::PointerHelpers<", type, ">::disown(_builder.getPointerField(\n"
" ::kj::guarded<", offset, ">() * ::capnp::POINTERS));\n"
" ::capnp::guarded<", offset, ">() * ::capnp::POINTERS));\n"
"}\n",
COND(type.hasDisambiguatedTemplate(), "#endif // !_MSC_VER\n"),
COND(shouldExcludeInLiteMode, "#endif // !CAPNP_LITE\n"),
......@@ -2055,12 +2055,12 @@ private:
templateContext.allDecls(),
"inline ", whichName, " ", fullName, "::Reader::which() const {\n"
" return _reader.getDataField<Which>(\n"
" ::kj::guarded<", discrimOffset, ">() * ::capnp::ELEMENTS);\n"
" ::capnp::guarded<", discrimOffset, ">() * ::capnp::ELEMENTS);\n"
"}\n",
templateContext.allDecls(),
"inline ", whichName, " ", fullName, "::Builder::which() {\n"
" return _builder.getDataField<Which>(\n"
" ::kj::guarded<", discrimOffset, ">() * ::capnp::ELEMENTS);\n"
" ::capnp::guarded<", discrimOffset, ">() * ::capnp::ELEMENTS);\n"
"}\n"
"\n"),
KJ_MAP(f, fieldTexts) { return kj::mv(f.inlineMethodDefs); }),
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -560,11 +560,11 @@ private:
inline ::capnp::compiler::Token::Which Token::Reader::which() const {
return _reader.getDataField<Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline ::capnp::compiler::Token::Which Token::Builder::which() {
return _builder.getDataField<Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline bool Token::Reader::isIdentifier() const {
......@@ -576,49 +576,49 @@ inline bool Token::Builder::isIdentifier() {
inline bool Token::Reader::hasIdentifier() const {
if (which() != Token::IDENTIFIER) return false;
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool Token::Builder::hasIdentifier() {
if (which() != Token::IDENTIFIER) return false;
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::Text::Reader Token::Reader::getIdentifier() const {
KJ_IREQUIRE((which() == Token::IDENTIFIER),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::Text::Builder Token::Builder::getIdentifier() {
KJ_IREQUIRE((which() == Token::IDENTIFIER),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void Token::Builder::setIdentifier( ::capnp::Text::Reader value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER);
::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::Text::Builder Token::Builder::initIdentifier(unsigned int size) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER);
return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void Token::Builder::adoptIdentifier(
::capnp::Orphan< ::capnp::Text>&& value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER);
::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::Text> Token::Builder::disownIdentifier() {
KJ_IREQUIRE((which() == Token::IDENTIFIER),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool Token::Reader::isStringLiteral() const {
......@@ -630,49 +630,49 @@ inline bool Token::Builder::isStringLiteral() {
inline bool Token::Reader::hasStringLiteral() const {
if (which() != Token::STRING_LITERAL) return false;
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool Token::Builder::hasStringLiteral() {
if (which() != Token::STRING_LITERAL) return false;
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::Text::Reader Token::Reader::getStringLiteral() const {
KJ_IREQUIRE((which() == Token::STRING_LITERAL),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::Text::Builder Token::Builder::getStringLiteral() {
KJ_IREQUIRE((which() == Token::STRING_LITERAL),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void Token::Builder::setStringLiteral( ::capnp::Text::Reader value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL);
::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::Text::Builder Token::Builder::initStringLiteral(unsigned int size) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL);
return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void Token::Builder::adoptStringLiteral(
::capnp::Orphan< ::capnp::Text>&& value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL);
::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::Text> Token::Builder::disownStringLiteral() {
KJ_IREQUIRE((which() == Token::STRING_LITERAL),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool Token::Reader::isIntegerLiteral() const {
......@@ -685,20 +685,20 @@ inline ::uint64_t Token::Reader::getIntegerLiteral() const {
KJ_IREQUIRE((which() == Token::INTEGER_LITERAL),
"Must check which() before get()ing a union member.");
return _reader.getDataField< ::uint64_t>(
::kj::guarded<1>() * ::capnp::ELEMENTS);
::capnp::guarded<1>() * ::capnp::ELEMENTS);
}
inline ::uint64_t Token::Builder::getIntegerLiteral() {
KJ_IREQUIRE((which() == Token::INTEGER_LITERAL),
"Must check which() before get()ing a union member.");
return _builder.getDataField< ::uint64_t>(
::kj::guarded<1>() * ::capnp::ELEMENTS);
::capnp::guarded<1>() * ::capnp::ELEMENTS);
}
inline void Token::Builder::setIntegerLiteral( ::uint64_t value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::INTEGER_LITERAL);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::INTEGER_LITERAL);
_builder.setDataField< ::uint64_t>(
::kj::guarded<1>() * ::capnp::ELEMENTS, value);
::capnp::guarded<1>() * ::capnp::ELEMENTS, value);
}
inline bool Token::Reader::isFloatLiteral() const {
......@@ -711,20 +711,20 @@ inline double Token::Reader::getFloatLiteral() const {
KJ_IREQUIRE((which() == Token::FLOAT_LITERAL),
"Must check which() before get()ing a union member.");
return _reader.getDataField<double>(
::kj::guarded<1>() * ::capnp::ELEMENTS);
::capnp::guarded<1>() * ::capnp::ELEMENTS);
}
inline double Token::Builder::getFloatLiteral() {
KJ_IREQUIRE((which() == Token::FLOAT_LITERAL),
"Must check which() before get()ing a union member.");
return _builder.getDataField<double>(
::kj::guarded<1>() * ::capnp::ELEMENTS);
::capnp::guarded<1>() * ::capnp::ELEMENTS);
}
inline void Token::Builder::setFloatLiteral(double value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::FLOAT_LITERAL);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::FLOAT_LITERAL);
_builder.setDataField<double>(
::kj::guarded<1>() * ::capnp::ELEMENTS, value);
::capnp::guarded<1>() * ::capnp::ELEMENTS, value);
}
inline bool Token::Reader::isOperator() const {
......@@ -736,49 +736,49 @@ inline bool Token::Builder::isOperator() {
inline bool Token::Reader::hasOperator() const {
if (which() != Token::OPERATOR) return false;
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool Token::Builder::hasOperator() {
if (which() != Token::OPERATOR) return false;
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::Text::Reader Token::Reader::getOperator() const {
KJ_IREQUIRE((which() == Token::OPERATOR),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::Text::Builder Token::Builder::getOperator() {
KJ_IREQUIRE((which() == Token::OPERATOR),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void Token::Builder::setOperator( ::capnp::Text::Reader value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::OPERATOR);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::OPERATOR);
::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::Text::Builder Token::Builder::initOperator(unsigned int size) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::OPERATOR);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::OPERATOR);
return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void Token::Builder::adoptOperator(
::capnp::Orphan< ::capnp::Text>&& value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::OPERATOR);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::OPERATOR);
::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::Text> Token::Builder::disownOperator() {
KJ_IREQUIRE((which() == Token::OPERATOR),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool Token::Reader::isParenthesizedList() const {
......@@ -790,55 +790,55 @@ inline bool Token::Builder::isParenthesizedList() {
inline bool Token::Reader::hasParenthesizedList() const {
if (which() != Token::PARENTHESIZED_LIST) return false;
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool Token::Builder::hasParenthesizedList() {
if (which() != Token::PARENTHESIZED_LIST) return false;
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader Token::Reader::getParenthesizedList() const {
KJ_IREQUIRE((which() == Token::PARENTHESIZED_LIST),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder Token::Builder::getParenthesizedList() {
KJ_IREQUIRE((which() == Token::PARENTHESIZED_LIST),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void Token::Builder::setParenthesizedList( ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline void Token::Builder::setParenthesizedList(::kj::ArrayPtr<const ::capnp::List< ::capnp::compiler::Token>::Reader> value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder Token::Builder::initParenthesizedList(unsigned int size) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void Token::Builder::adoptParenthesizedList(
::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>&& value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>> Token::Builder::disownParenthesizedList() {
KJ_IREQUIRE((which() == Token::PARENTHESIZED_LIST),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool Token::Reader::isBracketedList() const {
......@@ -850,83 +850,83 @@ inline bool Token::Builder::isBracketedList() {
inline bool Token::Reader::hasBracketedList() const {
if (which() != Token::BRACKETED_LIST) return false;
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool Token::Builder::hasBracketedList() {
if (which() != Token::BRACKETED_LIST) return false;
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader Token::Reader::getBracketedList() const {
KJ_IREQUIRE((which() == Token::BRACKETED_LIST),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder Token::Builder::getBracketedList() {
KJ_IREQUIRE((which() == Token::BRACKETED_LIST),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void Token::Builder::setBracketedList( ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline void Token::Builder::setBracketedList(::kj::ArrayPtr<const ::capnp::List< ::capnp::compiler::Token>::Reader> value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder Token::Builder::initBracketedList(unsigned int size) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void Token::Builder::adoptBracketedList(
::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>&& value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>> Token::Builder::disownBracketedList() {
KJ_IREQUIRE((which() == Token::BRACKETED_LIST),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::uint32_t Token::Reader::getStartByte() const {
return _reader.getDataField< ::uint32_t>(
::kj::guarded<1>() * ::capnp::ELEMENTS);
::capnp::guarded<1>() * ::capnp::ELEMENTS);
}
inline ::uint32_t Token::Builder::getStartByte() {
return _builder.getDataField< ::uint32_t>(
::kj::guarded<1>() * ::capnp::ELEMENTS);
::capnp::guarded<1>() * ::capnp::ELEMENTS);
}
inline void Token::Builder::setStartByte( ::uint32_t value) {
_builder.setDataField< ::uint32_t>(
::kj::guarded<1>() * ::capnp::ELEMENTS, value);
::capnp::guarded<1>() * ::capnp::ELEMENTS, value);
}
inline ::uint32_t Token::Reader::getEndByte() const {
return _reader.getDataField< ::uint32_t>(
::kj::guarded<4>() * ::capnp::ELEMENTS);
::capnp::guarded<4>() * ::capnp::ELEMENTS);
}
inline ::uint32_t Token::Builder::getEndByte() {
return _builder.getDataField< ::uint32_t>(
::kj::guarded<4>() * ::capnp::ELEMENTS);
::capnp::guarded<4>() * ::capnp::ELEMENTS);
}
inline void Token::Builder::setEndByte( ::uint32_t value) {
_builder.setDataField< ::uint32_t>(
::kj::guarded<4>() * ::capnp::ELEMENTS, value);
::capnp::guarded<4>() * ::capnp::ELEMENTS, value);
}
inline bool Token::Reader::isBinaryLiteral() const {
......@@ -938,92 +938,92 @@ inline bool Token::Builder::isBinaryLiteral() {
inline bool Token::Reader::hasBinaryLiteral() const {
if (which() != Token::BINARY_LITERAL) return false;
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool Token::Builder::hasBinaryLiteral() {
if (which() != Token::BINARY_LITERAL) return false;
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::Data::Reader Token::Reader::getBinaryLiteral() const {
KJ_IREQUIRE((which() == Token::BINARY_LITERAL),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Data>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::Data::Builder Token::Builder::getBinaryLiteral() {
KJ_IREQUIRE((which() == Token::BINARY_LITERAL),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Data>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void Token::Builder::setBinaryLiteral( ::capnp::Data::Reader value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL);
::capnp::_::PointerHelpers< ::capnp::Data>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::Data::Builder Token::Builder::initBinaryLiteral(unsigned int size) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL);
return ::capnp::_::PointerHelpers< ::capnp::Data>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void Token::Builder::adoptBinaryLiteral(
::capnp::Orphan< ::capnp::Data>&& value) {
_builder.setDataField<Token::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL);
::capnp::_::PointerHelpers< ::capnp::Data>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::Data> Token::Builder::disownBinaryLiteral() {
KJ_IREQUIRE((which() == Token::BINARY_LITERAL),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::Data>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::compiler::Statement::Which Statement::Reader::which() const {
return _reader.getDataField<Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline ::capnp::compiler::Statement::Which Statement::Builder::which() {
return _builder.getDataField<Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline bool Statement::Reader::hasTokens() const {
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool Statement::Builder::hasTokens() {
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::List< ::capnp::compiler::Token>::Reader Statement::Reader::getTokens() const {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::List< ::capnp::compiler::Token>::Builder Statement::Builder::getTokens() {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void Statement::Builder::setTokens( ::capnp::List< ::capnp::compiler::Token>::Reader value) {
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::List< ::capnp::compiler::Token>::Builder Statement::Builder::initTokens(unsigned int size) {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void Statement::Builder::adoptTokens(
::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>>&& value) {
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>> Statement::Builder::disownTokens() {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool Statement::Reader::isLine() const {
......@@ -1036,20 +1036,20 @@ inline ::capnp::Void Statement::Reader::getLine() const {
KJ_IREQUIRE((which() == Statement::LINE),
"Must check which() before get()ing a union member.");
return _reader.getDataField< ::capnp::Void>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline ::capnp::Void Statement::Builder::getLine() {
KJ_IREQUIRE((which() == Statement::LINE),
"Must check which() before get()ing a union member.");
return _builder.getDataField< ::capnp::Void>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline void Statement::Builder::setLine( ::capnp::Void value) {
_builder.setDataField<Statement::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Statement::LINE);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Statement::LINE);
_builder.setDataField< ::capnp::Void>(
::kj::guarded<0>() * ::capnp::ELEMENTS, value);
::capnp::guarded<0>() * ::capnp::ELEMENTS, value);
}
inline bool Statement::Reader::isBlock() const {
......@@ -1061,179 +1061,179 @@ inline bool Statement::Builder::isBlock() {
inline bool Statement::Reader::hasBlock() const {
if (which() != Statement::BLOCK) return false;
return !_reader.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS).isNull();
::capnp::guarded<1>() * ::capnp::POINTERS).isNull();
}
inline bool Statement::Builder::hasBlock() {
if (which() != Statement::BLOCK) return false;
return !_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS).isNull();
::capnp::guarded<1>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::List< ::capnp::compiler::Statement>::Reader Statement::Reader::getBlock() const {
KJ_IREQUIRE((which() == Statement::BLOCK),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::get(_reader.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
inline ::capnp::List< ::capnp::compiler::Statement>::Builder Statement::Builder::getBlock() {
KJ_IREQUIRE((which() == Statement::BLOCK),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::get(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
inline void Statement::Builder::setBlock( ::capnp::List< ::capnp::compiler::Statement>::Reader value) {
_builder.setDataField<Statement::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Statement::BLOCK);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Statement::BLOCK);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::set(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), value);
::capnp::guarded<1>() * ::capnp::POINTERS), value);
}
inline ::capnp::List< ::capnp::compiler::Statement>::Builder Statement::Builder::initBlock(unsigned int size) {
_builder.setDataField<Statement::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Statement::BLOCK);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Statement::BLOCK);
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::init(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), size);
::capnp::guarded<1>() * ::capnp::POINTERS), size);
}
inline void Statement::Builder::adoptBlock(
::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>>&& value) {
_builder.setDataField<Statement::Which>(
::kj::guarded<0>() * ::capnp::ELEMENTS, Statement::BLOCK);
::capnp::guarded<0>() * ::capnp::ELEMENTS, Statement::BLOCK);
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::adopt(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<1>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>> Statement::Builder::disownBlock() {
KJ_IREQUIRE((which() == Statement::BLOCK),
"Must check which() before get()ing a union member.");
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::disown(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
inline bool Statement::Reader::hasDocComment() const {
return !_reader.getPointerField(
::kj::guarded<2>() * ::capnp::POINTERS).isNull();
::capnp::guarded<2>() * ::capnp::POINTERS).isNull();
}
inline bool Statement::Builder::hasDocComment() {
return !_builder.getPointerField(
::kj::guarded<2>() * ::capnp::POINTERS).isNull();
::capnp::guarded<2>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::Text::Reader Statement::Reader::getDocComment() const {
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
::kj::guarded<2>() * ::capnp::POINTERS));
::capnp::guarded<2>() * ::capnp::POINTERS));
}
inline ::capnp::Text::Builder Statement::Builder::getDocComment() {
return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
::kj::guarded<2>() * ::capnp::POINTERS));
::capnp::guarded<2>() * ::capnp::POINTERS));
}
inline void Statement::Builder::setDocComment( ::capnp::Text::Reader value) {
::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
::kj::guarded<2>() * ::capnp::POINTERS), value);
::capnp::guarded<2>() * ::capnp::POINTERS), value);
}
inline ::capnp::Text::Builder Statement::Builder::initDocComment(unsigned int size) {
return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
::kj::guarded<2>() * ::capnp::POINTERS), size);
::capnp::guarded<2>() * ::capnp::POINTERS), size);
}
inline void Statement::Builder::adoptDocComment(
::capnp::Orphan< ::capnp::Text>&& value) {
::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
::kj::guarded<2>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<2>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::Text> Statement::Builder::disownDocComment() {
return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
::kj::guarded<2>() * ::capnp::POINTERS));
::capnp::guarded<2>() * ::capnp::POINTERS));
}
inline ::uint32_t Statement::Reader::getStartByte() const {
return _reader.getDataField< ::uint32_t>(
::kj::guarded<1>() * ::capnp::ELEMENTS);
::capnp::guarded<1>() * ::capnp::ELEMENTS);
}
inline ::uint32_t Statement::Builder::getStartByte() {
return _builder.getDataField< ::uint32_t>(
::kj::guarded<1>() * ::capnp::ELEMENTS);
::capnp::guarded<1>() * ::capnp::ELEMENTS);
}
inline void Statement::Builder::setStartByte( ::uint32_t value) {
_builder.setDataField< ::uint32_t>(
::kj::guarded<1>() * ::capnp::ELEMENTS, value);
::capnp::guarded<1>() * ::capnp::ELEMENTS, value);
}
inline ::uint32_t Statement::Reader::getEndByte() const {
return _reader.getDataField< ::uint32_t>(
::kj::guarded<2>() * ::capnp::ELEMENTS);
::capnp::guarded<2>() * ::capnp::ELEMENTS);
}
inline ::uint32_t Statement::Builder::getEndByte() {
return _builder.getDataField< ::uint32_t>(
::kj::guarded<2>() * ::capnp::ELEMENTS);
::capnp::guarded<2>() * ::capnp::ELEMENTS);
}
inline void Statement::Builder::setEndByte( ::uint32_t value) {
_builder.setDataField< ::uint32_t>(
::kj::guarded<2>() * ::capnp::ELEMENTS, value);
::capnp::guarded<2>() * ::capnp::ELEMENTS, value);
}
inline bool LexedTokens::Reader::hasTokens() const {
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool LexedTokens::Builder::hasTokens() {
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::List< ::capnp::compiler::Token>::Reader LexedTokens::Reader::getTokens() const {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::List< ::capnp::compiler::Token>::Builder LexedTokens::Builder::getTokens() {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void LexedTokens::Builder::setTokens( ::capnp::List< ::capnp::compiler::Token>::Reader value) {
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::List< ::capnp::compiler::Token>::Builder LexedTokens::Builder::initTokens(unsigned int size) {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void LexedTokens::Builder::adoptTokens(
::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>>&& value) {
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>> LexedTokens::Builder::disownTokens() {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline bool LexedStatements::Reader::hasStatements() const {
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool LexedStatements::Builder::hasStatements() {
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::List< ::capnp::compiler::Statement>::Reader LexedStatements::Reader::getStatements() const {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::List< ::capnp::compiler::Statement>::Builder LexedStatements::Builder::getStatements() {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline void LexedStatements::Builder::setStatements( ::capnp::List< ::capnp::compiler::Statement>::Reader value) {
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
inline ::capnp::List< ::capnp::compiler::Statement>::Builder LexedStatements::Builder::initStatements(unsigned int size) {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
inline void LexedStatements::Builder::adoptStatements(
::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>>&& value) {
::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>> LexedStatements::Builder::disownStatements() {
return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
} // namespace
......
......@@ -59,7 +59,11 @@ namespace _ { // private
#endif // !CAPNP_LITE
#if CAPNP_DEBUG_TYPES
#define G(n) guarded<n>()
#else
#define G(n) n
#endif
// =======================================================================================
......@@ -1766,7 +1770,7 @@ struct WireHelpers {
if (value.elementSize == ElementSize::POINTER) {
// List of pointers.
ref->listRef.set(ElementSize::POINTER, value.elementCount);
for (auto i: zeroTo(value.elementCount * (ONE * POINTERS / ELEMENTS))) {
for (auto i: kj::zeroTo(value.elementCount * (ONE * POINTERS / ELEMENTS))) {
copyPointer(segment, capTable, reinterpret_cast<WirePointer*>(ptr) + i,
value.segment, value.capTable,
reinterpret_cast<const WirePointer*>(value.ptr) + i,
......@@ -1807,7 +1811,7 @@ struct WireHelpers {
auto newTotalSize = (dataSize + upgradeGuard<uint64_t>(ptrCount) * WORDS_PER_POINTER)
/ ELEMENTS * value.elementCount;
KJ_ASSERT(newTotalSize <= totalSize); // we've only removed data!
totalSize = kj::assumeMax<kj::maxValueForBits<SEGMENT_WORD_COUNT_BITS>() - 1>(newTotalSize);
totalSize = assumeMax<kj::maxValueForBits<SEGMENT_WORD_COUNT_BITS>() - 1>(newTotalSize);
} else {
dataSize = declDataSize;
ptrCount = declPointerCount;
......@@ -2886,14 +2890,14 @@ bool StructReader::isCanonical(const word **readHead,
auto dataSize = this->getDataSectionSize() / BITS_PER_WORD;
// Mark whether the struct is properly truncated
KJ_IF_MAYBE(diff, kj::trySubtract(dataSize, ONE * WORDS)) {
KJ_IF_MAYBE(diff, trySubtract(dataSize, ONE * WORDS)) {
*dataTrunc = this->getDataField<uint64_t>(*diff / WORDS * ELEMENTS) != 0;
} else {
// Data segment empty.
*dataTrunc = true;
}
KJ_IF_MAYBE(diff, kj::trySubtract(this->pointerCount, ONE * POINTERS)) {
KJ_IF_MAYBE(diff, trySubtract(this->pointerCount, ONE * POINTERS)) {
*ptrTrunc = !this->getPointerField(*diff).isNull();
} else {
*ptrTrunc = true;
......
......@@ -724,22 +724,22 @@ inline typename ::capnp::Persistent<SturdyRef, Owner>::Client& Persistent<Sturd
template <typename SturdyRef, typename Owner>
inline bool Persistent<SturdyRef, Owner>::SaveParams::Reader::hasSealFor() const {
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
template <typename SturdyRef, typename Owner>
inline bool Persistent<SturdyRef, Owner>::SaveParams::Builder::hasSealFor() {
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
template <typename SturdyRef, typename Owner>
inline ::capnp::ReaderFor<Owner> Persistent<SturdyRef, Owner>::SaveParams::Reader::getSealFor() const {
return ::capnp::_::PointerHelpers<Owner>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
template <typename SturdyRef, typename Owner>
inline ::capnp::BuilderFor<Owner> Persistent<SturdyRef, Owner>::SaveParams::Builder::getSealFor() {
return ::capnp::_::PointerHelpers<Owner>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
#if !CAPNP_LITE
template <typename SturdyRef, typename Owner>
......@@ -750,28 +750,28 @@ inline ::capnp::PipelineFor<Owner> Persistent<SturdyRef, Owner>::SaveParams::Pi
template <typename SturdyRef, typename Owner>
inline void Persistent<SturdyRef, Owner>::SaveParams::Builder::setSealFor( ::capnp::ReaderFor<Owner> value) {
::capnp::_::PointerHelpers<Owner>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
template <typename SturdyRef, typename Owner>
inline ::capnp::BuilderFor<Owner> Persistent<SturdyRef, Owner>::SaveParams::Builder::initSealFor() {
return ::capnp::_::PointerHelpers<Owner>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
template <typename SturdyRef, typename Owner>
inline ::capnp::BuilderFor<Owner> Persistent<SturdyRef, Owner>::SaveParams::Builder::initSealFor(unsigned int size) {
return ::capnp::_::PointerHelpers<Owner>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
template <typename SturdyRef, typename Owner>
inline void Persistent<SturdyRef, Owner>::SaveParams::Builder::adoptSealFor(
::capnp::Orphan<Owner>&& value) {
::capnp::_::PointerHelpers<Owner>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
template <typename SturdyRef, typename Owner>
inline ::capnp::Orphan<Owner> Persistent<SturdyRef, Owner>::SaveParams::Builder::disownSealFor() {
return ::capnp::_::PointerHelpers<Owner>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
// Persistent<SturdyRef, Owner>::SaveParams
......@@ -803,22 +803,22 @@ const ::capnp::_::RawBrandedSchema Persistent<SturdyRef, Owner>::SaveParams::_ca
template <typename SturdyRef, typename Owner>
inline bool Persistent<SturdyRef, Owner>::SaveResults::Reader::hasSturdyRef() const {
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
template <typename SturdyRef, typename Owner>
inline bool Persistent<SturdyRef, Owner>::SaveResults::Builder::hasSturdyRef() {
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
template <typename SturdyRef, typename Owner>
inline ::capnp::ReaderFor<SturdyRef> Persistent<SturdyRef, Owner>::SaveResults::Reader::getSturdyRef() const {
return ::capnp::_::PointerHelpers<SturdyRef>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
template <typename SturdyRef, typename Owner>
inline ::capnp::BuilderFor<SturdyRef> Persistent<SturdyRef, Owner>::SaveResults::Builder::getSturdyRef() {
return ::capnp::_::PointerHelpers<SturdyRef>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
#if !CAPNP_LITE
template <typename SturdyRef, typename Owner>
......@@ -829,28 +829,28 @@ inline ::capnp::PipelineFor<SturdyRef> Persistent<SturdyRef, Owner>::SaveResult
template <typename SturdyRef, typename Owner>
inline void Persistent<SturdyRef, Owner>::SaveResults::Builder::setSturdyRef( ::capnp::ReaderFor<SturdyRef> value) {
::capnp::_::PointerHelpers<SturdyRef>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), value);
::capnp::guarded<0>() * ::capnp::POINTERS), value);
}
template <typename SturdyRef, typename Owner>
inline ::capnp::BuilderFor<SturdyRef> Persistent<SturdyRef, Owner>::SaveResults::Builder::initSturdyRef() {
return ::capnp::_::PointerHelpers<SturdyRef>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
template <typename SturdyRef, typename Owner>
inline ::capnp::BuilderFor<SturdyRef> Persistent<SturdyRef, Owner>::SaveResults::Builder::initSturdyRef(unsigned int size) {
return ::capnp::_::PointerHelpers<SturdyRef>::init(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), size);
::capnp::guarded<0>() * ::capnp::POINTERS), size);
}
template <typename SturdyRef, typename Owner>
inline void Persistent<SturdyRef, Owner>::SaveResults::Builder::adoptSturdyRef(
::capnp::Orphan<SturdyRef>&& value) {
::capnp::_::PointerHelpers<SturdyRef>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
template <typename SturdyRef, typename Owner>
inline ::capnp::Orphan<SturdyRef> Persistent<SturdyRef, Owner>::SaveResults::Builder::disownSturdyRef() {
return ::capnp::_::PointerHelpers<SturdyRef>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
// Persistent<SturdyRef, Owner>::SaveResults
......@@ -981,23 +981,23 @@ inline typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner,
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Reader::hasCap() const {
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::hasCap() {
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
#if !CAPNP_LITE
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Reader::getCap() const {
return ::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::getCap() {
return ::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Pipeline::getCap() {
......@@ -1006,45 +1006,45 @@ inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client RealmGa
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::setCap(typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client&& cap) {
::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(cap));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(cap));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::setCap(typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client& cap) {
::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), cap);
::capnp::guarded<0>() * ::capnp::POINTERS), cap);
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::adoptCap(
::capnp::Orphan< ::capnp::Persistent<ExternalRef, ExternalOwner>>&& value) {
::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline ::capnp::Orphan< ::capnp::Persistent<ExternalRef, ExternalOwner>> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::disownCap() {
return ::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
#endif // !CAPNP_LITE
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Reader::hasParams() const {
return !_reader.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS).isNull();
::capnp::guarded<1>() * ::capnp::POINTERS).isNull();
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::hasParams() {
return !_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS).isNull();
::capnp::guarded<1>() * ::capnp::POINTERS).isNull();
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Reader RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Reader::getParams() const {
return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::get(_reader.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Builder RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::getParams() {
return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::get(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
#if !CAPNP_LITE
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
......@@ -1055,23 +1055,23 @@ inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Pi
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::setParams(typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Reader value) {
::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::set(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), value);
::capnp::guarded<1>() * ::capnp::POINTERS), value);
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Builder RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::initParams() {
return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::init(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::adoptParams(
::capnp::Orphan<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>&& value) {
::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::adopt(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<1>() * ::capnp::POINTERS), kj::mv(value));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline ::capnp::Orphan<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::disownParams() {
return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::disown(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
// RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams
......@@ -1110,23 +1110,23 @@ const ::capnp::_::RawBrandedSchema RealmGateway<InternalRef, ExternalRef, Intern
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Reader::hasCap() const {
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::hasCap() {
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
#if !CAPNP_LITE
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<InternalRef, InternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Reader::getCap() const {
return ::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::get(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<InternalRef, InternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::getCap() {
return ::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::get(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<InternalRef, InternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Pipeline::getCap() {
......@@ -1135,45 +1135,45 @@ inline typename ::capnp::Persistent<InternalRef, InternalOwner>::Client RealmGa
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::setCap(typename ::capnp::Persistent<InternalRef, InternalOwner>::Client&& cap) {
::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(cap));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(cap));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::setCap(typename ::capnp::Persistent<InternalRef, InternalOwner>::Client& cap) {
::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::set(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), cap);
::capnp::guarded<0>() * ::capnp::POINTERS), cap);
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::adoptCap(
::capnp::Orphan< ::capnp::Persistent<InternalRef, InternalOwner>>&& value) {
::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::adopt(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<0>() * ::capnp::POINTERS), kj::mv(value));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline ::capnp::Orphan< ::capnp::Persistent<InternalRef, InternalOwner>> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::disownCap() {
return ::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::disown(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
#endif // !CAPNP_LITE
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Reader::hasParams() const {
return !_reader.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS).isNull();
::capnp::guarded<1>() * ::capnp::POINTERS).isNull();
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::hasParams() {
return !_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS).isNull();
::capnp::guarded<1>() * ::capnp::POINTERS).isNull();
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Reader RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Reader::getParams() const {
return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::get(_reader.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Builder RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::getParams() {
return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::get(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
#if !CAPNP_LITE
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
......@@ -1184,23 +1184,23 @@ inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Pi
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::setParams(typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Reader value) {
::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::set(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), value);
::capnp::guarded<1>() * ::capnp::POINTERS), value);
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Builder RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::initParams() {
return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::init(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::adoptParams(
::capnp::Orphan<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>&& value) {
::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::adopt(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS), kj::mv(value));
::capnp::guarded<1>() * ::capnp::POINTERS), kj::mv(value));
}
template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner>
inline ::capnp::Orphan<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::disownParams() {
return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::disown(_builder.getPointerField(
::kj::guarded<1>() * ::capnp::POINTERS));
::capnp::guarded<1>() * ::capnp::POINTERS));
}
// RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams
......
......@@ -600,121 +600,121 @@ private:
inline ::capnp::rpc::twoparty::Side VatId::Reader::getSide() const {
return _reader.getDataField< ::capnp::rpc::twoparty::Side>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline ::capnp::rpc::twoparty::Side VatId::Builder::getSide() {
return _builder.getDataField< ::capnp::rpc::twoparty::Side>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline void VatId::Builder::setSide( ::capnp::rpc::twoparty::Side value) {
_builder.setDataField< ::capnp::rpc::twoparty::Side>(
::kj::guarded<0>() * ::capnp::ELEMENTS, value);
::capnp::guarded<0>() * ::capnp::ELEMENTS, value);
}
inline ::uint32_t ProvisionId::Reader::getJoinId() const {
return _reader.getDataField< ::uint32_t>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline ::uint32_t ProvisionId::Builder::getJoinId() {
return _builder.getDataField< ::uint32_t>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline void ProvisionId::Builder::setJoinId( ::uint32_t value) {
_builder.setDataField< ::uint32_t>(
::kj::guarded<0>() * ::capnp::ELEMENTS, value);
::capnp::guarded<0>() * ::capnp::ELEMENTS, value);
}
inline ::uint32_t JoinKeyPart::Reader::getJoinId() const {
return _reader.getDataField< ::uint32_t>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline ::uint32_t JoinKeyPart::Builder::getJoinId() {
return _builder.getDataField< ::uint32_t>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline void JoinKeyPart::Builder::setJoinId( ::uint32_t value) {
_builder.setDataField< ::uint32_t>(
::kj::guarded<0>() * ::capnp::ELEMENTS, value);
::capnp::guarded<0>() * ::capnp::ELEMENTS, value);
}
inline ::uint16_t JoinKeyPart::Reader::getPartCount() const {
return _reader.getDataField< ::uint16_t>(
::kj::guarded<2>() * ::capnp::ELEMENTS);
::capnp::guarded<2>() * ::capnp::ELEMENTS);
}
inline ::uint16_t JoinKeyPart::Builder::getPartCount() {
return _builder.getDataField< ::uint16_t>(
::kj::guarded<2>() * ::capnp::ELEMENTS);
::capnp::guarded<2>() * ::capnp::ELEMENTS);
}
inline void JoinKeyPart::Builder::setPartCount( ::uint16_t value) {
_builder.setDataField< ::uint16_t>(
::kj::guarded<2>() * ::capnp::ELEMENTS, value);
::capnp::guarded<2>() * ::capnp::ELEMENTS, value);
}
inline ::uint16_t JoinKeyPart::Reader::getPartNum() const {
return _reader.getDataField< ::uint16_t>(
::kj::guarded<3>() * ::capnp::ELEMENTS);
::capnp::guarded<3>() * ::capnp::ELEMENTS);
}
inline ::uint16_t JoinKeyPart::Builder::getPartNum() {
return _builder.getDataField< ::uint16_t>(
::kj::guarded<3>() * ::capnp::ELEMENTS);
::capnp::guarded<3>() * ::capnp::ELEMENTS);
}
inline void JoinKeyPart::Builder::setPartNum( ::uint16_t value) {
_builder.setDataField< ::uint16_t>(
::kj::guarded<3>() * ::capnp::ELEMENTS, value);
::capnp::guarded<3>() * ::capnp::ELEMENTS, value);
}
inline ::uint32_t JoinResult::Reader::getJoinId() const {
return _reader.getDataField< ::uint32_t>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline ::uint32_t JoinResult::Builder::getJoinId() {
return _builder.getDataField< ::uint32_t>(
::kj::guarded<0>() * ::capnp::ELEMENTS);
::capnp::guarded<0>() * ::capnp::ELEMENTS);
}
inline void JoinResult::Builder::setJoinId( ::uint32_t value) {
_builder.setDataField< ::uint32_t>(
::kj::guarded<0>() * ::capnp::ELEMENTS, value);
::capnp::guarded<0>() * ::capnp::ELEMENTS, value);
}
inline bool JoinResult::Reader::getSucceeded() const {
return _reader.getDataField<bool>(
::kj::guarded<32>() * ::capnp::ELEMENTS);
::capnp::guarded<32>() * ::capnp::ELEMENTS);
}
inline bool JoinResult::Builder::getSucceeded() {
return _builder.getDataField<bool>(
::kj::guarded<32>() * ::capnp::ELEMENTS);
::capnp::guarded<32>() * ::capnp::ELEMENTS);
}
inline void JoinResult::Builder::setSucceeded(bool value) {
_builder.setDataField<bool>(
::kj::guarded<32>() * ::capnp::ELEMENTS, value);
::capnp::guarded<32>() * ::capnp::ELEMENTS, value);
}
inline bool JoinResult::Reader::hasCap() const {
return !_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline bool JoinResult::Builder::hasCap() {
return !_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS).isNull();
::capnp::guarded<0>() * ::capnp::POINTERS).isNull();
}
inline ::capnp::AnyPointer::Reader JoinResult::Reader::getCap() const {
return ::capnp::AnyPointer::Reader(_reader.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::AnyPointer::Builder JoinResult::Builder::getCap() {
return ::capnp::AnyPointer::Builder(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
}
inline ::capnp::AnyPointer::Builder JoinResult::Builder::initCap() {
auto result = ::capnp::AnyPointer::Builder(_builder.getPointerField(
::kj::guarded<0>() * ::capnp::POINTERS));
::capnp::guarded<0>() * ::capnp::POINTERS));
result.clear();
return result;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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