From 384c6e6544bd471e6a31161edd64a8d69dcf5bad Mon Sep 17 00:00:00 2001 From: Jeff Schnitzer Date: Tue, 4 Oct 2022 12:46:15 -0700 Subject: [PATCH 01/15] Add serialVersionUID to ByteString and subclasses --- java/core/src/main/java/com/google/protobuf/ByteString.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/core/src/main/java/com/google/protobuf/ByteString.java b/java/core/src/main/java/com/google/protobuf/ByteString.java index 0e03ebd14e..a0905c42bc 100644 --- a/java/core/src/main/java/com/google/protobuf/ByteString.java +++ b/java/core/src/main/java/com/google/protobuf/ByteString.java @@ -75,6 +75,7 @@ import java.util.NoSuchElementException; */ @CheckReturnValue public abstract class ByteString implements Iterable, Serializable { + private static final long serialVersionUID = 1L; /** * When two strings to be concatenated have a combined length shorter than this, we just copy @@ -945,6 +946,8 @@ public abstract class ByteString implements Iterable, Serializable { /** Base class for leaf {@link ByteString}s (i.e. non-ropes). */ abstract static class LeafByteString extends ByteString { + private static final long serialVersionUID = 1L; + @Override protected final int getTreeDepth() { return 0; @@ -1603,6 +1606,7 @@ public abstract class ByteString implements Iterable, Serializable { // Keep this class private to avoid deadlocks in classloading across threads as ByteString's // static initializer loads LiteralByteString and another thread loads BoundedByteString. private static final class BoundedByteString extends LiteralByteString { + private static final long serialVersionUID = 1L; private final int bytesOffset; private final int bytesLength; From 23537c8809a14439cdc64e556e72b509b7a3998f Mon Sep 17 00:00:00 2001 From: Jeff Schnitzer Date: Mon, 10 Oct 2022 22:10:18 -0700 Subject: [PATCH 02/15] Remove duplicate serialVersionUID --- java/core/src/main/java/com/google/protobuf/ByteString.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/java/core/src/main/java/com/google/protobuf/ByteString.java b/java/core/src/main/java/com/google/protobuf/ByteString.java index a0905c42bc..1acbad08b4 100644 --- a/java/core/src/main/java/com/google/protobuf/ByteString.java +++ b/java/core/src/main/java/com/google/protobuf/ByteString.java @@ -1606,8 +1606,6 @@ public abstract class ByteString implements Iterable, Serializable { // Keep this class private to avoid deadlocks in classloading across threads as ByteString's // static initializer loads LiteralByteString and another thread loads BoundedByteString. private static final class BoundedByteString extends LiteralByteString { - private static final long serialVersionUID = 1L; - private final int bytesOffset; private final int bytesLength; From 63b07bb86bc6b7edc3d947c91c47ff6e8b61afde Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Tue, 11 Oct 2022 21:13:55 +0000 Subject: [PATCH 03/15] Edit toolchain to work with absl dep --- toolchain/BUILD.bazel | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/toolchain/BUILD.bazel b/toolchain/BUILD.bazel index b171c227b9..20a435c76f 100644 --- a/toolchain/BUILD.bazel +++ b/toolchain/BUILD.bazel @@ -91,11 +91,16 @@ cc_toolchain_config( cc_toolchain_config( name = "osx-aarch_64-config", extra_compiler_flags = [ - "-I/usr/tools/apple_sdks/xcode_13_0/macosx/usr/include/c++/v1", - "-I/usr/tools/apple_sdks/xcode_13_0/macosx/usr/include" + "-I/usr/tools/xcode_14_0/macosx/usr/include/c++/v1", + "-I/usr/tools/xcode_14_0/macosx/usr/include", + "-F/usr/tools/xcode_14_0/macosx/System/Library/Frameworks", + "-Wno-error=nullability-completeness", + "-Wno-error=availability", + "-Wno-error=elaborated-enum-base", ], + extra_linker_flags = ["-framework CoreFoundation"], linker_path = "/usr/tools", - sysroot = "/usr/tools/apple_sdks/xcode_13_0/macosx", + sysroot = "/usr/tools/xcode_14_0/macosx", target_cpu = "aarch64", target_full_name = "aarch64-apple-macosx11.3", ) @@ -103,11 +108,16 @@ cc_toolchain_config( cc_toolchain_config( name = "osx-x86_64-config", extra_compiler_flags = [ - "-I/usr/tools/apple_sdks/xcode_13_0/macosx/usr/include/c++/v1", - "-I/usr/tools/apple_sdks/xcode_13_0/macosx/usr/include" + "-I/usr/tools/xcode_14_0/macosx/usr/include/c++/v1", + "-I/usr/tools/xcode_14_0/macosx/usr/include", + "-F/usr/tools/xcode_14_0/macosx/System/Library/Frameworks", + "-Wno-error=nullability-completeness", + "-Wno-error=availability", + "-Wno-error=elaborated-enum-base", ], + extra_linker_flags = ["-framework CoreFoundation"], linker_path = "/usr/tools", - sysroot = "/usr/tools/apple_sdks/xcode_13_0/macosx", + sysroot = "/usr/tools/xcode_14_0/macosx", target_cpu = "x86_64", target_full_name = "x86_64-apple-macosx11.3", ) @@ -122,6 +132,7 @@ cc_toolchain_config( extra_include = "/usr/lib/gcc/i686-w64-mingw32", extra_linker_flags = [ "-L/usr/lib/gcc/i686-w64-mingw32/8.3-posix", + "-ldbghelp", "-pthread", ], linker_path = "/usr/bin/ld", @@ -139,6 +150,7 @@ cc_toolchain_config( extra_include = "/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include", extra_linker_flags = [ "-L/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix", + "-ldbghelp", ], linker_path = "/usr/bin/ld", sysroot = "/usr/x86_64-w64-mingw32", From 9fb938451652fcc2e0a222bcb76a0c20ee1b45bd Mon Sep 17 00:00:00 2001 From: Jerry Berg <107155935+googleberg@users.noreply.github.com> Date: Wed, 12 Oct 2022 10:05:32 -0600 Subject: [PATCH 04/15] Avoid race condition Mark default instance as immutable first to avoid race during static initialization of default instances. --- .../java/com/google/protobuf/GeneratedMessageLite.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java b/java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java index 85930c919a..ac975b9ff1 100644 --- a/java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java +++ b/java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java @@ -412,8 +412,13 @@ public abstract class GeneratedMessageLite< protected static > void registerDefaultInstance( Class clazz, T defaultInstance) { + // Default instances must be immutable. + // Marking immutable here to avoid extra bytecode in every generated message class. + // Only calling "markImmutable" rather than "makeImmutable" because for Default Instances: + // 1. All sub-messages are initialized to null / default instances and thus immutable + // 2. All lists are initialized to default instance empty lists which are also immutable. + defaultInstance.markImmutable(); defaultInstanceMap.put(clazz, defaultInstance); - defaultInstance.makeImmutable(); } protected static Object newMessageInfo( From 7b855794e5e87471cc8eb2c75d1f58b873bf4501 Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Fri, 14 Oct 2022 20:29:25 +0000 Subject: [PATCH 05/15] Fix pkg build rules --- pkg/BUILD.bazel | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/BUILD.bazel b/pkg/BUILD.bazel index 2d321512d9..b1784f6a67 100644 --- a/pkg/BUILD.bazel +++ b/pkg/BUILD.bazel @@ -6,9 +6,14 @@ load( "pkg_files", "strip_prefix", ) +load("//:protobuf_release.bzl", "package_naming") load(":build_systems.bzl", "gen_file_lists") load(":cc_dist_library.bzl", "cc_dist_library") +package_naming( + name = "protobuf_pkg_naming", +) + pkg_files( name = "wkt_protos_files", srcs = [ From fd0b1a570519dbb04253098079bc2d225255f55c Mon Sep 17 00:00:00 2001 From: Mike Kruskal <62662355+mkruskal-google@users.noreply.github.com> Date: Fri, 14 Oct 2022 16:27:22 -0700 Subject: [PATCH 06/15] Bump upb version (#10779) * bump upb version * Update stale amalgamation files --- protobuf_deps.bzl | 4 +- ruby/ext/google/protobuf_c/ruby-upb.c | 579 +++++++------ ruby/ext/google/protobuf_c/ruby-upb.h | 1098 ++++++++++++++----------- 3 files changed, 969 insertions(+), 712 deletions(-) diff --git a/protobuf_deps.bzl b/protobuf_deps.bzl index 95e71242de..83e6eeaece 100644 --- a/protobuf_deps.bzl +++ b/protobuf_deps.bzl @@ -132,6 +132,6 @@ def protobuf_deps(): _github_archive( name = "upb", repo = "https://github.com/protocolbuffers/upb", - commit = "32c6e9baab03d584b85390fdba789118f20613fc", - #sha256 = "4c82bff4f790dbb5a11ec40b1fac44e7c95d9a63fd215a13aaf44cb27b10ac27", + commit = "9e2d7f02da5440bfb0dfb069f61baa278aa2fbf6", + sha256 = "9eb13368a136af314855e1497838cf3124846b6a73a7e7c882455a52b8c04662", ) diff --git a/ruby/ext/google/protobuf_c/ruby-upb.c b/ruby/ext/google/protobuf_c/ruby-upb.c index 7a7a7ad4b7..3be0900ee1 100644 --- a/ruby/ext/google/protobuf_c/ruby-upb.c +++ b/ruby/ext/google/protobuf_c/ruby-upb.c @@ -25,9 +25,9 @@ */ #if !((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) || \ + (defined(__cplusplus) && __cplusplus >= 201402L) || \ (defined(_MSC_VER) && _MSC_VER >= 1900)) -#error upb requires C99 or C++11 or MSVC >= 2015. +#error upb requires C99 or C++14 or MSVC >= 2015. #endif // Portable check for GCC minimum version: @@ -464,7 +464,7 @@ static const upb_MiniTable_Sub google_protobuf_FileDescriptorSet_submsgs[1] = { }; static const upb_MiniTable_Field google_protobuf_FileDescriptorSet__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(0, 0), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_FileDescriptorSet_msg_init = { @@ -483,19 +483,19 @@ static const upb_MiniTable_Sub google_protobuf_FileDescriptorProto_submsgs[6] = }; static const upb_MiniTable_Field google_protobuf_FileDescriptorProto__fields[13] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 24), UPB_SIZE(2, 2), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(20, 40), UPB_SIZE(0, 0), kUpb_NoSub, 12, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(24, 48), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(28, 56), UPB_SIZE(0, 0), 1, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(32, 64), UPB_SIZE(0, 0), 2, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {7, UPB_SIZE(36, 72), UPB_SIZE(0, 0), 3, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {8, UPB_SIZE(40, 80), UPB_SIZE(3, 3), 4, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {9, UPB_SIZE(44, 88), UPB_SIZE(4, 4), 5, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {10, UPB_SIZE(48, 96), UPB_SIZE(0, 0), kUpb_NoSub, 5, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {11, UPB_SIZE(52, 104), UPB_SIZE(0, 0), kUpb_NoSub, 5, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {12, UPB_SIZE(56, 112), UPB_SIZE(5, 5), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {13, UPB_SIZE(64, 128), UPB_SIZE(6, 6), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(40, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {2, UPB_SIZE(48, 24), UPB_SIZE(2, 2), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {3, UPB_SIZE(4, 40), UPB_SIZE(0, 0), kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {4, UPB_SIZE(8, 48), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {5, UPB_SIZE(12, 56), UPB_SIZE(0, 0), 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {6, UPB_SIZE(16, 64), UPB_SIZE(0, 0), 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {7, UPB_SIZE(20, 72), UPB_SIZE(0, 0), 3, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {8, UPB_SIZE(24, 80), UPB_SIZE(3, 3), 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {9, UPB_SIZE(28, 88), UPB_SIZE(4, 4), 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {10, UPB_SIZE(32, 96), UPB_SIZE(0, 0), kUpb_NoSub, 5, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {11, UPB_SIZE(36, 104), UPB_SIZE(0, 0), kUpb_NoSub, 5, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {12, UPB_SIZE(56, 112), UPB_SIZE(5, 5), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {13, UPB_SIZE(64, 128), UPB_SIZE(6, 6), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_FileDescriptorProto_msg_init = { @@ -516,16 +516,16 @@ static const upb_MiniTable_Sub google_protobuf_DescriptorProto_submsgs[8] = { }; static const upb_MiniTable_Field google_protobuf_DescriptorProto__fields[10] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 24), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 32), UPB_SIZE(0, 0), 1, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(20, 40), UPB_SIZE(0, 0), 2, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(24, 48), UPB_SIZE(0, 0), 3, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(28, 56), UPB_SIZE(0, 0), 4, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {7, UPB_SIZE(32, 64), UPB_SIZE(2, 2), 5, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {8, UPB_SIZE(36, 72), UPB_SIZE(0, 0), 6, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {9, UPB_SIZE(40, 80), UPB_SIZE(0, 0), 7, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {10, UPB_SIZE(44, 88), UPB_SIZE(0, 0), kUpb_NoSub, 12, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(40, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {2, UPB_SIZE(4, 24), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {3, UPB_SIZE(8, 32), UPB_SIZE(0, 0), 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {4, UPB_SIZE(12, 40), UPB_SIZE(0, 0), 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {5, UPB_SIZE(16, 48), UPB_SIZE(0, 0), 3, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {6, UPB_SIZE(20, 56), UPB_SIZE(0, 0), 4, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {7, UPB_SIZE(24, 64), UPB_SIZE(2, 2), 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {8, UPB_SIZE(28, 72), UPB_SIZE(0, 0), 6, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {9, UPB_SIZE(32, 80), UPB_SIZE(0, 0), 7, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {10, UPB_SIZE(36, 88), UPB_SIZE(0, 0), kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_DescriptorProto_msg_init = { @@ -541,7 +541,7 @@ static const upb_MiniTable_Sub google_protobuf_DescriptorProto_ExtensionRange_su static const upb_MiniTable_Field google_protobuf_DescriptorProto_ExtensionRange__fields[3] = { {1, UPB_SIZE(4, 4), UPB_SIZE(1, 1), kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, {2, UPB_SIZE(8, 8), UPB_SIZE(2, 2), kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(12, 16), UPB_SIZE(3, 3), 0, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {3, UPB_SIZE(12, 16), UPB_SIZE(3, 3), 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_DescriptorProto_ExtensionRange_msg_init = { @@ -566,7 +566,7 @@ static const upb_MiniTable_Sub google_protobuf_ExtensionRangeOptions_submsgs[1] }; static const upb_MiniTable_Field google_protobuf_ExtensionRangeOptions__fields[1] = { - {999, UPB_SIZE(0, 0), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {999, UPB_SIZE(0, 0), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_ExtensionRangeOptions_msg_init = { @@ -582,17 +582,17 @@ static const upb_MiniTable_Sub google_protobuf_FieldDescriptorProto_submsgs[3] = }; static const upb_MiniTable_Field google_protobuf_FieldDescriptorProto__fields[11] = { - {1, UPB_SIZE(24, 24), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(32, 40), UPB_SIZE(2, 2), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(28, 24), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {2, UPB_SIZE(36, 40), UPB_SIZE(2, 2), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, {3, UPB_SIZE(4, 4), UPB_SIZE(3, 3), kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, {4, UPB_SIZE(8, 8), UPB_SIZE(4, 4), 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, {5, UPB_SIZE(12, 12), UPB_SIZE(5, 5), 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(40, 56), UPB_SIZE(6, 6), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {7, UPB_SIZE(48, 72), UPB_SIZE(7, 7), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {8, UPB_SIZE(56, 88), UPB_SIZE(8, 8), 2, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {9, UPB_SIZE(16, 16), UPB_SIZE(9, 9), kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {10, UPB_SIZE(60, 96), UPB_SIZE(10, 10), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {17, UPB_SIZE(20, 20), UPB_SIZE(11, 11), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, + {6, UPB_SIZE(44, 56), UPB_SIZE(6, 6), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {7, UPB_SIZE(52, 72), UPB_SIZE(7, 7), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {8, UPB_SIZE(16, 88), UPB_SIZE(8, 8), 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {9, UPB_SIZE(20, 16), UPB_SIZE(9, 9), kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, + {10, UPB_SIZE(60, 96), UPB_SIZE(10, 10), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {17, UPB_SIZE(24, 20), UPB_SIZE(11, 11), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_FieldDescriptorProto_msg_init = { @@ -606,8 +606,8 @@ static const upb_MiniTable_Sub google_protobuf_OneofDescriptorProto_submsgs[1] = }; static const upb_MiniTable_Field google_protobuf_OneofDescriptorProto__fields[2] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 24), UPB_SIZE(2, 2), 0, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(8, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {2, UPB_SIZE(4, 24), UPB_SIZE(2, 2), 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_OneofDescriptorProto_msg_init = { @@ -623,11 +623,11 @@ static const upb_MiniTable_Sub google_protobuf_EnumDescriptorProto_submsgs[3] = }; static const upb_MiniTable_Field google_protobuf_EnumDescriptorProto__fields[5] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 24), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 32), UPB_SIZE(2, 2), 1, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(20, 40), UPB_SIZE(0, 0), 2, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(24, 48), UPB_SIZE(0, 0), kUpb_NoSub, 12, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(20, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {2, UPB_SIZE(4, 24), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {3, UPB_SIZE(8, 32), UPB_SIZE(2, 2), 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {4, UPB_SIZE(12, 40), UPB_SIZE(0, 0), 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {5, UPB_SIZE(16, 48), UPB_SIZE(0, 0), kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_EnumDescriptorProto_msg_init = { @@ -652,9 +652,9 @@ static const upb_MiniTable_Sub google_protobuf_EnumValueDescriptorProto_submsgs[ }; static const upb_MiniTable_Field google_protobuf_EnumValueDescriptorProto__fields[3] = { - {1, UPB_SIZE(8, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(12, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, {2, UPB_SIZE(4, 4), UPB_SIZE(2, 2), kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 24), UPB_SIZE(3, 3), 0, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {3, UPB_SIZE(8, 24), UPB_SIZE(3, 3), 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_EnumValueDescriptorProto_msg_init = { @@ -669,9 +669,9 @@ static const upb_MiniTable_Sub google_protobuf_ServiceDescriptorProto_submsgs[2] }; static const upb_MiniTable_Field google_protobuf_ServiceDescriptorProto__fields[3] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 24), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 32), UPB_SIZE(2, 2), 1, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(12, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {2, UPB_SIZE(4, 24), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {3, UPB_SIZE(8, 32), UPB_SIZE(2, 2), 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_ServiceDescriptorProto_msg_init = { @@ -685,18 +685,18 @@ static const upb_MiniTable_Sub google_protobuf_MethodDescriptorProto_submsgs[1] }; static const upb_MiniTable_Field google_protobuf_MethodDescriptorProto__fields[6] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 24), UPB_SIZE(2, 2), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(20, 40), UPB_SIZE(3, 3), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(28, 56), UPB_SIZE(4, 4), 0, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(1, 1), UPB_SIZE(5, 5), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(2, 2), UPB_SIZE(6, 6), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(12, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {2, UPB_SIZE(20, 24), UPB_SIZE(2, 2), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {3, UPB_SIZE(28, 40), UPB_SIZE(3, 3), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {4, UPB_SIZE(4, 56), UPB_SIZE(4, 4), 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {5, UPB_SIZE(8, 1), UPB_SIZE(5, 5), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, + {6, UPB_SIZE(9, 2), UPB_SIZE(6, 6), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_MethodDescriptorProto_msg_init = { &google_protobuf_MethodDescriptorProto_submsgs[0], &google_protobuf_MethodDescriptorProto__fields[0], - UPB_SIZE(32, 64), 6, kUpb_ExtMode_NonExtendable, 6, 255, 0, + UPB_SIZE(40, 64), 6, kUpb_ExtMode_NonExtendable, 6, 255, 0, }; static const upb_MiniTable_Sub google_protobuf_FileOptions_submsgs[2] = { @@ -705,11 +705,11 @@ static const upb_MiniTable_Sub google_protobuf_FileOptions_submsgs[2] = { }; static const upb_MiniTable_Field google_protobuf_FileOptions__fields[21] = { - {1, UPB_SIZE(20, 24), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {8, UPB_SIZE(28, 40), UPB_SIZE(2, 2), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(24, 24), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {8, UPB_SIZE(32, 40), UPB_SIZE(2, 2), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, {9, UPB_SIZE(4, 4), UPB_SIZE(3, 3), 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, {10, UPB_SIZE(8, 8), UPB_SIZE(4, 4), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {11, UPB_SIZE(36, 56), UPB_SIZE(5, 5), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {11, UPB_SIZE(40, 56), UPB_SIZE(5, 5), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, {16, UPB_SIZE(9, 9), UPB_SIZE(6, 6), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {17, UPB_SIZE(10, 10), UPB_SIZE(7, 7), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {18, UPB_SIZE(11, 11), UPB_SIZE(8, 8), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, @@ -717,15 +717,15 @@ static const upb_MiniTable_Field google_protobuf_FileOptions__fields[21] = { {23, UPB_SIZE(13, 13), UPB_SIZE(10, 10), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {27, UPB_SIZE(14, 14), UPB_SIZE(11, 11), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {31, UPB_SIZE(15, 15), UPB_SIZE(12, 12), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {36, UPB_SIZE(44, 72), UPB_SIZE(13, 13), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {37, UPB_SIZE(52, 88), UPB_SIZE(14, 14), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {39, UPB_SIZE(60, 104), UPB_SIZE(15, 15), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {40, UPB_SIZE(68, 120), UPB_SIZE(16, 16), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {41, UPB_SIZE(76, 136), UPB_SIZE(17, 17), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {36, UPB_SIZE(48, 72), UPB_SIZE(13, 13), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {37, UPB_SIZE(56, 88), UPB_SIZE(14, 14), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {39, UPB_SIZE(64, 104), UPB_SIZE(15, 15), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {40, UPB_SIZE(72, 120), UPB_SIZE(16, 16), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {41, UPB_SIZE(80, 136), UPB_SIZE(17, 17), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, {42, UPB_SIZE(16, 16), UPB_SIZE(18, 18), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {44, UPB_SIZE(84, 152), UPB_SIZE(19, 19), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {45, UPB_SIZE(92, 168), UPB_SIZE(20, 20), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(100, 184), UPB_SIZE(0, 0), 1, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {44, UPB_SIZE(88, 152), UPB_SIZE(19, 19), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {45, UPB_SIZE(96, 168), UPB_SIZE(20, 20), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {999, UPB_SIZE(20, 184), UPB_SIZE(0, 0), 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_FileOptions_msg_init = { @@ -743,7 +743,7 @@ static const upb_MiniTable_Field google_protobuf_MessageOptions__fields[5] = { {2, UPB_SIZE(2, 2), UPB_SIZE(2, 2), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {3, UPB_SIZE(3, 3), UPB_SIZE(3, 3), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {7, UPB_SIZE(4, 4), UPB_SIZE(4, 4), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {999, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_MessageOptions_msg_init = { @@ -766,7 +766,7 @@ static const upb_MiniTable_Field google_protobuf_FieldOptions__fields[8] = { {6, UPB_SIZE(12, 12), UPB_SIZE(5, 5), 1, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, {10, UPB_SIZE(16, 16), UPB_SIZE(6, 6), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {15, UPB_SIZE(17, 17), UPB_SIZE(7, 7), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(20, 24), UPB_SIZE(0, 0), 2, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {999, UPB_SIZE(20, 24), UPB_SIZE(0, 0), 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_FieldOptions_msg_init = { @@ -780,7 +780,7 @@ static const upb_MiniTable_Sub google_protobuf_OneofOptions_submsgs[1] = { }; static const upb_MiniTable_Field google_protobuf_OneofOptions__fields[1] = { - {999, UPB_SIZE(0, 0), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {999, UPB_SIZE(0, 0), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_OneofOptions_msg_init = { @@ -796,7 +796,7 @@ static const upb_MiniTable_Sub google_protobuf_EnumOptions_submsgs[1] = { static const upb_MiniTable_Field google_protobuf_EnumOptions__fields[3] = { {2, UPB_SIZE(1, 1), UPB_SIZE(1, 1), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {3, UPB_SIZE(2, 2), UPB_SIZE(2, 2), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {999, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_EnumOptions_msg_init = { @@ -811,7 +811,7 @@ static const upb_MiniTable_Sub google_protobuf_EnumValueOptions_submsgs[1] = { static const upb_MiniTable_Field google_protobuf_EnumValueOptions__fields[2] = { {1, UPB_SIZE(1, 1), UPB_SIZE(1, 1), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {999, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_EnumValueOptions_msg_init = { @@ -826,7 +826,7 @@ static const upb_MiniTable_Sub google_protobuf_ServiceOptions_submsgs[1] = { static const upb_MiniTable_Field google_protobuf_ServiceOptions__fields[2] = { {33, UPB_SIZE(1, 1), UPB_SIZE(1, 1), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {999, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_ServiceOptions_msg_init = { @@ -843,7 +843,7 @@ static const upb_MiniTable_Sub google_protobuf_MethodOptions_submsgs[2] = { static const upb_MiniTable_Field google_protobuf_MethodOptions__fields[3] = { {33, UPB_SIZE(1, 1), UPB_SIZE(1, 1), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, {34, UPB_SIZE(4, 4), UPB_SIZE(2, 2), 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 1, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {999, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_MethodOptions_msg_init = { @@ -857,13 +857,13 @@ static const upb_MiniTable_Sub google_protobuf_UninterpretedOption_submsgs[1] = }; static const upb_MiniTable_Field google_protobuf_UninterpretedOption__fields[7] = { - {2, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(8, 16), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(32, 64), UPB_SIZE(2, 2), kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(40, 72), UPB_SIZE(3, 3), kUpb_NoSub, 3, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(48, 80), UPB_SIZE(4, 4), kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}, - {7, UPB_SIZE(16, 32), UPB_SIZE(5, 5), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {8, UPB_SIZE(24, 48), UPB_SIZE(6, 6), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {2, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {3, UPB_SIZE(8, 16), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {4, UPB_SIZE(16, 32), UPB_SIZE(2, 2), kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}, + {5, UPB_SIZE(24, 40), UPB_SIZE(3, 3), kUpb_NoSub, 3, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}, + {6, UPB_SIZE(32, 48), UPB_SIZE(4, 4), kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}, + {7, UPB_SIZE(40, 56), UPB_SIZE(5, 5), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {8, UPB_SIZE(48, 72), UPB_SIZE(6, 6), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_UninterpretedOption_msg_init = { @@ -873,7 +873,7 @@ const upb_MiniTable google_protobuf_UninterpretedOption_msg_init = { }; static const upb_MiniTable_Field google_protobuf_UninterpretedOption_NamePart__fields[2] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(4, 8), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, {2, UPB_SIZE(1, 1), UPB_SIZE(2, 2), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, }; @@ -888,7 +888,7 @@ static const upb_MiniTable_Sub google_protobuf_SourceCodeInfo_submsgs[1] = { }; static const upb_MiniTable_Field google_protobuf_SourceCodeInfo__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(0, 0), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_SourceCodeInfo_msg_init = { @@ -898,11 +898,11 @@ const upb_MiniTable google_protobuf_SourceCodeInfo_msg_init = { }; static const upb_MiniTable_Field google_protobuf_SourceCodeInfo_Location__fields[5] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(0, 0), kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(8, 16), UPB_SIZE(0, 0), kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(12, 24), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(20, 40), UPB_SIZE(2, 2), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(28, 56), UPB_SIZE(0, 0), kUpb_NoSub, 12, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(4, 8), UPB_SIZE(0, 0), kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {2, UPB_SIZE(8, 16), UPB_SIZE(0, 0), kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {3, UPB_SIZE(16, 24), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {4, UPB_SIZE(24, 40), UPB_SIZE(2, 2), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {6, UPB_SIZE(12, 56), UPB_SIZE(0, 0), kUpb_NoSub, 12, kUpb_FieldMode_Array | kUpb_LabelFlags_IsAlternate | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_SourceCodeInfo_Location_msg_init = { @@ -916,7 +916,7 @@ static const upb_MiniTable_Sub google_protobuf_GeneratedCodeInfo_submsgs[1] = { }; static const upb_MiniTable_Field google_protobuf_GeneratedCodeInfo__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(0, 0), UPB_SIZE(0, 0), 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_GeneratedCodeInfo_msg_init = { @@ -930,11 +930,11 @@ static const upb_MiniTable_Sub google_protobuf_GeneratedCodeInfo_Annotation_subm }; static const upb_MiniTable_Field google_protobuf_GeneratedCodeInfo_Annotation__fields[5] = { - {1, UPB_SIZE(16, 16), UPB_SIZE(0, 0), kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(20, 24), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(4, 4), UPB_SIZE(2, 2), kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(8, 8), UPB_SIZE(3, 3), kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(12, 12), UPB_SIZE(4, 4), 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, + {1, UPB_SIZE(4, 16), UPB_SIZE(0, 0), kUpb_NoSub, 5, kUpb_FieldMode_Array | kUpb_LabelFlags_IsPacked | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, + {2, UPB_SIZE(20, 24), UPB_SIZE(1, 1), kUpb_NoSub, 12, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, + {3, UPB_SIZE(8, 4), UPB_SIZE(2, 2), kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, + {4, UPB_SIZE(12, 8), UPB_SIZE(3, 3), kUpb_NoSub, 5, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, + {5, UPB_SIZE(16, 12), UPB_SIZE(4, 4), 0, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, }; const upb_MiniTable google_protobuf_GeneratedCodeInfo_Annotation_msg_init = { @@ -1081,8 +1081,9 @@ upb_ExtensionRegistry* upb_ExtensionRegistry_New(upb_Arena* arena) { return r; } -bool _upb_extreg_add(upb_ExtensionRegistry* r, - const upb_MiniTable_Extension** e, size_t count) { +bool upb_ExtensionRegistry_AddArray(upb_ExtensionRegistry* r, + const upb_MiniTable_Extension** e, + size_t count) { char buf[EXTREG_KEY_SIZE]; const upb_MiniTable_Extension** start = e; const upb_MiniTable_Extension** end = UPB_PTRADD(e, count); @@ -1108,12 +1109,11 @@ failure: return false; } -const upb_MiniTable_Extension* _upb_extreg_get(const upb_ExtensionRegistry* r, - const upb_MiniTable* l, - uint32_t num) { +const upb_MiniTable_Extension* upb_ExtensionRegistry_Lookup( + const upb_ExtensionRegistry* r, const upb_MiniTable* t, uint32_t num) { char buf[EXTREG_KEY_SIZE]; upb_value v; - extreg_key(buf, l, num); + extreg_key(buf, t, num); if (upb_strtable_lookup2(&r->exts, buf, EXTREG_KEY_SIZE, &v)) { return upb_value_getconstptr(v); } else { @@ -2987,7 +2987,8 @@ static void jsondec_tomsg(jsondec* d, upb_Message* msg, static upb_MessageValue jsondec_msg(jsondec* d, const upb_FieldDef* f) { const upb_MessageDef* m = upb_FieldDef_MessageSubDef(f); - upb_Message* msg = upb_Message_New(m, d->arena); + const upb_MiniTable* layout = upb_MessageDef_MiniTable(m); + upb_Message* msg = upb_Message_New(layout, d->arena); upb_MessageValue val; jsondec_tomsg(d, msg, m); @@ -3249,11 +3250,12 @@ static void jsondec_listvalue(jsondec* d, upb_Message* msg, const upb_MessageDef* m) { const upb_FieldDef* values_f = upb_MessageDef_FindFieldByNumber(m, 1); const upb_MessageDef* value_m = upb_FieldDef_MessageSubDef(values_f); + const upb_MiniTable* value_layout = upb_MessageDef_MiniTable(value_m); upb_Array* values = upb_Message_Mutable(msg, values_f, d->arena).array; jsondec_arrstart(d); while (jsondec_arrnext(d)) { - upb_Message* value_msg = upb_Message_New(value_m, d->arena); + upb_Message* value_msg = upb_Message_New(value_layout, d->arena); upb_MessageValue value; value.msg_val = value_msg; upb_Array_Append(values, value, d->arena); @@ -3268,12 +3270,13 @@ static void jsondec_struct(jsondec* d, upb_Message* msg, const upb_MessageDef* entry_m = upb_FieldDef_MessageSubDef(fields_f); const upb_FieldDef* value_f = upb_MessageDef_FindFieldByNumber(entry_m, 2); const upb_MessageDef* value_m = upb_FieldDef_MessageSubDef(value_f); + const upb_MiniTable* value_layout = upb_MessageDef_MiniTable(value_m); upb_Map* fields = upb_Message_Mutable(msg, fields_f, d->arena).map; jsondec_objstart(d); while (jsondec_objnext(d)) { upb_MessageValue key, value; - upb_Message* value_msg = upb_Message_New(value_m, d->arena); + upb_Message* value_msg = upb_Message_New(value_layout, d->arena); key.str_val = jsondec_string(d); value.msg_val = value_msg; upb_Map_Set(fields, key, value, d->arena); @@ -3475,7 +3478,8 @@ static void jsondec_any(jsondec* d, upb_Message* msg, const upb_MessageDef* m) { jsondec_err(d, "Any object didn't contain a '@type' field"); } - any_msg = upb_Message_New(any_m, d->arena); + const upb_MiniTable* any_layout = upb_MessageDef_MiniTable(any_m); + any_msg = upb_Message_New(any_layout, d->arena); if (pre_type_data) { size_t len = pre_type_end - pre_type_data + 1; @@ -3947,7 +3951,7 @@ static void jsonenc_any(jsonenc* e, const upb_Message* msg, const upb_MessageDef* any_m = jsonenc_getanymsg(e, type_url); const upb_MiniTable* any_layout = upb_MessageDef_MiniTable(any_m); upb_Arena* arena = jsonenc_arena(e); - upb_Message* any = upb_Message_New(any_m, arena); + upb_Message* any = upb_Message_New(any_layout, arena); if (upb_Decode(value.data, value.size, any, any_layout, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { @@ -4357,19 +4361,19 @@ typedef enum { kUpb_EncodedType_Int64 = 9, kUpb_EncodedType_UInt64 = 10, kUpb_EncodedType_SInt64 = 11, - kUpb_EncodedType_Enum = 12, + kUpb_EncodedType_OpenEnum = 12, kUpb_EncodedType_Bool = 13, kUpb_EncodedType_Bytes = 14, kUpb_EncodedType_String = 15, kUpb_EncodedType_Group = 16, kUpb_EncodedType_Message = 17, + kUpb_EncodedType_ClosedEnum = 18, kUpb_EncodedType_RepeatedBase = 20, } upb_EncodedType; typedef enum { kUpb_EncodedFieldModifier_FlipPacked = 1 << 0, - kUpb_EncodedFieldModifier_IsClosedEnum = 1 << 1, // upb only. kUpb_EncodedFieldModifier_IsProto3Singular = 1 << 2, kUpb_EncodedFieldModifier_IsRequired = 1 << 3, @@ -4377,7 +4381,7 @@ typedef enum { enum { kUpb_EncodedValue_MinField = ' ', - kUpb_EncodedValue_MaxField = 'K', + kUpb_EncodedValue_MaxField = 'I', kUpb_EncodedValue_MinModifier = 'L', kUpb_EncodedValue_MaxModifier = '[', kUpb_EncodedValue_End = '^', @@ -4390,6 +4394,12 @@ enum { kUpb_EncodedValue_MaxEnumMask = 'A', }; +enum { + kUpb_EncodedVersion_EnumV1 = '!', + kUpb_EncodedVersion_ExtensionV1 = '#', + kUpb_EncodedVersion_MessageV1 = '$', +}; + char upb_ToBase92(int8_t ch) { static const char kUpb_ToBase92[] = { ' ', '!', '#', '$', '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', @@ -4463,14 +4473,19 @@ static upb_MtDataEncoderInternal* upb_MtDataEncoder_GetInternal( return ret; } -static char* upb_MtDataEncoder_Put(upb_MtDataEncoder* e, char* ptr, char ch) { +static char* upb_MtDataEncoder_PutRaw(upb_MtDataEncoder* e, char* ptr, + char ch) { upb_MtDataEncoderInternal* in = (upb_MtDataEncoderInternal*)e->internal; UPB_ASSERT(ptr - in->buf_start < kUpb_MtDataEncoder_MinSize); if (ptr == e->end) return NULL; - *ptr++ = upb_ToBase92(ch); + *ptr++ = ch; return ptr; } +static char* upb_MtDataEncoder_Put(upb_MtDataEncoder* e, char* ptr, char ch) { + return upb_MtDataEncoder_PutRaw(e, ptr, upb_ToBase92(ch)); +} + static char* upb_MtDataEncoder_PutBase92Varint(upb_MtDataEncoder* e, char* ptr, uint32_t val, int min, int max) { int shift = _upb_Log2Ceiling(upb_FromBase92(max) - upb_FromBase92(min) + 1); @@ -4495,12 +4510,30 @@ char* upb_MtDataEncoder_PutModifier(upb_MtDataEncoder* e, char* ptr, return ptr; } +char* upb_MtDataEncoder_EncodeExtension(upb_MtDataEncoder* e, char* ptr, + upb_FieldType type, uint32_t field_num, + uint64_t field_mod) { + upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, ptr); + in->state.msg_state.msg_modifiers = 0; + in->state.msg_state.last_field_num = 0; + in->state.msg_state.oneof_state = kUpb_OneofState_NotStarted; + + ptr = upb_MtDataEncoder_PutRaw(e, ptr, kUpb_EncodedVersion_ExtensionV1); + if (!ptr) return NULL; + + return upb_MtDataEncoder_PutField(e, ptr, type, field_num, field_mod); +} + char* upb_MtDataEncoder_StartMessage(upb_MtDataEncoder* e, char* ptr, uint64_t msg_mod) { upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, ptr); in->state.msg_state.msg_modifiers = msg_mod; in->state.msg_state.last_field_num = 0; in->state.msg_state.oneof_state = kUpb_OneofState_NotStarted; + + ptr = upb_MtDataEncoder_PutRaw(e, ptr, kUpb_EncodedVersion_MessageV1); + if (!ptr) return NULL; + return upb_MtDataEncoder_PutModifier(e, ptr, msg_mod); } @@ -4521,7 +4554,7 @@ char* upb_MtDataEncoder_PutField(upb_MtDataEncoder* e, char* ptr, [kUpb_FieldType_Message] = kUpb_EncodedType_Message, [kUpb_FieldType_Bytes] = kUpb_EncodedType_Bytes, [kUpb_FieldType_UInt32] = kUpb_EncodedType_UInt32, - [kUpb_FieldType_Enum] = kUpb_EncodedType_Enum, + [kUpb_FieldType_Enum] = kUpb_EncodedType_OpenEnum, [kUpb_FieldType_SFixed32] = kUpb_EncodedType_SFixed32, [kUpb_FieldType_SFixed64] = kUpb_EncodedType_SFixed64, [kUpb_FieldType_SInt32] = kUpb_EncodedType_SInt32, @@ -4543,12 +4576,11 @@ char* upb_MtDataEncoder_PutField(upb_MtDataEncoder* e, char* ptr, uint32_t encoded_modifiers = 0; // Put field type. - if (type == kUpb_FieldType_Enum && - !(field_mod & kUpb_FieldModifier_IsClosedEnum)) { - type = kUpb_FieldType_Int32; - } - int encoded_type = kUpb_TypeToEncoded[type]; + if (field_mod & kUpb_FieldModifier_IsClosedEnum) { + UPB_ASSERT(type == kUpb_FieldType_Enum); + encoded_type = kUpb_EncodedType_ClosedEnum; + } if (field_mod & kUpb_FieldModifier_IsRepeated) { // Repeated fields shift the type number up (unlike other modifiers which // are bit flags). @@ -4601,10 +4633,12 @@ char* upb_MtDataEncoder_PutOneofField(upb_MtDataEncoder* e, char* ptr, return ptr; } -void upb_MtDataEncoder_StartEnum(upb_MtDataEncoder* e) { - upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, NULL); +char* upb_MtDataEncoder_StartEnum(upb_MtDataEncoder* e, char* ptr) { + upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, ptr); in->state.enum_state.present_values_mask = 0; in->state.enum_state.last_written_value = 0; + + return upb_MtDataEncoder_PutRaw(e, ptr, kUpb_EncodedVersion_EnumV1); } static char* upb_MtDataEncoder_FlushDenseEnumMask(upb_MtDataEncoder* e, @@ -4659,6 +4693,19 @@ const upb_MiniTable_Field* upb_MiniTable_FindFieldByNumber( return NULL; } +upb_FieldType upb_MiniTableField_Type(const upb_MiniTable_Field* field) { + if (field->mode & kUpb_LabelFlags_IsAlternate) { + if (field->descriptortype == kUpb_FieldType_Int32) { + return kUpb_FieldType_Enum; + } else if (field->descriptortype == kUpb_FieldType_Bytes) { + return kUpb_FieldType_String; + } else { + UPB_ASSERT(false); + } + } + return field->descriptortype; +} + /** Data decoder **************************************************************/ // Note: we sort by this number when calculating layout order. @@ -4764,6 +4811,7 @@ static bool upb_MiniTable_HasSub(upb_MiniTable_Field* field, case kUpb_FieldType_String: if (!(msg_modifiers & kUpb_MessageModifier_ValidateUtf8)) { field->descriptortype = kUpb_FieldType_Bytes; + field->mode |= kUpb_LabelFlags_IsAlternate; } return false; default: @@ -4778,8 +4826,16 @@ static bool upb_MtDecoder_FieldIsPackable(upb_MiniTable_Field* field) { static void upb_MiniTable_SetTypeAndSub(upb_MiniTable_Field* field, upb_FieldType type, uint32_t* sub_count, - uint64_t msg_modifiers) { + uint64_t msg_modifiers, + bool is_proto3_enum) { field->descriptortype = type; + + if (is_proto3_enum) { + UPB_ASSERT(field->descriptortype == kUpb_FieldType_Enum); + field->descriptortype = kUpb_FieldType_Int32; + field->mode |= kUpb_LabelFlags_IsAlternate; + } + if (upb_MiniTable_HasSub(field, msg_modifiers)) { field->submsg_index = sub_count ? (*sub_count)++ : 0; } else { @@ -4806,15 +4862,14 @@ static void upb_MiniTable_SetField(upb_MtDecoder* d, uint8_t ch, [kUpb_EncodedType_Fixed32] = kUpb_FieldRep_4Byte, [kUpb_EncodedType_Bool] = kUpb_FieldRep_1Byte, [kUpb_EncodedType_String] = kUpb_FieldRep_StringView, - [kUpb_EncodedType_Group] = kUpb_FieldRep_Pointer, - [kUpb_EncodedType_Message] = kUpb_FieldRep_Pointer, [kUpb_EncodedType_Bytes] = kUpb_FieldRep_StringView, [kUpb_EncodedType_UInt32] = kUpb_FieldRep_4Byte, - [kUpb_EncodedType_Enum] = kUpb_FieldRep_4Byte, + [kUpb_EncodedType_OpenEnum] = kUpb_FieldRep_4Byte, [kUpb_EncodedType_SFixed32] = kUpb_FieldRep_4Byte, [kUpb_EncodedType_SFixed64] = kUpb_FieldRep_8Byte, [kUpb_EncodedType_SInt32] = kUpb_FieldRep_4Byte, [kUpb_EncodedType_SInt64] = kUpb_FieldRep_8Byte, + [kUpb_EncodedType_ClosedEnum] = kUpb_FieldRep_4Byte, }; static const char kUpb_EncodedToType[] = { @@ -4831,34 +4886,42 @@ static void upb_MiniTable_SetField(upb_MtDecoder* d, uint8_t ch, [kUpb_EncodedType_Message] = kUpb_FieldType_Message, [kUpb_EncodedType_Bytes] = kUpb_FieldType_Bytes, [kUpb_EncodedType_UInt32] = kUpb_FieldType_UInt32, - [kUpb_EncodedType_Enum] = kUpb_FieldType_Enum, + [kUpb_EncodedType_OpenEnum] = kUpb_FieldType_Enum, [kUpb_EncodedType_SFixed32] = kUpb_FieldType_SFixed32, [kUpb_EncodedType_SFixed64] = kUpb_FieldType_SFixed64, [kUpb_EncodedType_SInt32] = kUpb_FieldType_SInt32, [kUpb_EncodedType_SInt64] = kUpb_FieldType_SInt64, + [kUpb_EncodedType_ClosedEnum] = kUpb_FieldType_Enum, }; + char pointer_rep = d->platform == kUpb_MiniTablePlatform_32Bit + ? kUpb_FieldRep_4Byte + : kUpb_FieldRep_8Byte; + int8_t type = upb_FromBase92(ch); if (ch >= upb_ToBase92(kUpb_EncodedType_RepeatedBase)) { type -= kUpb_EncodedType_RepeatedBase; field->mode = kUpb_FieldMode_Array; - field->mode |= kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift; + field->mode |= pointer_rep << kUpb_FieldRep_Shift; field->offset = kNoPresence; } else { - if (type >= sizeof(kUpb_EncodedToFieldRep)) { + field->mode = kUpb_FieldMode_Scalar; + field->offset = kHasbitPresence; + if (type == kUpb_EncodedType_Group || type == kUpb_EncodedType_Message) { + field->mode |= pointer_rep << kUpb_FieldRep_Shift; + } else if (type >= sizeof(kUpb_EncodedToFieldRep)) { upb_MtDecoder_ErrorFormat(d, "Invalid field type: %d", (int)type); UPB_UNREACHABLE(); + } else { + field->mode |= kUpb_EncodedToFieldRep[type] << kUpb_FieldRep_Shift; } - field->mode = kUpb_FieldMode_Scalar; - field->mode |= kUpb_EncodedToFieldRep[type] << kUpb_FieldRep_Shift; - field->offset = kHasbitPresence; } if (type >= sizeof(kUpb_EncodedToType)) { upb_MtDecoder_ErrorFormat(d, "Invalid field type: %d", (int)type); UPB_UNREACHABLE(); } upb_MiniTable_SetTypeAndSub(field, kUpb_EncodedToType[type], sub_count, - msg_modifiers); + msg_modifiers, type == kUpb_EncodedType_OpenEnum); } static void upb_MtDecoder_ModifyField(upb_MtDecoder* d, @@ -4926,13 +4989,15 @@ static void upb_MtDecoder_PushOneof(upb_MtDecoder* d, upb_LayoutItem item) { size_t upb_MtDecoder_SizeOfRep(upb_FieldRep rep, upb_MiniTablePlatform platform) { static const uint8_t kRepToSize32[] = { - [kUpb_FieldRep_1Byte] = 1, [kUpb_FieldRep_4Byte] = 4, - [kUpb_FieldRep_Pointer] = 4, [kUpb_FieldRep_StringView] = 8, + [kUpb_FieldRep_1Byte] = 1, + [kUpb_FieldRep_4Byte] = 4, + [kUpb_FieldRep_StringView] = 8, [kUpb_FieldRep_8Byte] = 8, }; static const uint8_t kRepToSize64[] = { - [kUpb_FieldRep_1Byte] = 1, [kUpb_FieldRep_4Byte] = 4, - [kUpb_FieldRep_Pointer] = 8, [kUpb_FieldRep_StringView] = 16, + [kUpb_FieldRep_1Byte] = 1, + [kUpb_FieldRep_4Byte] = 4, + [kUpb_FieldRep_StringView] = 16, [kUpb_FieldRep_8Byte] = 8, }; UPB_ASSERT(sizeof(upb_StringView) == @@ -4944,13 +5009,15 @@ size_t upb_MtDecoder_SizeOfRep(upb_FieldRep rep, size_t upb_MtDecoder_AlignOfRep(upb_FieldRep rep, upb_MiniTablePlatform platform) { static const uint8_t kRepToAlign32[] = { - [kUpb_FieldRep_1Byte] = 1, [kUpb_FieldRep_4Byte] = 4, - [kUpb_FieldRep_Pointer] = 4, [kUpb_FieldRep_StringView] = 4, + [kUpb_FieldRep_1Byte] = 1, + [kUpb_FieldRep_4Byte] = 4, + [kUpb_FieldRep_StringView] = 4, [kUpb_FieldRep_8Byte] = 8, }; static const uint8_t kRepToAlign64[] = { - [kUpb_FieldRep_1Byte] = 1, [kUpb_FieldRep_4Byte] = 4, - [kUpb_FieldRep_Pointer] = 8, [kUpb_FieldRep_StringView] = 8, + [kUpb_FieldRep_1Byte] = 1, + [kUpb_FieldRep_4Byte] = 4, + [kUpb_FieldRep_StringView] = 8, [kUpb_FieldRep_8Byte] = 8, }; UPB_ASSERT(UPB_ALIGN_OF(upb_StringView) == @@ -5043,7 +5110,9 @@ static const char* upb_MtDecoder_ParseModifier(upb_MtDecoder* d, static void upb_MtDecoder_AllocateSubs(upb_MtDecoder* d, uint32_t sub_count) { size_t subs_bytes = sizeof(*d->table->subs) * sub_count; - d->table->subs = upb_Arena_Malloc(d->arena, subs_bytes); + void* subs = upb_Arena_Malloc(d->arena, subs_bytes); + memset(subs, 0, subs_bytes); + d->table->subs = subs; upb_MtDecoder_CheckOutOfMemory(d, d->table->subs); } @@ -5095,6 +5164,9 @@ static const char* upb_MtDecoder_Parse(upb_MtDecoder* d, const char* ptr, kUpb_EncodedValue_MaxSkip, &skip); last_field_number += skip; last_field_number--; // Next field seen will increment. + } else { + upb_MtDecoder_ErrorFormat(d, "Invalid char: %c", ch); + UPB_UNREACHABLE(); } } @@ -5281,6 +5353,16 @@ upb_MiniTable* upb_MiniTable_BuildWithBuf(const char* data, size_t len, goto done; } + // If the string is non-empty then it must begin with a version tag. + if (len) { + if (*data != kUpb_EncodedVersion_MessageV1) { + upb_MtDecoder_ErrorFormat(&decoder, "Invalid message version: %c", *data); + UPB_UNREACHABLE(); + } + data++; + len--; + } + upb_MtDecoder_CheckOutOfMemory(&decoder, decoder.table); decoder.table->size = 0; @@ -5325,9 +5407,12 @@ upb_MiniTable* upb_MiniTable_BuildMapEntry(upb_FieldType key_type, if (!ret || !fields) return NULL; upb_MiniTable_Sub* subs = NULL; - if (value_is_proto3_enum) value_type = kUpb_FieldType_Int32; - if (value_type == kUpb_FieldType_Message || - value_type == kUpb_FieldType_Group || value_type == kUpb_FieldType_Enum) { + if (value_is_proto3_enum) { + UPB_ASSERT(value_type == kUpb_FieldType_Enum); + // No sub needed. + } else if (value_type == kUpb_FieldType_Message || + value_type == kUpb_FieldType_Group || + value_type == kUpb_FieldType_Enum) { subs = upb_Arena_Malloc(arena, sizeof(*subs)); if (!subs) return NULL; } @@ -5344,8 +5429,9 @@ upb_MiniTable* upb_MiniTable_BuildMapEntry(upb_FieldType key_type, fields[0].offset = 0; fields[1].offset = field_size; - upb_MiniTable_SetTypeAndSub(&fields[0], key_type, NULL, 0); - upb_MiniTable_SetTypeAndSub(&fields[1], value_type, NULL, 0); + upb_MiniTable_SetTypeAndSub(&fields[0], key_type, NULL, 0, false); + upb_MiniTable_SetTypeAndSub(&fields[1], value_type, NULL, 0, + value_is_proto3_enum); ret->size = UPB_ALIGN_UP(2 * field_size, 8); ret->field_count = 2; @@ -5397,7 +5483,7 @@ static void upb_MiniTable_BuildEnumValue(upb_MtDecoder* d, uint32_t val) { upb_MiniTable_Enum* upb_MiniTable_BuildEnum(const char* data, size_t len, upb_Arena* arena, upb_Status* status) { - upb_MtDecoder d = { + upb_MtDecoder decoder = { .enum_table = upb_Arena_Malloc(arena, upb_MiniTable_EnumSize(2)), .enum_value_count = 0, .enum_data_count = 0, @@ -5407,33 +5493,41 @@ upb_MiniTable_Enum* upb_MiniTable_BuildEnum(const char* data, size_t len, .arena = arena, }; - if (UPB_SETJMP(d.err)) { - return NULL; + if (UPB_SETJMP(decoder.err)) return NULL; + + // If the string is non-empty then it must begin with a version tag. + if (len) { + if (*data != kUpb_EncodedVersion_EnumV1) { + upb_MtDecoder_ErrorFormat(&decoder, "Invalid enum version: %c", *data); + UPB_UNREACHABLE(); + } + data++; + len--; } - upb_MtDecoder_CheckOutOfMemory(&d, d.enum_table); + upb_MtDecoder_CheckOutOfMemory(&decoder, decoder.enum_table); // Guarantee at least 64 bits of mask without checking mask size. - d.enum_table->mask_limit = 64; - d.enum_table = _upb_MiniTable_AddEnumDataMember(&d, 0); - d.enum_table = _upb_MiniTable_AddEnumDataMember(&d, 0); + decoder.enum_table->mask_limit = 64; + decoder.enum_table = _upb_MiniTable_AddEnumDataMember(&decoder, 0); + decoder.enum_table = _upb_MiniTable_AddEnumDataMember(&decoder, 0); - d.enum_table->value_count = 0; + decoder.enum_table->value_count = 0; const char* ptr = data; uint32_t base = 0; - while (ptr < d.end) { + while (ptr < decoder.end) { char ch = *ptr++; if (ch <= kUpb_EncodedValue_MaxEnumMask) { uint32_t mask = upb_FromBase92(ch); for (int i = 0; i < 5; i++, base++, mask >>= 1) { - if (mask & 1) upb_MiniTable_BuildEnumValue(&d, base); + if (mask & 1) upb_MiniTable_BuildEnumValue(&decoder, base); } } else if (kUpb_EncodedValue_MinSkip <= ch && ch <= kUpb_EncodedValue_MaxSkip) { uint32_t skip; - ptr = upb_MiniTable_DecodeBase92Varint(&d, ptr, ch, + ptr = upb_MiniTable_DecodeBase92Varint(&decoder, ptr, ch, kUpb_EncodedValue_MinSkip, kUpb_EncodedValue_MaxSkip, &skip); base += skip; @@ -5443,7 +5537,7 @@ upb_MiniTable_Enum* upb_MiniTable_BuildEnum(const char* data, size_t len, } } - return d.enum_table; + return decoder.enum_table; } const char* upb_MiniTable_BuildExtension(const char* data, size_t len, @@ -5457,8 +5551,16 @@ const char* upb_MiniTable_BuildExtension(const char* data, size_t len, .table = NULL, }; - if (UPB_SETJMP(decoder.err)) { - return NULL; + if (UPB_SETJMP(decoder.err)) return NULL; + + // If the string is non-empty then it must begin with a version tag. + if (len) { + if (*data != kUpb_EncodedVersion_ExtensionV1) { + upb_MtDecoder_ErrorFormat(&decoder, "Invalid ext version: %c", *data); + UPB_UNREACHABLE(); + } + data++; + len--; } uint16_t count = 0; @@ -5504,8 +5606,7 @@ void upb_MiniTable_SetSubMessage(upb_MiniTable* table, (uintptr_t)field < (uintptr_t)(table->fields + table->field_count)); if (sub->ext & kUpb_ExtMode_IsMapEntry) { - field->mode = - (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift) | kUpb_FieldMode_Map; + field->mode = (field->mode & ~kUpb_FieldMode_Mask) | kUpb_FieldMode_Map; } upb_MiniTable_Sub* table_sub = (void*)&table->subs[field->submsg_index]; table_sub->submsg = sub; @@ -5520,7 +5621,6 @@ void upb_MiniTable_SetSubEnum(upb_MiniTable* table, upb_MiniTable_Field* field, table_sub->subenum = sub; } - #include @@ -5830,7 +5930,6 @@ void _upb_DefBuilder_CheckIdentSlow(upb_DefBuilder* ctx, upb_StringView name, } - // Must be last. struct upb_DefPool { @@ -6195,7 +6294,7 @@ size_t _upb_DefPool_BytesLoaded(const upb_DefPool* s) { upb_Arena* _upb_DefPool_Arena(const upb_DefPool* s) { return s->arena; } -const upb_FieldDef* _upb_DefPool_FindExtensionByMiniTable( +const upb_FieldDef* upb_DefPool_FindExtensionByMiniTable( const upb_DefPool* s, const upb_MiniTable_Extension* ext) { upb_value v; bool ok = upb_inttable_lookup(&s->exts, (uintptr_t)ext, &v); @@ -6206,9 +6305,10 @@ const upb_FieldDef* _upb_DefPool_FindExtensionByMiniTable( const upb_FieldDef* upb_DefPool_FindExtensionByNumber(const upb_DefPool* s, const upb_MessageDef* m, int32_t fieldnum) { - const upb_MiniTable* l = upb_MessageDef_MiniTable(m); - const upb_MiniTable_Extension* ext = _upb_extreg_get(s->extreg, l, fieldnum); - return ext ? _upb_DefPool_FindExtensionByMiniTable(s, ext) : NULL; + const upb_MiniTable* t = upb_MessageDef_MiniTable(m); + const upb_MiniTable_Extension* ext = + upb_ExtensionRegistry_Lookup(s->extreg, t, fieldnum); + return ext ? upb_DefPool_FindExtensionByMiniTable(s, ext) : NULL; } const upb_ExtensionRegistry* upb_DefPool_ExtensionRegistry( @@ -6292,7 +6392,6 @@ bool _upb_DescState_Grow(upb_DescState* d, upb_Arena* a) { return true; } - #include @@ -6401,6 +6500,11 @@ const upb_EnumValueDef* upb_EnumDef_Value(const upb_EnumDef* e, int i) { return _upb_EnumValueDef_At(e->values, i); } +bool upb_EnumDef_IsClosed(const upb_EnumDef* e) { + if (UPB_TREAT_PROTO2_ENUMS_LIKE_PROTO3) return false; + return upb_FileDef_Syntax(e->file) == kUpb_Syntax_Proto2; +} + bool upb_EnumDef_MiniDescriptorEncode(const upb_EnumDef* e, upb_Arena* a, upb_StringView* out) { upb_DescState s; @@ -6412,7 +6516,8 @@ bool upb_EnumDef_MiniDescriptorEncode(const upb_EnumDef* e, upb_Arena* a, if (!sorted) return false; } - upb_MtDataEncoder_StartEnum(&s.e); + if (!_upb_DescState_Grow(&s, a)) return false; + s.ptr = upb_MtDataEncoder_StartEnum(&s.e, s.ptr); // Duplicate values are allowed but we only encode each value once. uint32_t previous = 0; @@ -6488,7 +6593,7 @@ static void create_enumdef(upb_DefBuilder* ctx, const char* prefix, e->full_name); } - UBP_DEF_SET_OPTIONS(e->opts, EnumDescriptorProto, EnumOptions, enum_proto); + UPB_DEF_SET_OPTIONS(e->opts, EnumDescriptorProto, EnumOptions, enum_proto); upb_inttable_compact(&e->iton, ctx->arena); @@ -6523,7 +6628,6 @@ upb_EnumDef* _upb_EnumDefs_New(upb_DefBuilder* ctx, int n, } - // Must be last. struct upb_EnumValueDef { @@ -6597,7 +6701,7 @@ static void create_enumvaldef(upb_DefBuilder* ctx, const char* prefix, _upb_DefBuilder_Add(ctx, v->full_name, _upb_DefType_Pack(v, UPB_DEFTYPE_ENUMVAL)); - UBP_DEF_SET_OPTIONS(v->opts, EnumValueDescriptorProto, EnumValueOptions, + UPB_DEF_SET_OPTIONS(v->opts, EnumValueDescriptorProto, EnumValueOptions, val_proto); bool ok = _upb_EnumDef_Insert(e, v, ctx->arena); @@ -6635,7 +6739,6 @@ upb_EnumValueDef* _upb_EnumValueDefs_New( } - // Must be last. struct upb_ExtensionRange { @@ -6690,14 +6793,13 @@ upb_ExtensionRange* _upb_ExtensionRanges_New( r[i].start = start; r[i].end = end; - UBP_DEF_SET_OPTIONS(r[i].opts, DescriptorProto_ExtensionRange, + UPB_DEF_SET_OPTIONS(r[i].opts, DescriptorProto_ExtensionRange, ExtensionRangeOptions, protos[i]); } return r; } - #include #include @@ -6909,13 +7011,6 @@ bool _upb_FieldDef_IsClosedEnum(const upb_FieldDef* f) { if (UPB_TREAT_PROTO2_ENUMS_LIKE_PROTO3) return false; if (f->type_ != kUpb_FieldType_Enum) return false; - // TODO(https://github.com/protocolbuffers/upb/issues/541): - // fix map enum values to check for unknown enum values and put - // them in the unknown field set. - if (upb_MessageDef_IsMapEntry(upb_FieldDef_ContainingType(f))) { - return false; - } - // TODO: Maybe make is_proto2 a bool at creation? const upb_FileDef* file = upb_EnumDef_File(f->sub.enumdef); return upb_FileDef_Syntax(file) == kUpb_Syntax_Proto2; @@ -7309,7 +7404,7 @@ static void _upb_FieldDef_Create(upb_DefBuilder* ctx, const char* prefix, if (!ok) _upb_DefBuilder_OomErr(ctx); } - UBP_DEF_SET_OPTIONS(f->opts, FieldDescriptorProto, FieldOptions, field_proto); + UPB_DEF_SET_OPTIONS(f->opts, FieldDescriptorProto, FieldOptions, field_proto); if (google_protobuf_FieldOptions_has_packed(f->opts)) { f->is_packed_ = google_protobuf_FieldOptions_packed(f->opts); @@ -7485,16 +7580,12 @@ bool upb_FieldDef_MiniDescriptorEncode(const upb_FieldDef* f, upb_Arena* a, upb_DescState s; _upb_DescState_Init(&s); - if (!_upb_DescState_Grow(&s, a)) return false; - s.ptr = upb_MtDataEncoder_StartMessage(&s.e, s.ptr, 0); - const int number = upb_FieldDef_Number(f); const uint64_t modifiers = _upb_FieldDef_Modifiers(f); if (!_upb_DescState_Grow(&s, a)) return false; - s.ptr = upb_MtDataEncoder_PutField(&s.e, s.ptr, f->type_, number, modifiers); - - if (!_upb_DescState_Grow(&s, a)) return false; + s.ptr = upb_MtDataEncoder_EncodeExtension(&s.e, s.ptr, f->type_, number, + modifiers); *s.ptr = '\0'; out->data = s.buf; @@ -7533,21 +7624,16 @@ static void resolve_extension(upb_DefBuilder* ctx, const char* prefix, } upb_MiniTable_Extension* mut_ext = (upb_MiniTable_Extension*)ext; - upb_MiniTable_Sub sub; - sub.submsg = NULL; - sub.subenum = NULL; + upb_MiniTable_Sub sub = {NULL}; + if (upb_FieldDef_IsSubMessage(f)) { + sub.submsg = upb_MessageDef_MiniTable(f->sub.msgdef); + } else if (_upb_FieldDef_IsClosedEnum(f)) { + sub.subenum = _upb_EnumDef_MiniTable(f->sub.enumdef); + } bool ok2 = upb_MiniTable_BuildExtension(desc.data, desc.size, mut_ext, upb_MessageDef_MiniTable(m), sub, ctx->status); if (!ok2) _upb_DefBuilder_Errf(ctx, "Could not build extension mini table"); - - assert(mut_ext->field.number == f->number_); - mut_ext->extendee = upb_MessageDef_MiniTable(m); - if (upb_FieldDef_IsSubMessage(f)) { - mut_ext->sub.submsg = upb_MessageDef_MiniTable(f->sub.msgdef); - } else if (mut_ext->field.descriptortype == kUpb_FieldType_Enum) { - mut_ext->sub.subenum = _upb_EnumDef_MiniTable(f->sub.enumdef); - } } bool ok = _upb_DefPool_InsertExt(ctx->symtab, ext, f); @@ -7596,7 +7682,6 @@ void _upb_FieldDef_Resolve(upb_DefBuilder* ctx, const char* prefix, } - // Must be last. struct upb_FileDef { @@ -7816,7 +7901,7 @@ void _upb_FileDef_Create(upb_DefBuilder* ctx, } // Read options. - UBP_DEF_SET_OPTIONS(file->opts, FileDescriptorProto, FileOptions, file_proto); + UPB_DEF_SET_OPTIONS(file->opts, FileDescriptorProto, FileOptions, file_proto); // Verify dependencies. strs = google_protobuf_FileDescriptorProto_dependency(file_proto, &n); @@ -7901,8 +7986,8 @@ void _upb_FileDef_Create(upb_DefBuilder* ctx, } if (file->ext_count) { - bool ok = _upb_extreg_add(_upb_DefPool_ExtReg(ctx->symtab), - file->ext_layouts, file->ext_count); + bool ok = upb_ExtensionRegistry_AddArray( + _upb_DefPool_ExtReg(ctx->symtab), file->ext_layouts, file->ext_count); if (!ok) _upb_DefBuilder_OomErr(ctx); } } @@ -7938,10 +8023,6 @@ static size_t get_field_size(const upb_MiniTable_Field* f) { return upb_IsRepeatedOrMap(f) ? sizeof(void*) : sizes[f->descriptortype]; } -upb_Message* upb_Message_New(const upb_MessageDef* m, upb_Arena* a) { - return _upb_Message_New(upb_MessageDef_MiniTable(m), a); -} - static bool in_oneof(const upb_MiniTable_Field* field) { return field->presence < 0; } @@ -8036,7 +8117,8 @@ make: ret.array = upb_Array_New(a, upb_FieldDef_CType(f)); } else { UPB_ASSERT(upb_FieldDef_IsSubMessage(f)); - ret.msg = upb_Message_New(upb_FieldDef_MessageSubDef(f), a); + const upb_MessageDef* m = upb_FieldDef_MessageSubDef(f); + ret.msg = upb_Message_New(upb_MessageDef_MiniTable(m), a); } val.array_val = ret.array; @@ -8142,7 +8224,7 @@ bool upb_Message_Next(const upb_Message* msg, const upb_MessageDef* m, if (i - n < count) { ext += count - 1 - (i - n); memcpy(out_val, &ext->data, sizeof(*out_val)); - *out_f = _upb_DefPool_FindExtensionByMiniTable(ext_pool, ext->ext); + *out_f = upb_DefPool_FindExtensionByMiniTable(ext_pool, ext->ext); *iter = i; return true; } @@ -8208,7 +8290,6 @@ bool upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m, } - // Must be last. struct upb_MessageDef { @@ -8536,6 +8617,15 @@ void _upb_MessageDef_Resolve(upb_DefBuilder* ctx, upb_MessageDef* m) { if (!m->layout) _upb_DefBuilder_OomErr(ctx); } +#ifndef NDEBUG + for (int i = 0; i < m->field_count; i++) { + const upb_FieldDef* f = upb_MessageDef_Field(m, i); + const upb_MiniTable_Field* mt_f = + &m->layout->fields[_upb_FieldDef_LayoutIndex(f)]; + UPB_ASSERT(upb_FieldDef_Type(f) == upb_MiniTableField_Type(mt_f)); + } +#endif + m->in_message_set = false; for (int i = 0; i < upb_MessageDef_NestedExtensionCount(m); i++) { upb_FieldDef* ext = (upb_FieldDef*)upb_MessageDef_NestedExtension(m, i); @@ -8729,7 +8819,7 @@ static void create_msgdef(upb_DefBuilder* ctx, const char* prefix, ctx, sizeof(*m->layout) + sizeof(_upb_FastTable_Entry)); } - UBP_DEF_SET_OPTIONS(m->opts, DescriptorProto, MessageOptions, msg_proto); + UPB_DEF_SET_OPTIONS(m->opts, DescriptorProto, MessageOptions, msg_proto); m->oneof_count = n_oneof; m->oneofs = _upb_OneofDefs_New(ctx, n_oneof, oneofs, m); @@ -8780,7 +8870,6 @@ upb_MessageDef* _upb_MessageDefs_New( } - // Must be last. struct upb_MethodDef { @@ -8855,7 +8944,7 @@ static void create_method(upb_DefBuilder* ctx, ctx, m->full_name, m->full_name, google_protobuf_MethodDescriptorProto_output_type(method_proto), UPB_DEFTYPE_MSG); - UBP_DEF_SET_OPTIONS(m->opts, MethodDescriptorProto, MethodOptions, + UPB_DEF_SET_OPTIONS(m->opts, MethodDescriptorProto, MethodOptions, method_proto); } @@ -8871,7 +8960,6 @@ upb_MethodDef* _upb_MethodDefs_New( return m; } - #include #include #include @@ -9014,7 +9102,7 @@ static void create_oneofdef(upb_DefBuilder* ctx, upb_MessageDef* m, o->field_count = 0; o->synthetic = false; - UBP_DEF_SET_OPTIONS(o->opts, OneofDescriptorProto, OneofOptions, oneof_proto); + UPB_DEF_SET_OPTIONS(o->opts, OneofDescriptorProto, OneofOptions, oneof_proto); if (upb_MessageDef_FindByNameWithSize(m, name.data, name.size, NULL, NULL)) { _upb_DefBuilder_Errf(ctx, "duplicate oneof name (%s)", o->full_name); @@ -9045,7 +9133,6 @@ upb_OneofDef* _upb_OneofDefs_New( } - // Must be last. struct upb_ServiceDef { @@ -9124,7 +9211,7 @@ static void create_service(upb_DefBuilder* ctx, s->method_count = n; s->methods = _upb_MethodDefs_New(ctx, n, methods, s); - UBP_DEF_SET_OPTIONS(s->opts, ServiceDescriptorProto, ServiceOptions, + UPB_DEF_SET_OPTIONS(s->opts, ServiceDescriptorProto, ServiceOptions, svc_proto); } @@ -10594,7 +10681,8 @@ static upb_Message* _upb_Decoder_NewSubMessage( upb_Decoder* d, const upb_MiniTable_Sub* subs, const upb_MiniTable_Field* field) { const upb_MiniTable* subl = subs[field->submsg_index].submsg; - upb_Message* msg = _upb_Message_New_inl(subl, &d->arena); + UPB_ASSERT(subl); + upb_Message* msg = _upb_Message_New(subl, &d->arena); if (!msg) _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); return msg; } @@ -10645,6 +10733,7 @@ static const char* _upb_Decoder_DecodeSubMessage( const upb_MiniTable_Sub* subs, const upb_MiniTable_Field* field, int size) { int saved_delta = _upb_Decoder_PushLimit(d, ptr, size); const upb_MiniTable* subl = subs[field->submsg_index].submsg; + UPB_ASSERT(subl); ptr = _upb_Decoder_RecurseSubMessage(d, ptr, submsg, subl, DECODE_NOGROUP); _upb_Decoder_PopLimit(d, ptr, saved_delta); return ptr; @@ -10675,6 +10764,7 @@ static const char* _upb_Decoder_DecodeKnownGroup( upb_Decoder* d, const char* ptr, upb_Message* submsg, const upb_MiniTable_Sub* subs, const upb_MiniTable_Field* field) { const upb_MiniTable* subl = subs[field->submsg_index].submsg; + UPB_ASSERT(subl); return _upb_Decoder_DecodeGroup(d, ptr, submsg, subl, field->number); } @@ -11179,11 +11269,11 @@ static void upb_Decoder_AddUnknownMessageSetItem(upb_Decoder* d, } static void upb_Decoder_AddMessageSetItem(upb_Decoder* d, upb_Message* msg, - const upb_MiniTable* layout, + const upb_MiniTable* t, uint32_t type_id, const char* data, uint32_t size) { const upb_MiniTable_Extension* item_mt = - _upb_extreg_get(d->extreg, layout, type_id); + upb_ExtensionRegistry_Lookup(d->extreg, t, type_id); if (item_mt) { upb_Decoder_AddKnownMessageSetItem(d, msg, item_mt, data, size); } else { @@ -11245,40 +11335,40 @@ static const char* upb_Decoder_DecodeMessageSetItem( } static const upb_MiniTable_Field* _upb_Decoder_FindField( - upb_Decoder* d, const upb_MiniTable* l, uint32_t field_number, + upb_Decoder* d, const upb_MiniTable* t, uint32_t field_number, int* last_field_index) { static upb_MiniTable_Field none = { 0, 0, 0, 0, kUpb_FakeFieldType_FieldNotFound, 0}; - if (l == NULL) return &none; + if (t == NULL) return &none; size_t idx = ((size_t)field_number) - 1; // 0 wraps to SIZE_MAX - if (idx < l->dense_below) { + if (idx < t->dense_below) { /* Fastest case: index into dense fields. */ goto found; } - if (l->dense_below < l->field_count) { + if (t->dense_below < t->field_count) { /* Linear search non-dense fields. Resume scanning from last_field_index * since fields are usually in order. */ int last = *last_field_index; - for (idx = last; idx < l->field_count; idx++) { - if (l->fields[idx].number == field_number) { + for (idx = last; idx < t->field_count; idx++) { + if (t->fields[idx].number == field_number) { goto found; } } - for (idx = l->dense_below; idx < last; idx++) { - if (l->fields[idx].number == field_number) { + for (idx = t->dense_below; idx < last; idx++) { + if (t->fields[idx].number == field_number) { goto found; } } } if (d->extreg) { - switch (l->ext) { + switch (t->ext) { case kUpb_ExtMode_Extendable: { const upb_MiniTable_Extension* ext = - _upb_extreg_get(d->extreg, l, field_number); + upb_ExtensionRegistry_Lookup(d->extreg, t, field_number); if (ext) return &ext->field; break; } @@ -11295,9 +11385,9 @@ static const upb_MiniTable_Field* _upb_Decoder_FindField( return &none; /* Unknown field. */ found: - UPB_ASSERT(l->fields[idx].number == field_number); + UPB_ASSERT(t->fields[idx].number == field_number); *last_field_index = idx; - return &l->fields[idx]; + return &t->fields[idx]; } int _upb_Decoder_GetVarintOp(const upb_MiniTable_Field* field) { @@ -12098,17 +12188,11 @@ static bool encode_shouldencode(upb_encstate* e, const upb_Message* msg, memcpy(&ch, mem, 1); return ch != 0; } -#if UINTPTR_MAX == 0xffffffff - case kUpb_FieldRep_Pointer: -#endif case kUpb_FieldRep_4Byte: { uint32_t u32; memcpy(&u32, mem, 4); return u32 != 0; } -#if UINTPTR_MAX != 0xffffffff - case kUpb_FieldRep_Pointer: -#endif case kUpb_FieldRep_8Byte: { uint64_t u64; memcpy(&u64, mem, 8); @@ -12383,8 +12467,9 @@ static const upb_Message_Internal* upb_Message_Getinternal_const( return (upb_Message_Internal*)((char*)msg - size); } -upb_Message* _upb_Message_New(const upb_MiniTable* l, upb_Arena* a) { - return _upb_Message_New_inl(l, a); +upb_Message* upb_Message_New(const upb_MiniTable* mini_table, + upb_Arena* arena) { + return _upb_Message_New(mini_table, arena); } void _upb_Message_Clear(upb_Message* msg, const upb_MiniTable* l) { @@ -12451,6 +12536,24 @@ const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len) { } } +void upb_Message_DeleteUnknown(upb_Message* msg, const char* data, size_t len) { + upb_Message_Internal* in = upb_Message_Getinternal(msg); + const char* internal_unknown_end = + UPB_PTR_AT(in->internal, in->internal->unknown_end, char); +#ifndef NDEBUG + size_t full_unknown_size; + const char* full_unknown = upb_Message_GetUnknown(msg, &full_unknown_size); + UPB_ASSERT((uintptr_t)data >= (uintptr_t)full_unknown); + UPB_ASSERT((uintptr_t)data < (uintptr_t)(full_unknown + full_unknown_size)); + UPB_ASSERT((uintptr_t)(data + len) > (uintptr_t)data); + UPB_ASSERT((uintptr_t)(data + len) <= (uintptr_t)internal_unknown_end); +#endif + if ((data + len) != internal_unknown_end) { + memmove((char*)data, data + len, internal_unknown_end - data - len); + } + in->internal->unknown_end -= len; +} + const upb_Message_Extension* _upb_Message_Getexts(const upb_Message* msg, size_t* count) { const upb_Message_Internal* in = upb_Message_Getinternal_const(msg); diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h index bb71990a92..b9572d3ddf 100755 --- a/ruby/ext/google/protobuf_c/ruby-upb.h +++ b/ruby/ext/google/protobuf_c/ruby-upb.h @@ -26,9 +26,9 @@ */ #if !((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) || \ + (defined(__cplusplus) && __cplusplus >= 201402L) || \ (defined(_MSC_VER) && _MSC_VER >= 1900)) -#error upb requires C99 or C++11 or MSVC >= 2015. +#error upb requires C99 or C++14 or MSVC >= 2015. #endif // Portable check for GCC minimum version: @@ -516,6 +516,9 @@ typedef void upb_Message; * upb_MessageDef_MiniTable() but users cannot access any of the members. */ typedef struct upb_MiniTable upb_MiniTable; +/* Creates a new message with the given mini_table on the given arena. */ +upb_Message* upb_Message_New(const upb_MiniTable* mini_table, upb_Arena* arena); + /* Adds unknown data (serialized protobuf data) to the given message. The data * is copied into the message instance. */ void upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len, @@ -524,6 +527,9 @@ void upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len, /* Returns a reference to the message's unknown data. */ const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len); +/* Removes partial unknown data from message. */ +void upb_Message_DeleteUnknown(upb_Message* msg, const char* data, size_t len); + /* Returns the number of extensions present in this message. */ size_t upb_Message_ExtensionCount(const upb_Message* msg); @@ -1172,28 +1178,23 @@ extern "C" { */ typedef struct upb_ExtensionRegistry upb_ExtensionRegistry; +typedef struct upb_MiniTable_Extension upb_MiniTable_Extension; // Creates a upb_ExtensionRegistry in the given arena. // The arena must outlive any use of the extreg. upb_ExtensionRegistry* upb_ExtensionRegistry_New(upb_Arena* arena); -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -typedef struct upb_MiniTable upb_MiniTable; -typedef struct upb_MiniTable_Extension upb_MiniTable_Extension; - -// Adds the given extension info for message type |l| and field number |num| -// into the registry. Returns false if this message type and field number were -// already in the map, or if memory allocation fails. -bool _upb_extreg_add(upb_ExtensionRegistry* r, - const upb_MiniTable_Extension** e, size_t count); +// Adds the given extension info for the array |e| of size |count| into the +// registry. If there are any errors, the entire array is backed out. +// The extensions must outlive the registry. +bool upb_ExtensionRegistry_AddArray(upb_ExtensionRegistry* r, + const upb_MiniTable_Extension** e, + size_t count); -// Looks up the extension (if any) defined for message type |l| and field -// number |num|. If an extension was found, copies the field info into |*ext| -// and returns true. Otherwise returns false. -const upb_MiniTable_Extension* _upb_extreg_get(const upb_ExtensionRegistry* r, - const upb_MiniTable* l, - uint32_t num); +// Looks up the extension (if any) defined for message type |t| and field +// number |num|. Returns the extension if found, otherwise NULL. +const upb_MiniTable_Extension* upb_ExtensionRegistry_Lookup( + const upb_ExtensionRegistry* r, const upb_MiniTable* t, uint32_t num); #ifdef __cplusplus } /* extern "C" */ @@ -1609,6 +1610,12 @@ typedef enum { typedef enum { kUpb_LabelFlags_IsPacked = 4, kUpb_LabelFlags_IsExtension = 8, + // Indicates that this descriptor type is an "alternate type": + // - for Int32, this indicates that the actual type is Enum (but was + // rewritten to Int32 because it is an open enum that requires no check). + // - for Bytes, this indicates that the actual type is String (but does + // not require any UTF-8 check). + kUpb_LabelFlags_IsAlternate = 16, } upb_LabelFlags; // Note: we sort by this number when calculating layout order. @@ -1616,10 +1623,9 @@ typedef enum { kUpb_FieldRep_1Byte = 0, kUpb_FieldRep_4Byte = 1, kUpb_FieldRep_StringView = 2, - kUpb_FieldRep_Pointer = 3, - kUpb_FieldRep_8Byte = 4, + kUpb_FieldRep_8Byte = 3, - kUpb_FieldRep_Shift = 5, // Bit offset of the rep in upb_MiniTable_Field.mode + kUpb_FieldRep_Shift = 6, // Bit offset of the rep in upb_MiniTable_Field.mode kUpb_FieldRep_Max = kUpb_FieldRep_8Byte, } upb_FieldRep; @@ -1739,8 +1745,6 @@ struct upb_MiniTable { _upb_FastTable_Entry fasttable[]; }; -typedef struct upb_MiniTable_Extension upb_MiniTable_Extension; - struct upb_MiniTable_Extension { upb_MiniTable_Field field; const upb_MiniTable* extendee; @@ -1811,20 +1815,17 @@ UPB_INLINE size_t upb_msg_sizeof(const upb_MiniTable* l) { return l->size + sizeof(upb_Message_Internal); } -UPB_INLINE upb_Message* _upb_Message_New_inl(const upb_MiniTable* l, - upb_Arena* a) { - size_t size = upb_msg_sizeof(l); - void* mem = upb_Arena_Malloc(a, size + sizeof(upb_Message_Internal)); - upb_Message* msg; +/* Inline version upb_Message_New(), for internal use */ +UPB_INLINE upb_Message* _upb_Message_New(const upb_MiniTable* mini_table, + upb_Arena* arena) { + size_t size = upb_msg_sizeof(mini_table); + void* mem = upb_Arena_Malloc(arena, size + sizeof(upb_Message_Internal)); if (UPB_UNLIKELY(!mem)) return NULL; - msg = UPB_PTR_AT(mem, sizeof(upb_Message_Internal), upb_Message); + upb_Message* msg = UPB_PTR_AT(mem, sizeof(upb_Message_Internal), upb_Message); memset(mem, 0, size); return msg; } -/* Creates a new messages with the given layout on the given arena. */ -upb_Message* _upb_Message_New(const upb_MiniTable* l, upb_Arena* a); - UPB_INLINE upb_Message_Internal* upb_Message_Getinternal(upb_Message* msg) { ptrdiff_t size = sizeof(upb_Message_Internal); return (upb_Message_Internal*)((char*)msg - size); @@ -1879,9 +1880,6 @@ const upb_Message_Extension* _upb_Message_Getext( void _upb_Message_Clearext(upb_Message* msg, const upb_MiniTable_Extension* ext); -void _upb_Message_Clearext(upb_Message* msg, - const upb_MiniTable_Extension* ext); - /** Hasbit access *************************************************************/ UPB_INLINE bool _upb_hasbit(const upb_Message* msg, size_t idx) { @@ -2659,95 +2657,95 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protob return _upb_hasbit(msg, 1); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_name(const google_protobuf_FileDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(40, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 1); } UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(40, 8), upb_StringView); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto* msg) { return _upb_hasbit(msg, 2); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_package(const google_protobuf_FileDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(48, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 2); } UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(48, 24), upb_StringView); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_dependency(const google_protobuf_FileDescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(20, 40)); + _upb_array_detach(msg, UPB_SIZE(4, 40)); } UPB_INLINE upb_StringView const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); + return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(4, 40), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_message_type(const google_protobuf_FileDescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 48)); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_message_type(const google_protobuf_FileDescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(24, 48)); + _upb_array_detach(msg, UPB_SIZE(8, 48)); } UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); + return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(8, 48), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_enum_type(const google_protobuf_FileDescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 56)); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_enum_type(const google_protobuf_FileDescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(28, 56)); + _upb_array_detach(msg, UPB_SIZE(12, 56)); } UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); + return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 56), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_protobuf_FileDescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 64)); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_service(const google_protobuf_FileDescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(32, 64)); + _upb_array_detach(msg, UPB_SIZE(16, 64)); } UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); + return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 64), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_protobuf_FileDescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 72)); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_extension(const google_protobuf_FileDescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(36, 72)); + _upb_array_detach(msg, UPB_SIZE(20, 72)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); + return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 72), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto* msg) { return _upb_hasbit(msg, 3); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_options(const google_protobuf_FileDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(40, 80), const upb_Message*) = NULL; + *UPB_PTR_AT(msg, UPB_SIZE(24, 80), const upb_Message*) = NULL; _upb_clearhas(msg, 3); } UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(40, 80), const google_protobuf_FileOptions*); + return *UPB_PTR_AT(msg, UPB_SIZE(24, 80), const google_protobuf_FileOptions*); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto* msg) { return _upb_hasbit(msg, 4); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_source_code_info(const google_protobuf_FileDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(44, 88), const upb_Message*) = NULL; + *UPB_PTR_AT(msg, UPB_SIZE(28, 88), const upb_Message*) = NULL; _upb_clearhas(msg, 4); } UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(44, 88), const google_protobuf_SourceCodeInfo*); + return *UPB_PTR_AT(msg, UPB_SIZE(28, 88), const google_protobuf_SourceCodeInfo*); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_public_dependency(const google_protobuf_FileDescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(48, 96)); + _upb_array_detach(msg, UPB_SIZE(32, 96)); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); + return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(32, 96), len); } UPB_INLINE void google_protobuf_FileDescriptorProto_clear_weak_dependency(const google_protobuf_FileDescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(52, 104)); + _upb_array_detach(msg, UPB_SIZE(36, 104)); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 104), len); + return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(36, 104), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto* msg) { return _upb_hasbit(msg, 5); @@ -2772,72 +2770,72 @@ UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_edition(const goog UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 8), upb_StringView) = value; } UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 24), upb_StringView) = value; } UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); + return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 40), len); } UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { - return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(3, 4), arena); + return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 40), len, UPB_SIZE(3, 4), arena); } UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto* msg, upb_StringView val, upb_Arena* arena) { - return _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 40), UPB_SIZE(3, 4), &val, arena); + return _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 40), UPB_SIZE(3, 4), &val, arena); } UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_mutable_message_type(google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); + return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 48), len); } UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_DescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_DescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 48), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescriptorProto_add_message_type(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google_protobuf_DescriptorProto_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(8, 48), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_mutable_enum_type(google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); + return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 56), len); } UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_EnumDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_EnumDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 56), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescriptorProto_add_enum_type(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 56), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_mutable_service(google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (google_protobuf_ServiceDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); + return (google_protobuf_ServiceDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 64), len); } UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_ServiceDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_ServiceDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 64), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google_protobuf_ServiceDescriptorProto_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(32, 64), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 64), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_mutable_extension(google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); + return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 72), len); } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 72), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google_protobuf_FieldDescriptorProto_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(36, 72), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 72), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) { _upb_sethas(msg, 3); - *UPB_PTR_AT(msg, UPB_SIZE(40, 80), google_protobuf_FileOptions*) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 80), google_protobuf_FileOptions*) = value; } UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); @@ -2850,7 +2848,7 @@ UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorPro } UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) { _upb_sethas(msg, 4); - *UPB_PTR_AT(msg, UPB_SIZE(44, 88), google_protobuf_SourceCodeInfo*) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 88), google_protobuf_SourceCodeInfo*) = value; } UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); @@ -2862,22 +2860,22 @@ UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptor return sub; } UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_public_dependency(google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 96), len); + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 96), len); } UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { - return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(48, 96), len, 2, arena); + return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(32, 96), len, 2, arena); } UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto* msg, int32_t val, upb_Arena* arena) { - return _upb_Array_Append_accessor2(msg, UPB_SIZE(48, 96), 2, &val, arena); + return _upb_Array_Append_accessor2(msg, UPB_SIZE(32, 96), 2, &val, arena); } UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_weak_dependency(google_protobuf_FileDescriptorProto* msg, size_t* len) { - return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 104), len); + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 104), len); } UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { - return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(52, 104), len, 2, arena); + return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(36, 104), len, 2, arena); } UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto* msg, int32_t val, upb_Arena* arena) { - return _upb_Array_Append_accessor2(msg, UPB_SIZE(52, 104), 2, &val, arena); + return _upb_Array_Append_accessor2(msg, UPB_SIZE(36, 104), 2, &val, arena); } UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 5); @@ -2927,159 +2925,159 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_D return _upb_hasbit(msg, 1); } UPB_INLINE void google_protobuf_DescriptorProto_clear_name(const google_protobuf_DescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(40, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 1); } UPB_INLINE upb_StringView google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(40, 8), upb_StringView); } UPB_INLINE bool google_protobuf_DescriptorProto_has_field(const google_protobuf_DescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 24)); } UPB_INLINE void google_protobuf_DescriptorProto_clear_field(const google_protobuf_DescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(12, 24)); + _upb_array_detach(msg, UPB_SIZE(4, 24)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto* msg, size_t* len) { - return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); + return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(4, 24), len); } UPB_INLINE bool google_protobuf_DescriptorProto_has_nested_type(const google_protobuf_DescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 32)); } UPB_INLINE void google_protobuf_DescriptorProto_clear_nested_type(const google_protobuf_DescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(16, 32)); + _upb_array_detach(msg, UPB_SIZE(8, 32)); } UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto* msg, size_t* len) { - return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); + return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(8, 32), len); } UPB_INLINE bool google_protobuf_DescriptorProto_has_enum_type(const google_protobuf_DescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 40)); } UPB_INLINE void google_protobuf_DescriptorProto_clear_enum_type(const google_protobuf_DescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(20, 40)); + _upb_array_detach(msg, UPB_SIZE(12, 40)); } UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto* msg, size_t* len) { - return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); + return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 40), len); } UPB_INLINE bool google_protobuf_DescriptorProto_has_extension_range(const google_protobuf_DescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 48)); } UPB_INLINE void google_protobuf_DescriptorProto_clear_extension_range(const google_protobuf_DescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(24, 48)); + _upb_array_detach(msg, UPB_SIZE(16, 48)); } UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto* msg, size_t* len) { - return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); + return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_accessor(msg, UPB_SIZE(16, 48), len); } UPB_INLINE bool google_protobuf_DescriptorProto_has_extension(const google_protobuf_DescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 56)); } UPB_INLINE void google_protobuf_DescriptorProto_clear_extension(const google_protobuf_DescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(28, 56)); + _upb_array_detach(msg, UPB_SIZE(20, 56)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto* msg, size_t* len) { - return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); + return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 56), len); } UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto* msg) { return _upb_hasbit(msg, 2); } UPB_INLINE void google_protobuf_DescriptorProto_clear_options(const google_protobuf_DescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const upb_Message*) = NULL; + *UPB_PTR_AT(msg, UPB_SIZE(24, 64), const upb_Message*) = NULL; _upb_clearhas(msg, 2); } UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_protobuf_MessageOptions*); + return *UPB_PTR_AT(msg, UPB_SIZE(24, 64), const google_protobuf_MessageOptions*); } UPB_INLINE bool google_protobuf_DescriptorProto_has_oneof_decl(const google_protobuf_DescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 72)); } UPB_INLINE void google_protobuf_DescriptorProto_clear_oneof_decl(const google_protobuf_DescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(36, 72)); + _upb_array_detach(msg, UPB_SIZE(28, 72)); } UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto* msg, size_t* len) { - return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); + return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(28, 72), len); } UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_range(const google_protobuf_DescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 80)); } UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_range(const google_protobuf_DescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(40, 80)); + _upb_array_detach(msg, UPB_SIZE(32, 80)); } UPB_INLINE const google_protobuf_DescriptorProto_ReservedRange* const* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto* msg, size_t* len) { - return (const google_protobuf_DescriptorProto_ReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); + return (const google_protobuf_DescriptorProto_ReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(32, 80), len); } UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_name(const google_protobuf_DescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(44, 88)); + _upb_array_detach(msg, UPB_SIZE(36, 88)); } UPB_INLINE upb_StringView const* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto* msg, size_t* len) { - return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); + return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(36, 88), len); } UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 8), upb_StringView) = value; } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto* msg, size_t* len) { - return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); + return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 24), len); } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 24), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google_protobuf_FieldDescriptorProto_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 24), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_mutable_nested_type(google_protobuf_DescriptorProto* msg, size_t* len) { - return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); + return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 32), len); } UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_DescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_DescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 32), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_add_nested_type(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google_protobuf_DescriptorProto_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(8, 32), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_mutable_enum_type(google_protobuf_DescriptorProto* msg, size_t* len) { - return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); + return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 40), len); } UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_EnumDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_EnumDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 40), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_DescriptorProto_add_enum_type(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 40), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_mutable_extension_range(google_protobuf_DescriptorProto* msg, size_t* len) { - return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); + return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 48), len); } UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 48), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_add_extension_range(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google_protobuf_DescriptorProto_ExtensionRange_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 48), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_extension(google_protobuf_DescriptorProto* msg, size_t* len) { - return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); + return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 56), len); } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 56), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google_protobuf_FieldDescriptorProto_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 56), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) { _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(32, 64), google_protobuf_MessageOptions*) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 64), google_protobuf_MessageOptions*) = value; } UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); @@ -3091,37 +3089,37 @@ UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProt return sub; } UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_mutable_oneof_decl(google_protobuf_DescriptorProto* msg, size_t* len) { - return (google_protobuf_OneofDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); + return (google_protobuf_OneofDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 72), len); } UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_OneofDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_OneofDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(28, 72), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_DescriptorProto_add_oneof_decl(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google_protobuf_OneofDescriptorProto_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(36, 72), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(28, 72), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_mutable_reserved_range(google_protobuf_DescriptorProto* msg, size_t* len) { - return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); + return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 80), len); } UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_DescriptorProto_ReservedRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(40, 80), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_DescriptorProto_ReservedRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(32, 80), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_add_reserved_range(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google_protobuf_DescriptorProto_ReservedRange_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(40, 80), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(32, 80), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE upb_StringView* google_protobuf_DescriptorProto_mutable_reserved_name(google_protobuf_DescriptorProto* msg, size_t* len) { - return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len); + return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 88), len); } UPB_INLINE upb_StringView* google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { - return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(3, 4), arena); + return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(36, 88), len, UPB_SIZE(3, 4), arena); } UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto* msg, upb_StringView val, upb_Arena* arena) { - return _upb_Array_Append_accessor2(msg, UPB_SIZE(44, 88), UPB_SIZE(3, 4), &val, arena); + return _upb_Array_Append_accessor2(msg, UPB_SIZE(36, 88), UPB_SIZE(3, 4), &val, arena); } /* google.protobuf.DescriptorProto.ExtensionRange */ @@ -3374,21 +3372,21 @@ UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_proto return _upb_hasbit(msg, 1); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_name(const google_protobuf_FieldDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(28, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 1); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(28, 24), upb_StringView); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto* msg) { return _upb_hasbit(msg, 2); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_extendee(const google_protobuf_FieldDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 2); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_StringView); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto* msg) { return _upb_hasbit(msg, 3); @@ -3424,41 +3422,41 @@ UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_ return _upb_hasbit(msg, 6); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_type_name(const google_protobuf_FieldDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 6); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_StringView); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto* msg) { return _upb_hasbit(msg, 7); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_default_value(const google_protobuf_FieldDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 7); } UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_StringView); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto* msg) { return _upb_hasbit(msg, 8); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_options(const google_protobuf_FieldDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(56, 88), const upb_Message*) = NULL; + *UPB_PTR_AT(msg, UPB_SIZE(16, 88), const upb_Message*) = NULL; _upb_clearhas(msg, 8); } UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(56, 88), const google_protobuf_FieldOptions*); + return *UPB_PTR_AT(msg, UPB_SIZE(16, 88), const google_protobuf_FieldOptions*); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { return _upb_hasbit(msg, 9); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = 0; + *UPB_PTR_AT(msg, UPB_SIZE(20, 16), int32_t) = 0; _upb_clearhas(msg, 9); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); + return *UPB_PTR_AT(msg, UPB_SIZE(20, 16), int32_t); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto* msg) { return _upb_hasbit(msg, 10); @@ -3474,20 +3472,20 @@ UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const g return _upb_hasbit(msg, 11); } UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = 0; + *UPB_PTR_AT(msg, UPB_SIZE(24, 20), bool) = 0; _upb_clearhas(msg, 11); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool); + return *UPB_PTR_AT(msg, UPB_SIZE(24, 20), bool); } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 24), upb_StringView) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_StringView) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 3); @@ -3503,15 +3501,15 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_Fi } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 6); - *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_StringView) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 7); - *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_StringView) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) { _upb_sethas(msg, 8); - *UPB_PTR_AT(msg, UPB_SIZE(56, 88), google_protobuf_FieldOptions*) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 88), google_protobuf_FieldOptions*) = value; } UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); @@ -3524,7 +3522,7 @@ UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorP } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 9); - *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 16), int32_t) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 10); @@ -3532,7 +3530,7 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protob } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) { _upb_sethas(msg, 11); - *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 20), bool) = value; } /* google.protobuf.OneofDescriptorProto */ @@ -3574,30 +3572,30 @@ UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_proto return _upb_hasbit(msg, 1); } UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_name(const google_protobuf_OneofDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 1); } UPB_INLINE upb_StringView google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView); } UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto* msg) { return _upb_hasbit(msg, 2); } UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_options(const google_protobuf_OneofDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const upb_Message*) = NULL; + *UPB_PTR_AT(msg, UPB_SIZE(4, 24), const upb_Message*) = NULL; _upb_clearhas(msg, 2); } UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_OneofOptions*); + return *UPB_PTR_AT(msg, UPB_SIZE(4, 24), const google_protobuf_OneofOptions*); } UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView) = value; } UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) { _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_OneofOptions*) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 24), google_protobuf_OneofOptions*) = value; } UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); @@ -3648,66 +3646,66 @@ UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protob return _upb_hasbit(msg, 1); } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_name(const google_protobuf_EnumDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(20, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 1); } UPB_INLINE upb_StringView google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(20, 8), upb_StringView); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_value(const google_protobuf_EnumDescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 24)); } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_value(const google_protobuf_EnumDescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(12, 24)); + _upb_array_detach(msg, UPB_SIZE(4, 24)); } UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { - return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); + return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(4, 24), len); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto* msg) { return _upb_hasbit(msg, 2); } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_options(const google_protobuf_EnumDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const upb_Message*) = NULL; + *UPB_PTR_AT(msg, UPB_SIZE(8, 32), const upb_Message*) = NULL; _upb_clearhas(msg, 2); } UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const google_protobuf_EnumOptions*); + return *UPB_PTR_AT(msg, UPB_SIZE(8, 32), const google_protobuf_EnumOptions*); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_range(const google_protobuf_EnumDescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 40)); } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_range(const google_protobuf_EnumDescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(20, 40)); + _upb_array_detach(msg, UPB_SIZE(12, 40)); } UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { - return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); + return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(12, 40), len); } UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_name(const google_protobuf_EnumDescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(24, 48)); + _upb_array_detach(msg, UPB_SIZE(16, 48)); } UPB_INLINE upb_StringView const* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { - return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); + return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(16, 48), len); } UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 8), upb_StringView) = value; } UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto* msg, size_t* len) { - return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); + return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 24), len); } UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_EnumValueDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_EnumValueDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 24), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google_protobuf_EnumValueDescriptorProto_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 24), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) { _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(16, 32), google_protobuf_EnumOptions*) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 32), google_protobuf_EnumOptions*) = value; } UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); @@ -3719,25 +3717,25 @@ UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorPro return sub; } UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_mutable_reserved_range(google_protobuf_EnumDescriptorProto* msg, size_t* len) { - return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); + return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 40), len); } UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 40), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_add_reserved_range(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 40), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE upb_StringView* google_protobuf_EnumDescriptorProto_mutable_reserved_name(google_protobuf_EnumDescriptorProto* msg, size_t* len) { - return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); + return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 48), len); } UPB_INLINE upb_StringView* google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto* msg, size_t len, upb_Arena* arena) { - return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(3, 4), arena); + return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 48), len, UPB_SIZE(3, 4), arena); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto* msg, upb_StringView val, upb_Arena* arena) { - return _upb_Array_Append_accessor2(msg, UPB_SIZE(24, 48), UPB_SIZE(3, 4), &val, arena); + return _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 48), UPB_SIZE(3, 4), &val, arena); } /* google.protobuf.EnumDescriptorProto.EnumReservedRange */ @@ -3844,11 +3842,11 @@ UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_p return _upb_hasbit(msg, 1); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_name(const google_protobuf_EnumValueDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(12, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 1); } UPB_INLINE upb_StringView google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(12, 8), upb_StringView); } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto* msg) { return _upb_hasbit(msg, 2); @@ -3864,16 +3862,16 @@ UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const googl return _upb_hasbit(msg, 3); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_options(const google_protobuf_EnumValueDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const upb_Message*) = NULL; + *UPB_PTR_AT(msg, UPB_SIZE(8, 24), const upb_Message*) = NULL; _upb_clearhas(msg, 3); } UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const google_protobuf_EnumValueOptions*); + return *UPB_PTR_AT(msg, UPB_SIZE(8, 24), const google_protobuf_EnumValueOptions*); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 8), upb_StringView) = value; } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 2); @@ -3881,7 +3879,7 @@ UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_proto } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) { _upb_sethas(msg, 3); - *UPB_PTR_AT(msg, UPB_SIZE(16, 24), google_protobuf_EnumValueOptions*) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 24), google_protobuf_EnumValueOptions*) = value; } UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); @@ -3932,51 +3930,51 @@ UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_pro return _upb_hasbit(msg, 1); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_name(const google_protobuf_ServiceDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(12, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 1); } UPB_INLINE upb_StringView google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(12, 8), upb_StringView); } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_method(const google_protobuf_ServiceDescriptorProto* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 24)); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_method(const google_protobuf_ServiceDescriptorProto* msg) { - _upb_array_detach(msg, UPB_SIZE(12, 24)); + _upb_array_detach(msg, UPB_SIZE(4, 24)); } UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto* msg, size_t* len) { - return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); + return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(4, 24), len); } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto* msg) { return _upb_hasbit(msg, 2); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_options(const google_protobuf_ServiceDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const upb_Message*) = NULL; + *UPB_PTR_AT(msg, UPB_SIZE(8, 32), const upb_Message*) = NULL; _upb_clearhas(msg, 2); } UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const google_protobuf_ServiceOptions*); + return *UPB_PTR_AT(msg, UPB_SIZE(8, 32), const google_protobuf_ServiceOptions*); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 8), upb_StringView) = value; } UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto* msg, size_t* len) { - return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); + return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 24), len); } UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_MethodDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_MethodDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 24), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google_protobuf_MethodDescriptorProto_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 24), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) { _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(16, 32), google_protobuf_ServiceOptions*) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 32), google_protobuf_ServiceOptions*) = value; } UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); @@ -4027,78 +4025,78 @@ UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_prot return _upb_hasbit(msg, 1); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_name(const google_protobuf_MethodDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(12, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 1); } UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(12, 8), upb_StringView); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto* msg) { return _upb_hasbit(msg, 2); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_input_type(const google_protobuf_MethodDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 2); } UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_StringView); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto* msg) { return _upb_hasbit(msg, 3); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_output_type(const google_protobuf_MethodDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 3); } UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_StringView); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto* msg) { return _upb_hasbit(msg, 4); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_options(const google_protobuf_MethodDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const upb_Message*) = NULL; + *UPB_PTR_AT(msg, UPB_SIZE(4, 56), const upb_Message*) = NULL; _upb_clearhas(msg, 4); } UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_MethodOptions*); + return *UPB_PTR_AT(msg, UPB_SIZE(4, 56), const google_protobuf_MethodOptions*); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { return _upb_hasbit(msg, 5); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0; + *UPB_PTR_AT(msg, UPB_SIZE(8, 1), bool) = 0; _upb_clearhas(msg, 5); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); + return *UPB_PTR_AT(msg, UPB_SIZE(8, 1), bool); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { return _upb_hasbit(msg, 6); } UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = 0; + *UPB_PTR_AT(msg, UPB_SIZE(9, 2), bool) = 0; _upb_clearhas(msg, 6); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); + return *UPB_PTR_AT(msg, UPB_SIZE(9, 2), bool); } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 8), upb_StringView) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_StringView) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { _upb_sethas(msg, 3); - *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_StringView) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) { _upb_sethas(msg, 4); - *UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_protobuf_MethodOptions*) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 56), google_protobuf_MethodOptions*) = value; } UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena) { struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); @@ -4111,11 +4109,11 @@ UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescripto } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { _upb_sethas(msg, 5); - *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 1), bool) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { _upb_sethas(msg, 6); - *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; + *UPB_PTR_AT(msg, UPB_SIZE(9, 2), bool) = value; } /* google.protobuf.FileOptions */ @@ -4157,21 +4155,21 @@ UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protob return _upb_hasbit(msg, 1); } UPB_INLINE void google_protobuf_FileOptions_clear_java_package(const google_protobuf_FileOptions* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 1); } UPB_INLINE upb_StringView google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_StringView); } UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions* msg) { return _upb_hasbit(msg, 2); } UPB_INLINE void google_protobuf_FileOptions_clear_java_outer_classname(const google_protobuf_FileOptions* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 2); } UPB_INLINE upb_StringView google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_StringView); } UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions* msg) { return _upb_hasbit(msg, 3); @@ -4197,11 +4195,11 @@ UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf return _upb_hasbit(msg, 5); } UPB_INLINE void google_protobuf_FileOptions_clear_go_package(const google_protobuf_FileOptions* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 5); } UPB_INLINE upb_StringView google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView); } UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions* msg) { return _upb_hasbit(msg, 6); @@ -4277,51 +4275,51 @@ UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_p return _upb_hasbit(msg, 13); } UPB_INLINE void google_protobuf_FileOptions_clear_objc_class_prefix(const google_protobuf_FileOptions* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 13); } UPB_INLINE upb_StringView google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView); } UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions* msg) { return _upb_hasbit(msg, 14); } UPB_INLINE void google_protobuf_FileOptions_clear_csharp_namespace(const google_protobuf_FileOptions* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(56, 88), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 14); } UPB_INLINE upb_StringView google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(56, 88), upb_StringView); } UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions* msg) { return _upb_hasbit(msg, 15); } UPB_INLINE void google_protobuf_FileOptions_clear_swift_prefix(const google_protobuf_FileOptions* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(64, 104), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 15); } UPB_INLINE upb_StringView google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(64, 104), upb_StringView); } UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions* msg) { return _upb_hasbit(msg, 16); } UPB_INLINE void google_protobuf_FileOptions_clear_php_class_prefix(const google_protobuf_FileOptions* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(72, 120), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 16); } UPB_INLINE upb_StringView google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(72, 120), upb_StringView); } UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions* msg) { return _upb_hasbit(msg, 17); } UPB_INLINE void google_protobuf_FileOptions_clear_php_namespace(const google_protobuf_FileOptions* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(80, 136), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 17); } UPB_INLINE upb_StringView google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(80, 136), upb_StringView); } UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions* msg) { return _upb_hasbit(msg, 18); @@ -4337,39 +4335,39 @@ UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const goo return _upb_hasbit(msg, 19); } UPB_INLINE void google_protobuf_FileOptions_clear_php_metadata_namespace(const google_protobuf_FileOptions* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(88, 152), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 19); } UPB_INLINE upb_StringView google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(88, 152), upb_StringView); } UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions* msg) { return _upb_hasbit(msg, 20); } UPB_INLINE void google_protobuf_FileOptions_clear_ruby_package(const google_protobuf_FileOptions* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(96, 168), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 20); } UPB_INLINE upb_StringView google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(96, 168), upb_StringView); } UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const google_protobuf_FileOptions* msg) { - return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 184)); + return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 184)); } UPB_INLINE void google_protobuf_FileOptions_clear_uninterpreted_option(const google_protobuf_FileOptions* msg) { - _upb_array_detach(msg, UPB_SIZE(100, 184)); + _upb_array_detach(msg, UPB_SIZE(20, 184)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions* msg, size_t* len) { - return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(100, 184), len); + return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 184), len); } UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_StringView value) { _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_StringView) = value; } UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_StringView value) { _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_StringView) = value; } UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) { _upb_sethas(msg, 3); @@ -4381,7 +4379,7 @@ UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_proto } UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_StringView value) { _upb_sethas(msg, 5); - *UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView) = value; } UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 6); @@ -4413,23 +4411,23 @@ UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf } UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { _upb_sethas(msg, 13); - *UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView) = value; } UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { _upb_sethas(msg, 14); - *UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(56, 88), upb_StringView) = value; } UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { _upb_sethas(msg, 15); - *UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(64, 104), upb_StringView) = value; } UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { _upb_sethas(msg, 16); - *UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(72, 120), upb_StringView) = value; } UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { _upb_sethas(msg, 17); - *UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(80, 136), upb_StringView) = value; } UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 18); @@ -4437,21 +4435,21 @@ UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_prot } UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { _upb_sethas(msg, 19); - *UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(88, 152), upb_StringView) = value; } UPB_INLINE void google_protobuf_FileOptions_set_ruby_package(google_protobuf_FileOptions *msg, upb_StringView value) { _upb_sethas(msg, 20); - *UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(96, 168), upb_StringView) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions* msg, size_t* len) { - return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(100, 184), len); + return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 184), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions* msg, size_t len, upb_Arena* arena) { - return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(100, 184), len, UPB_SIZE(2, 3), arena); + return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 184), len, UPB_SIZE(2, 3), arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptions_add_uninterpreted_option(google_protobuf_FileOptions* msg, upb_Arena* arena) { struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msg_init, arena); - bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(100, 184), UPB_SIZE(2, 3), &sub, arena); + bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 184), UPB_SIZE(2, 3), &sub, arena); if (!ok) return NULL; return sub; } @@ -5158,51 +5156,51 @@ UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const return _upb_hasbit(msg, 2); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_positive_int_value(const google_protobuf_UninterpretedOption* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(32, 64), uint64_t) = 0; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), uint64_t) = 0; _upb_clearhas(msg, 2); } UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), uint64_t); + return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), uint64_t); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption* msg) { return _upb_hasbit(msg, 3); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_negative_int_value(const google_protobuf_UninterpretedOption* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(40, 72), int64_t) = 0; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), int64_t) = 0; _upb_clearhas(msg, 3); } UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), int64_t); + return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), int64_t); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption* msg) { return _upb_hasbit(msg, 4); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_double_value(const google_protobuf_UninterpretedOption* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(48, 80), double) = 0; + *UPB_PTR_AT(msg, UPB_SIZE(32, 48), double) = 0; _upb_clearhas(msg, 4); } UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(48, 80), double); + return *UPB_PTR_AT(msg, UPB_SIZE(32, 48), double); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption* msg) { return _upb_hasbit(msg, 5); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_string_value(const google_protobuf_UninterpretedOption* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 5); } UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption* msg) { return _upb_hasbit(msg, 6); } UPB_INLINE void google_protobuf_UninterpretedOption_clear_aggregate_value(const google_protobuf_UninterpretedOption* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 6); } UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption* msg, size_t* len) { @@ -5223,23 +5221,23 @@ UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_ } UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) { _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(32, 64), uint64_t) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), uint64_t) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) { _upb_sethas(msg, 3); - *UPB_PTR_AT(msg, UPB_SIZE(40, 72), int64_t) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), int64_t) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) { _upb_sethas(msg, 4); - *UPB_PTR_AT(msg, UPB_SIZE(48, 80), double) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 48), double) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { _upb_sethas(msg, 5); - *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { _upb_sethas(msg, 6); - *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView) = value; } /* google.protobuf.UninterpretedOption.NamePart */ @@ -5416,27 +5414,27 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(con return _upb_hasbit(msg, 1); } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 1); } UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { return _upb_hasbit(msg, 2); } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); _upb_clearhas(msg, 2); } UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView); + return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_StringView); } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location* msg) { - _upb_array_detach(msg, UPB_SIZE(28, 56)); + _upb_array_detach(msg, UPB_SIZE(12, 56)); } UPB_INLINE upb_StringView const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { - return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); + return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(12, 56), len); } UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { @@ -5459,20 +5457,20 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) { _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView) = value; } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) { _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_StringView) = value; } UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { - return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); + return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 56), len); } UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, size_t len, upb_Arena* arena) { - return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(3, 4), arena); + return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 56), len, UPB_SIZE(3, 4), arena); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, upb_StringView val, upb_Arena* arena) { - return _upb_Array_Append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(3, 4), &val, arena); + return _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 56), UPB_SIZE(3, 4), &val, arena); } /* google.protobuf.GeneratedCodeInfo */ @@ -5569,10 +5567,10 @@ UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize_ex(const return ptr; } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_path(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - _upb_array_detach(msg, UPB_SIZE(16, 16)); + _upb_array_detach(msg, UPB_SIZE(4, 16)); } UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* len) { - return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(16, 16), len); + return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(4, 16), len); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { return _upb_hasbit(msg, 1); @@ -5588,41 +5586,41 @@ UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const goo return _upb_hasbit(msg, 2); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; + *UPB_PTR_AT(msg, UPB_SIZE(8, 4), int32_t) = 0; _upb_clearhas(msg, 2); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); + return *UPB_PTR_AT(msg, UPB_SIZE(8, 4), int32_t); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { return _upb_hasbit(msg, 3); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = 0; + *UPB_PTR_AT(msg, UPB_SIZE(12, 8), int32_t) = 0; _upb_clearhas(msg, 3); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); + return *UPB_PTR_AT(msg, UPB_SIZE(12, 8), int32_t); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_semantic(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { return _upb_hasbit(msg, 4); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_semantic(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = 0; + *UPB_PTR_AT(msg, UPB_SIZE(16, 12), int32_t) = 0; _upb_clearhas(msg, 4); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_semantic(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); + return *UPB_PTR_AT(msg, UPB_SIZE(16, 12), int32_t); } UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* len) { - return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 16), len); + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 16), len); } UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t len, upb_Arena* arena) { - return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 16), len, 2, arena); + return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 16), len, 2, arena); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, int32_t val, upb_Arena* arena) { - return _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 16), 2, &val, arena); + return _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 16), 2, &val, arena); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_StringView value) { _upb_sethas(msg, 1); @@ -5630,15 +5628,15 @@ UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(goo } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 4), int32_t) = value; } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { _upb_sethas(msg, 3); - *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 8), int32_t) = value; } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_semantic(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { _upb_sethas(msg, 4); - *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 12), int32_t) = value; } extern const upb_MiniTable_File google_protobuf_descriptor_proto_upb_file_layout; @@ -5999,12 +5997,19 @@ const upb_FileDef* upb_DefPool_FindFileByNameWithSize(const upb_DefPool* s, const char* name, size_t len); -const upb_FieldDef* upb_DefPool_FindExtensionByNameWithSize( - const upb_DefPool* s, const char* name, size_t size); +const upb_FieldDef* upb_DefPool_FindExtensionByMiniTable( + const upb_DefPool* s, const upb_MiniTable_Extension* ext); const upb_FieldDef* upb_DefPool_FindExtensionByName(const upb_DefPool* s, const char* sym); +const upb_FieldDef* upb_DefPool_FindExtensionByNameWithSize( + const upb_DefPool* s, const char* name, size_t size); + +const upb_FieldDef* upb_DefPool_FindExtensionByNumber(const upb_DefPool* s, + const upb_MessageDef* m, + int32_t fieldnum); + const upb_ServiceDef* upb_DefPool_FindServiceByName(const upb_DefPool* s, const char* name); @@ -6018,10 +6023,6 @@ const upb_FileDef* upb_DefPool_AddFile( upb_DefPool* s, const google_protobuf_FileDescriptorProto* file_proto, upb_Status* status); -const upb_FieldDef* upb_DefPool_FindExtensionByNumber(const upb_DefPool* s, - const upb_MessageDef* m, - int32_t fieldnum); - const upb_ExtensionRegistry* upb_DefPool_ExtensionRegistry( const upb_DefPool* s); @@ -6029,39 +6030,6 @@ const upb_FieldDef** upb_DefPool_GetAllExtensions(const upb_DefPool* s, const upb_MessageDef* m, size_t* count); -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -upb_Arena* _upb_DefPool_Arena(const upb_DefPool* s); -size_t _upb_DefPool_BytesLoaded(const upb_DefPool* s); -upb_ExtensionRegistry* _upb_DefPool_ExtReg(const upb_DefPool* s); -const upb_FieldDef* _upb_DefPool_FindExtensionByMiniTable( - const upb_DefPool* s, const upb_MiniTable_Extension* ext); - -bool _upb_DefPool_InsertExt(upb_DefPool* s, const upb_MiniTable_Extension* ext, - upb_FieldDef* f); -bool _upb_DefPool_InsertSym(upb_DefPool* s, upb_StringView sym, upb_value v, - upb_Status* status); -bool _upb_DefPool_LookupSym(const upb_DefPool* s, const char* sym, size_t size, - upb_value* v); - -void** _upb_DefPool_ScratchData(const upb_DefPool* s); -size_t* _upb_DefPool_ScratchSize(const upb_DefPool* s); - -// For generated code only: loads a generated descriptor. -typedef struct _upb_DefPool_Init { - struct _upb_DefPool_Init** deps; // Dependencies of this file. - const upb_MiniTable_File* layout; - const char* filename; - upb_StringView descriptor; // Serialized descriptor. -} _upb_DefPool_Init; - -bool _upb_DefPool_LoadDefInit(upb_DefPool* s, const _upb_DefPool_Init* init); - -// Should only be directly called by tests. This variant lets us suppress -// the use of compiled-in tables, forcing a rebuild of the tables at runtime. -bool _upb_DefPool_LoadDefInitEx(upb_DefPool* s, const _upb_DefPool_Init* init, - bool rebuild_minitable); - #ifdef __cplusplus } /* extern "C" */ #endif @@ -6093,6 +6061,7 @@ const upb_EnumValueDef* upb_EnumDef_FindValueByNumber(const upb_EnumDef* e, int32_t num); const char* upb_EnumDef_FullName(const upb_EnumDef* e); bool upb_EnumDef_HasOptions(const upb_EnumDef* e); +bool upb_EnumDef_IsClosed(const upb_EnumDef* e); // Creates a mini descriptor string for an enum, returns true on success. bool upb_EnumDef_MiniDescriptorEncode(const upb_EnumDef* e, upb_Arena* a, @@ -6103,17 +6072,6 @@ const google_protobuf_EnumOptions* upb_EnumDef_Options(const upb_EnumDef* e); const upb_EnumValueDef* upb_EnumDef_Value(const upb_EnumDef* e, int i); int upb_EnumDef_ValueCount(const upb_EnumDef* e); -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -upb_EnumDef* _upb_EnumDef_At(const upb_EnumDef* e, int i); -bool _upb_EnumDef_Insert(upb_EnumDef* e, upb_EnumValueDef* v, upb_Arena* a); -const upb_MiniTable_Enum* _upb_EnumDef_MiniTable(const upb_EnumDef* e); - -// Allocate and initialize an array of |n| enum defs. -upb_EnumDef* _upb_EnumDefs_New(upb_DefBuilder* ctx, int n, - const google_protobuf_EnumDescriptorProto* const* protos, - const upb_MessageDef* containing_type); - #ifdef __cplusplus } /* extern "C" */ #endif @@ -6142,19 +6100,6 @@ int32_t upb_EnumValueDef_Number(const upb_EnumValueDef* v); const google_protobuf_EnumValueOptions* upb_EnumValueDef_Options( const upb_EnumValueDef* v); -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -upb_EnumValueDef* _upb_EnumValueDef_At(const upb_EnumValueDef* v, int i); - -// Allocate and initialize an array of |n| enum value defs owned by |e|. -upb_EnumValueDef* _upb_EnumValueDefs_New( - upb_DefBuilder* ctx, const char* prefix, int n, - const google_protobuf_EnumValueDescriptorProto* const* protos, upb_EnumDef* e, - bool* is_sorted); - -const upb_EnumValueDef** _upb_EnumValueDefs_Sorted(const upb_EnumValueDef* v, - int n, upb_Arena* a); - #ifdef __cplusplus } /* extern "C" */ #endif @@ -6181,16 +6126,6 @@ bool upb_ExtensionRange_HasOptions(const upb_ExtensionRange* r); const google_protobuf_ExtensionRangeOptions* upb_ExtensionRange_Options( const upb_ExtensionRange* r); -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -upb_ExtensionRange* _upb_ExtensionRange_At(const upb_ExtensionRange* r, int i); - -// Allocate and initialize an array of |n| extension ranges owned by |m|. -upb_ExtensionRange* _upb_ExtensionRanges_New( - upb_DefBuilder* ctx, int n, - const google_protobuf_DescriptorProto_ExtensionRange* const* protos, - const upb_MessageDef* m); - #ifdef __cplusplus } /* extern "C" */ #endif @@ -6251,30 +6186,6 @@ const google_protobuf_FieldOptions* upb_FieldDef_Options(const upb_FieldDef* f); const upb_OneofDef* upb_FieldDef_RealContainingOneof(const upb_FieldDef* f); upb_FieldType upb_FieldDef_Type(const upb_FieldDef* f); -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -upb_FieldDef* _upb_FieldDef_At(const upb_FieldDef* f, int i); - -const upb_MiniTable_Extension* _upb_FieldDef_ExtensionMiniTable( - const upb_FieldDef* f); -bool _upb_FieldDef_IsClosedEnum(const upb_FieldDef* f); -bool _upb_FieldDef_IsProto3Optional(const upb_FieldDef* f); -int _upb_FieldDef_LayoutIndex(const upb_FieldDef* f); -uint64_t _upb_FieldDef_Modifiers(const upb_FieldDef* f); -void _upb_FieldDef_Resolve(upb_DefBuilder* ctx, const char* prefix, - upb_FieldDef* f); - -// Allocate and initialize an array of |n| field defs. -upb_FieldDef* _upb_FieldDefs_New( - upb_DefBuilder* ctx, int n, - const google_protobuf_FieldDescriptorProto* const* protos, const char* prefix, - upb_MessageDef* m, bool* is_sorted); - -// Allocate and return a list of pointers to the |n| field defs in |ff|, -// sorted by field number. -const upb_FieldDef** _upb_FieldDefs_Sorted(const upb_FieldDef* f, int n, - upb_Arena* a); - #ifdef __cplusplus } /* extern "C" */ #endif @@ -6322,19 +6233,6 @@ int upb_FileDef_TopLevelMessageCount(const upb_FileDef* f); const upb_FileDef* upb_FileDef_WeakDependency(const upb_FileDef* f, int i); int upb_FileDef_WeakDependencyCount(const upb_FileDef* f); -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -const upb_MiniTable_Extension* _upb_FileDef_ExtensionMiniTable( - const upb_FileDef* f, int i); -const int32_t* _upb_FileDef_PublicDependencyIndexes(const upb_FileDef* f); -const int32_t* _upb_FileDef_WeakDependencyIndexes(const upb_FileDef* f); - -// upb_FileDef_Package() returns "" if f->package is NULL, this does not. -const char* _upb_FileDef_RawPackage(const upb_FileDef* f); - -void _upb_FileDef_Create(upb_DefBuilder* ctx, - const google_protobuf_FileDescriptorProto* file_proto); - #ifdef __cplusplus } /* extern "C" */ #endif @@ -6469,24 +6367,6 @@ const google_protobuf_MessageOptions* upb_MessageDef_Options(const upb_MessageDe upb_Syntax upb_MessageDef_Syntax(const upb_MessageDef* m); upb_WellKnown upb_MessageDef_WellKnownType(const upb_MessageDef* m); -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -upb_MessageDef* _upb_MessageDef_At(const upb_MessageDef* m, int i); -bool _upb_MessageDef_InMessageSet(const upb_MessageDef* m); -bool _upb_MessageDef_Insert(upb_MessageDef* m, const char* name, size_t size, - upb_value v, upb_Arena* a); -void _upb_MessageDef_InsertField(upb_DefBuilder* ctx, upb_MessageDef* m, - const upb_FieldDef* f); -bool _upb_MessageDef_IsValidExtensionNumber(const upb_MessageDef* m, int n); -void _upb_MessageDef_LinkMiniTable(upb_DefBuilder* ctx, - const upb_MessageDef* m); -void _upb_MessageDef_Resolve(upb_DefBuilder* ctx, upb_MessageDef* m); - -// Allocate and initialize an array of |n| message defs. -upb_MessageDef* _upb_MessageDefs_New( - upb_DefBuilder* ctx, int n, const google_protobuf_DescriptorProto* const* protos, - const upb_MessageDef* containing_type); - #ifdef __cplusplus } /* extern "C" */ #endif @@ -6517,15 +6397,6 @@ const upb_MessageDef* upb_MethodDef_OutputType(const upb_MethodDef* m); bool upb_MethodDef_ServerStreaming(const upb_MethodDef* m); const upb_ServiceDef* upb_MethodDef_Service(const upb_MethodDef* m); -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -upb_MethodDef* _upb_MethodDef_At(const upb_MethodDef* m, int i); - -// Allocate and initialize an array of |n| method defs owned by |s|. -upb_MethodDef* _upb_MethodDefs_New( - upb_DefBuilder* ctx, int n, - const google_protobuf_MethodDescriptorProto* const* protos, upb_ServiceDef* s); - #ifdef __cplusplus } /* extern "C" */ #endif @@ -6563,19 +6434,6 @@ const char* upb_OneofDef_Name(const upb_OneofDef* o); int upb_OneofDef_numfields(const upb_OneofDef* o); const google_protobuf_OneofOptions* upb_OneofDef_Options(const upb_OneofDef* o); -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -upb_OneofDef* _upb_OneofDef_At(const upb_OneofDef* o, int i); -bool _upb_OneofDef_Insert(upb_OneofDef* o, const upb_FieldDef* f, - const char* name, size_t size, upb_Arena* a); - -// Allocate and initialize an array of |n| oneof defs owned by |m|. -upb_OneofDef* _upb_OneofDefs_New( - upb_DefBuilder* ctx, int n, - const google_protobuf_OneofDescriptorProto* const* protos, upb_MessageDef* m); - -size_t _upb_OneofDefs_Finalize(upb_DefBuilder* ctx, upb_MessageDef* m); - #ifdef __cplusplus } /* extern "C" */ #endif @@ -6606,15 +6464,6 @@ int upb_ServiceDef_MethodCount(const upb_ServiceDef* s); const char* upb_ServiceDef_Name(const upb_ServiceDef* s); const google_protobuf_ServiceOptions* upb_ServiceDef_Options(const upb_ServiceDef* s); -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -upb_ServiceDef* _upb_ServiceDef_At(const upb_ServiceDef* s, int i); - -// Allocate and initialize an array of |n| service defs. -upb_ServiceDef* _upb_ServiceDefs_New( - upb_DefBuilder* ctx, int n, - const google_protobuf_ServiceDescriptorProto* const* protos); - #ifdef __cplusplus } /* extern "C" */ #endif @@ -6704,9 +6553,6 @@ extern "C" { upb_MessageValue upb_FieldDef_Default(const upb_FieldDef* f); -/* Creates a new message of the given type in the given arena. */ -upb_Message* upb_Message_New(const upb_MessageDef* m, upb_Arena* a); - /* Returns the value associated with this field. */ upb_MessageValue upb_Message_Get(const upb_Message* msg, const upb_FieldDef* f); @@ -6872,6 +6718,8 @@ extern "C" { const upb_MiniTable_Field* upb_MiniTable_FindFieldByNumber( const upb_MiniTable* table, uint32_t number); +upb_FieldType upb_MiniTableField_Type(const upb_MiniTable_Field* field); + UPB_INLINE const upb_MiniTable* upb_MiniTable_GetSubMessageTable( const upb_MiniTable* mini_table, const upb_MiniTable_Field* field) { return mini_table->subs[field->submsg_index].submsg; @@ -6944,13 +6792,18 @@ char* upb_MtDataEncoder_StartOneof(upb_MtDataEncoder* e, char* ptr); char* upb_MtDataEncoder_PutOneofField(upb_MtDataEncoder* e, char* ptr, uint32_t field_num); -// Encodes the set of values for a given enum. The values must be given in +// Encodes the set of values for a given enum. The values must be given in // order (after casting to uint32_t), and repeats are not allowed. -void upb_MtDataEncoder_StartEnum(upb_MtDataEncoder* e); +char* upb_MtDataEncoder_StartEnum(upb_MtDataEncoder* e, char* ptr); char* upb_MtDataEncoder_PutEnumValue(upb_MtDataEncoder* e, char* ptr, uint32_t val); char* upb_MtDataEncoder_EndEnum(upb_MtDataEncoder* e, char* ptr); +// Encodes an entire mini descriptor for one extension. +char* upb_MtDataEncoder_EncodeExtension(upb_MtDataEncoder* e, char* ptr, + upb_FieldType type, uint32_t field_num, + uint64_t field_mod); + /** upb_MiniTable *************************************************************/ typedef enum { @@ -7025,15 +6878,61 @@ bool upb_IsTypePackable(upb_FieldType type); #endif /* UPB_MINI_TABLE_H_ */ -#ifndef UPB_REFLECTION_DEF_BUILDER_H_ -#define UPB_REFLECTION_DEF_BUILDER_H_ +#ifndef UPB_REFLECTION_DEF_BUILDER_INTERNAL_H_ +#define UPB_REFLECTION_DEF_BUILDER_INTERNAL_H_ + + +#ifndef UPB_REFLECTION_DEF_POOL_INTERNAL_H_ +#define UPB_REFLECTION_DEF_POOL_INTERNAL_H_ + + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +upb_Arena* _upb_DefPool_Arena(const upb_DefPool* s); +size_t _upb_DefPool_BytesLoaded(const upb_DefPool* s); +upb_ExtensionRegistry* _upb_DefPool_ExtReg(const upb_DefPool* s); + +bool _upb_DefPool_InsertExt(upb_DefPool* s, const upb_MiniTable_Extension* ext, + upb_FieldDef* f); +bool _upb_DefPool_InsertSym(upb_DefPool* s, upb_StringView sym, upb_value v, + upb_Status* status); +bool _upb_DefPool_LookupSym(const upb_DefPool* s, const char* sym, size_t size, + upb_value* v); + +void** _upb_DefPool_ScratchData(const upb_DefPool* s); +size_t* _upb_DefPool_ScratchSize(const upb_DefPool* s); + +// For generated code only: loads a generated descriptor. +typedef struct _upb_DefPool_Init { + struct _upb_DefPool_Init** deps; // Dependencies of this file. + const upb_MiniTable_File* layout; + const char* filename; + upb_StringView descriptor; // Serialized descriptor. +} _upb_DefPool_Init; + +bool _upb_DefPool_LoadDefInit(upb_DefPool* s, const _upb_DefPool_Init* init); + +// Should only be directly called by tests. This variant lets us suppress +// the use of compiled-in tables, forcing a rebuild of the tables at runtime. +bool _upb_DefPool_LoadDefInitEx(upb_DefPool* s, const _upb_DefPool_Init* init, + bool rebuild_minitable); + +#ifdef __cplusplus +} /* extern "C" */ +#endif +#endif /* UPB_REFLECTION_DEF_POOL_INTERNAL_H_ */ + // Must be last. // We want to copy the options verbatim into the destination options proto. // We use serialize+parse as our deep copy. -#define UBP_DEF_SET_OPTIONS(target, desc_type, options_type, proto) \ +#define UPB_DEF_SET_OPTIONS(target, desc_type, options_type, proto) \ if (google_protobuf_##desc_type##_has_options(proto)) { \ size_t size; \ char* pb = google_protobuf_##options_type##_serialize( \ @@ -7165,10 +7064,188 @@ UPB_INLINE void _upb_DefBuilder_CheckIdentFull(upb_DefBuilder* ctx, #endif -#endif /* UPB_REFLECTION_DEF_BUILDER_H_ */ +#endif /* UPB_REFLECTION_DEF_BUILDER_INTERNAL_H_ */ + +#ifndef UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ +#define UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ + + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +upb_EnumDef* _upb_EnumDef_At(const upb_EnumDef* e, int i); +bool _upb_EnumDef_Insert(upb_EnumDef* e, upb_EnumValueDef* v, upb_Arena* a); +const upb_MiniTable_Enum* _upb_EnumDef_MiniTable(const upb_EnumDef* e); + +// Allocate and initialize an array of |n| enum defs. +upb_EnumDef* _upb_EnumDefs_New(upb_DefBuilder* ctx, int n, + const google_protobuf_EnumDescriptorProto* const* protos, + const upb_MessageDef* containing_type); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ */ + +#ifndef UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_ +#define UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_ + + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +upb_EnumValueDef* _upb_EnumValueDef_At(const upb_EnumValueDef* v, int i); + +// Allocate and initialize an array of |n| enum value defs owned by |e|. +upb_EnumValueDef* _upb_EnumValueDefs_New( + upb_DefBuilder* ctx, const char* prefix, int n, + const google_protobuf_EnumValueDescriptorProto* const* protos, upb_EnumDef* e, + bool* is_sorted); + +const upb_EnumValueDef** _upb_EnumValueDefs_Sorted(const upb_EnumValueDef* v, + int n, upb_Arena* a); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_ */ + +#ifndef UPB_REFLECTION_FIELD_DEF_INTERNAL_H_ +#define UPB_REFLECTION_FIELD_DEF_INTERNAL_H_ + + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +upb_FieldDef* _upb_FieldDef_At(const upb_FieldDef* f, int i); + +const upb_MiniTable_Extension* _upb_FieldDef_ExtensionMiniTable( + const upb_FieldDef* f); +bool _upb_FieldDef_IsClosedEnum(const upb_FieldDef* f); +bool _upb_FieldDef_IsProto3Optional(const upb_FieldDef* f); +int _upb_FieldDef_LayoutIndex(const upb_FieldDef* f); +uint64_t _upb_FieldDef_Modifiers(const upb_FieldDef* f); +void _upb_FieldDef_Resolve(upb_DefBuilder* ctx, const char* prefix, + upb_FieldDef* f); + +// Allocate and initialize an array of |n| field defs. +upb_FieldDef* _upb_FieldDefs_New( + upb_DefBuilder* ctx, int n, + const google_protobuf_FieldDescriptorProto* const* protos, const char* prefix, + upb_MessageDef* m, bool* is_sorted); + +// Allocate and return a list of pointers to the |n| field defs in |ff|, +// sorted by field number. +const upb_FieldDef** _upb_FieldDefs_Sorted(const upb_FieldDef* f, int n, + upb_Arena* a); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_REFLECTION_FIELD_DEF_INTERNAL_H_ */ + +#ifndef UPB_REFLECTION_FILE_DEF_INTERNAL_H_ +#define UPB_REFLECTION_FILE_DEF_INTERNAL_H_ + + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +const upb_MiniTable_Extension* _upb_FileDef_ExtensionMiniTable( + const upb_FileDef* f, int i); +const int32_t* _upb_FileDef_PublicDependencyIndexes(const upb_FileDef* f); +const int32_t* _upb_FileDef_WeakDependencyIndexes(const upb_FileDef* f); + +// upb_FileDef_Package() returns "" if f->package is NULL, this does not. +const char* _upb_FileDef_RawPackage(const upb_FileDef* f); + +void _upb_FileDef_Create(upb_DefBuilder* ctx, + const google_protobuf_FileDescriptorProto* file_proto); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_REFLECTION_FILE_DEF_INTERNAL_H_ */ + +#ifndef UPB_REFLECTION_MESSAGE_DEF_INTERNAL_H_ +#define UPB_REFLECTION_MESSAGE_DEF_INTERNAL_H_ + + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +upb_MessageDef* _upb_MessageDef_At(const upb_MessageDef* m, int i); +bool _upb_MessageDef_InMessageSet(const upb_MessageDef* m); +bool _upb_MessageDef_Insert(upb_MessageDef* m, const char* name, size_t size, + upb_value v, upb_Arena* a); +void _upb_MessageDef_InsertField(upb_DefBuilder* ctx, upb_MessageDef* m, + const upb_FieldDef* f); +bool _upb_MessageDef_IsValidExtensionNumber(const upb_MessageDef* m, int n); +void _upb_MessageDef_LinkMiniTable(upb_DefBuilder* ctx, + const upb_MessageDef* m); +void _upb_MessageDef_Resolve(upb_DefBuilder* ctx, upb_MessageDef* m); + +// Allocate and initialize an array of |n| message defs. +upb_MessageDef* _upb_MessageDefs_New( + upb_DefBuilder* ctx, int n, const google_protobuf_DescriptorProto* const* protos, + const upb_MessageDef* containing_type); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_REFLECTION_MESSAGE_DEF_INTERNAL_H_ */ + +#ifndef UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_ +#define UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_ + + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +upb_ServiceDef* _upb_ServiceDef_At(const upb_ServiceDef* s, int i); + +// Allocate and initialize an array of |n| service defs. +upb_ServiceDef* _upb_ServiceDefs_New( + upb_DefBuilder* ctx, int n, + const google_protobuf_ServiceDescriptorProto* const* protos); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_ */ -#ifndef UPB_REFLECTION_DESC_STATE_H_ -#define UPB_REFLECTION_DESC_STATE_H_ +#ifndef UPB_REFLECTION_DESC_STATE_INTERNAL_H_ +#define UPB_REFLECTION_DESC_STATE_INTERNAL_H_ // Must be last. @@ -7199,7 +7276,84 @@ bool _upb_DescState_Grow(upb_DescState* d, upb_Arena* a); #endif -#endif /* UPB_REFLECTION_DESC_STATE_H_ */ +#endif /* UPB_REFLECTION_DESC_STATE_INTERNAL_H_ */ + +#ifndef UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_ +#define UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_ + + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +upb_ExtensionRange* _upb_ExtensionRange_At(const upb_ExtensionRange* r, int i); + +// Allocate and initialize an array of |n| extension ranges owned by |m|. +upb_ExtensionRange* _upb_ExtensionRanges_New( + upb_DefBuilder* ctx, int n, + const google_protobuf_DescriptorProto_ExtensionRange* const* protos, + const upb_MessageDef* m); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_ */ + +#ifndef UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_ +#define UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_ + + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +upb_OneofDef* _upb_OneofDef_At(const upb_OneofDef* o, int i); +bool _upb_OneofDef_Insert(upb_OneofDef* o, const upb_FieldDef* f, + const char* name, size_t size, upb_Arena* a); + +// Allocate and initialize an array of |n| oneof defs owned by |m|. +upb_OneofDef* _upb_OneofDefs_New( + upb_DefBuilder* ctx, int n, + const google_protobuf_OneofDescriptorProto* const* protos, upb_MessageDef* m); + +size_t _upb_OneofDefs_Finalize(upb_DefBuilder* ctx, upb_MessageDef* m); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_ */ + +#ifndef UPB_REFLECTION_METHOD_DEF_INTERNAL_H_ +#define UPB_REFLECTION_METHOD_DEF_INTERNAL_H_ + + +// Must be last. + +#ifdef __cplusplus +extern "C" { +#endif + +upb_MethodDef* _upb_MethodDef_At(const upb_MethodDef* m, int i); + +// Allocate and initialize an array of |n| method defs owned by |s|. +upb_MethodDef* _upb_MethodDefs_New( + upb_DefBuilder* ctx, int n, + const google_protobuf_MethodDescriptorProto* const* protos, upb_ServiceDef* s); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* UPB_REFLECTION_METHOD_DEF_INTERNAL_H_ */ // EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// From 7d1362c7ba96ef13de713869513ca32d79a02931 Mon Sep 17 00:00:00 2001 From: Kent Ross Date: Fri, 14 Oct 2022 16:28:18 -0700 Subject: [PATCH 07/15] Do not force C++14 (#10773) * Do not force C++14 Rather than forcing protobuf to always compile in exactly C++14, overriding all settings in .bazelrc and environment variables and commandline options, instead guard the codebase against versions that are too low. This allows for compiling in higher C++ standards, such as those that have std::string_view instead of absl::string_view without generating objects that are incompatible. * Do not guard headers against low C++ versions The code will break below C++14 anyway * Attempt a different >=C++14 guard condition * Steal the >=C++14 guard condition code from absl * Special case C++14 guard for GCC < 5.0 --- build_defs/cpp_opts.bzl | 2 -- src/google/protobuf/stubs/common.h | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/build_defs/cpp_opts.bzl b/build_defs/cpp_opts.bzl index a1d10aa23e..e0b031b092 100644 --- a/build_defs/cpp_opts.bzl +++ b/build_defs/cpp_opts.bzl @@ -14,14 +14,12 @@ COPTS = select({ "/wd4506", # no definition for inline function 'function' "/wd4800", # 'type' : forcing value to bool 'true' or 'false' (performance warning) "/wd4996", # The compiler encountered a deprecated declaration. - "/std:c++14", # Use C++14 ], "//conditions:default": [ "-DHAVE_ZLIB", "-Woverloaded-virtual", "-Wno-sign-compare", "-Werror", - "-std=c++14", # Protobuf requires C++14. ], }) # Android and MSVC builds do not need to link in a separate pthread library. diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h index cbcee3c926..4d9febcbd6 100644 --- a/src/google/protobuf/stubs/common.h +++ b/src/google/protobuf/stubs/common.h @@ -47,6 +47,24 @@ #include "google/protobuf/stubs/platform_macros.h" #include "google/protobuf/stubs/port.h" +// Enforce C++14 as the minimum. +#if defined(_MSVC_LANG) +#if _MSVC_LANG < 201402L +#error "C++ versions less than C++14 are not supported." +#endif // _MSVC_LANG < 201402L +#elif defined(__cplusplus) +// Special-case GCC < 5.0, as it has a strange __cplusplus value for C++14 +#if defined(__GNUC__) && __GNUC__ < 5 +#if __cplusplus < 201300L +#error "C++ versions less than C++14 are not supported." +#endif // __cplusplus < 201300L +#else // defined(__GNUC__) && __GNUC__ < 5 +#if __cplusplus < 201402L +#error "C++ versions less than C++14 are not supported." +#endif // __cplusplus < 201402L +#endif // defined(__GNUC__) && __GNUC__ < 5 +#endif + #ifndef PROTOBUF_USE_EXCEPTIONS #if defined(_MSC_VER) && defined(_CPPUNWIND) #define PROTOBUF_USE_EXCEPTIONS 1 From fb560680e91fce57c9c0de84636de2a5af438179 Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Mon, 17 Oct 2022 16:50:28 -0700 Subject: [PATCH 08/15] Csharp fixes --- csharp/build_release.sh | 6 +----- csharp/src/Google.Protobuf/Google.Protobuf.csproj | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/csharp/build_release.sh b/csharp/build_release.sh index f9fff223cb..1c3a9de002 100755 --- a/csharp/build_release.sh +++ b/csharp/build_release.sh @@ -6,9 +6,5 @@ cd $(dirname $(readlink $BASH_SOURCE)) set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true set DOTNET_CLI_TELEMETRY_OPTOUT=true -# Work around https://github.com/dotnet/core/issues/5881 -dotnet nuget locals all --clear - # Builds Google.Protobuf NuGet packages -dotnet restore src/Google.Protobuf.sln -dotnet pack -c Release src/Google.Protobuf.sln -p:ContinuousIntegrationBuild=true +dotnet pack --no-restore -c Release src/Google.Protobuf.sln -p:ContinuousIntegrationBuild=true diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.csproj b/csharp/src/Google.Protobuf/Google.Protobuf.csproj index 016218c2a6..c9f8b8dad8 100644 --- a/csharp/src/Google.Protobuf/Google.Protobuf.csproj +++ b/csharp/src/Google.Protobuf/Google.Protobuf.csproj @@ -1,4 +1,5 @@ + C# runtime library for Protocol Buffers - Google's data interchange format. From 79564c53afa334ddd5b793fc11386f20a7e23851 Mon Sep 17 00:00:00 2001 From: Mike Kruskal <62662355+mkruskal-google@users.noreply.github.com> Date: Mon, 17 Oct 2022 21:36:55 -0700 Subject: [PATCH 09/15] Add remote caching to bazel builds (#10767) * Add remote cache to linux builds * Remove BES flags * Remove BES flags from the right file * Migrate all Bazel kokoro builds to use remote caching * Remove BES logic * Fix mac ruby tests * Give mac/windows builds GCP access * Adding quotes to prevent issues with common flags * Adding command echoing in windows builds * Try enabling command echoing again * Adding invocation id for windows bazel build * Third try * Adding credentials to windows build --- kokoro/common/bazel_flags.sh | 46 ++++++++++++ kokoro/common/bazel_wrapper.sh | 71 ------------------- kokoro/linux/bazel.sh | 3 +- kokoro/macos/cpp/build.sh | 2 +- kokoro/macos/cpp/common.cfg | 22 ++++++ kokoro/macos/objectivec_ios_debug/common.cfg | 22 ++++++ .../macos/objectivec_ios_release/common.cfg | 22 ++++++ kokoro/macos/objectivec_osx/common.cfg | 22 ++++++ kokoro/macos/php74/common.cfg | 22 ++++++ kokoro/macos/php80/common.cfg | 22 ++++++ kokoro/macos/python/build.sh | 3 +- kokoro/macos/python/common.cfg | 22 ++++++ kokoro/macos/python_cpp/build.sh | 3 +- kokoro/macos/python_cpp/common.cfg | 22 ++++++ kokoro/macos/ruby25/common.cfg | 22 ++++++ kokoro/macos/ruby26/common.cfg | 22 ++++++ kokoro/macos/ruby27/common.cfg | 22 ++++++ kokoro/macos/ruby30/common.cfg | 22 ++++++ kokoro/macos/ruby31/common.cfg | 22 ++++++ kokoro/macos/test_php.sh | 4 +- kokoro/windows/bazel/build.bat | 10 ++- kokoro/windows/bazel/common.cfg | 22 ++++++ objectivec/DevTools/full_mac_build.sh | 3 +- ruby/travis-test.sh | 4 +- 24 files changed, 376 insertions(+), 81 deletions(-) create mode 100755 kokoro/common/bazel_flags.sh delete mode 100755 kokoro/common/bazel_wrapper.sh diff --git a/kokoro/common/bazel_flags.sh b/kokoro/common/bazel_flags.sh new file mode 100755 index 0000000000..6a2777fd25 --- /dev/null +++ b/kokoro/common/bazel_flags.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# Helper for setting up common bazel flags in Kokoro. +# +# This script prints extra flags to a bazel invocation when it is run from +# Kokoro. When the special environment variables are not present (e.g., if you +# run Kokoro build scripts locally), this script only flips some debug settings. +# +# Example of running directly: +# bazel test $(path/to/bazel_flags.sh) //... + +function bazel_flags::gen_invocation_id() { + # Create a new invocation ID and store in the artifacts dir. + local _invocation_id=$(uuidgen | tr A-Z a-z) + + # Put the new invocation ID at the start of the output IDs file. Some + # Google-internal tools only look at the first entry, so this ensures the most + # recent entry is first. + local _ids_file=${KOKORO_ARTIFACTS_DIR}/bazel_invocation_ids + local _temp_ids=$(mktemp) + echo ${_invocation_id} > ${_temp_ids} + [[ -e ${_ids_file} ]] && cat ${_ids_file} >> ${_temp_ids} + mv -f ${_temp_ids} ${_ids_file} + + echo -n ${_invocation_id} +} + +# Prints flags to use on Kokoro. +function bazel_flags::kokoro_flags() { + [[ -n ${KOKORO_JOB_NAME:-} ]] || return + + local -a _flags + _flags+=( + --invocation_id=$(bazel_flags::gen_invocation_id) + --remote_cache=https://storage.googleapis.com/protobuf-bazel-cache/${KOKORO_JOB_NAME} + ) + if [[ -n ${KOKORO_BAZEL_AUTH_CREDENTIAL:-} ]]; then + _flags+=( --google_credentials=${KOKORO_BAZEL_AUTH_CREDENTIAL} ) + else + _flags+=( --google_default_credentials=true ) + fi + + echo "${_flags[@]}" +} + +echo "$(bazel_flags::kokoro_flags) --keep_going --test_output=errors" diff --git a/kokoro/common/bazel_wrapper.sh b/kokoro/common/bazel_wrapper.sh deleted file mode 100755 index bd35396077..0000000000 --- a/kokoro/common/bazel_wrapper.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -# Wrapper for invoking bazel on Kokoro. -# -# This script adds extra flags to a bazel invocation when it is run from Kokoro. -# When the special environment variables are not present (e.g., if you run -# Kokoro build scripts locally), this script is equivalent to the "bazel" -# command. -# -# Example of running directly: -# path/to/bazel_wrapper.sh build //... -# -# Example of `source`ing: -# source path/to/bazel_wrapper.sh -# bazel_wrapper build //... - -function bazel_wrapper::gen_invocation_id() { - # Create a new invocation ID and store in the artifacts dir. - local _invocation_id=$(uuidgen | tr A-Z a-z) - - # Put the new invocation ID at the start of the output IDs file. Some - # Google-internal tools only look at the first entry, so this ensures the most - # recent entry is first. - local _ids_file=${KOKORO_ARTIFACTS_DIR}/bazel_invocation_ids - local _temp_ids=$(mktemp) - echo ${_invocation_id} > ${_temp_ids} - [[ -e ${_ids_file} ]] && cat ${_ids_file} >> ${_temp_ids} - mv -f ${_temp_ids} ${_ids_file} - - echo -n ${_invocation_id} -} - -# Prints flags to use on Kokoro. -function bazel_wrapper::kokoro_flags() { - [[ -n ${KOKORO_BES_PROJECT_ID:-} ]] || return - - local -a _flags - _flags+=( - --bes_backend=${KOKORO_BES_BACKEND_ADDRESS:-buildeventservice.googleapis.com} - --bes_results_url=https://source.cloud.google.com/results/invocations/ - --invocation_id=$(bazel_wrapper::gen_invocation_id) - --project_id=${KOKORO_BES_PROJECT_ID} # --bes_instance_name in Bazel 5+ - --remote_cache=https://storage.googleapis.com/protobuf-bazel-cache - ) - if [[ -n ${KOKORO_BAZEL_AUTH_CREDENTIAL:-} ]]; then - _flags+=( --google_credentials=${KOKORO_BAZEL_AUTH_CREDENTIAL} ) - else - _flags+=( --google_default_credentials=true ) - fi - - echo "${_flags[@]}" -} - -# Runs bazel with Kokoro flags, if appropriate. -function bazel_wrapper() { - local -a _flags - - # We might need to add flags. They need to come after any startup flags and - # the command, but before any terminating "--", so copy them into the _flags - # variable. - until (( ${#@} == 0 )) || [[ $1 == "--" ]]; do - _flags+=( "${1}" ); shift - done - - # Set the `BAZEL` env variable to override the actual bazel binary to use: - ${BAZEL:=bazel} "${_flags[@]}" $(bazel_wrapper::kokoro_flags) "${@}" -} - -# If this script was called directly, run bazel. Otherwise (i.e., this script -# was `source`d), the sourcing script will call bazel_wrapper themselves. -(( ${#BASH_SOURCE[@]} == 1 )) && bazel_wrapper "${@}" diff --git a/kokoro/linux/bazel.sh b/kokoro/linux/bazel.sh index d97bb3b005..9f1656978e 100755 --- a/kokoro/linux/bazel.sh +++ b/kokoro/linux/bazel.sh @@ -39,8 +39,7 @@ function run { -v $GIT_REPO_ROOT:/workspace \ $CONTAINER_IMAGE \ test \ - --keep_going \ - --test_output=streamed \ + $(${GIT_REPO_ROOT}/kokoro/common/bazel_flags.sh) \ ${ENVS[@]} \ $PLATFORM_CONFIG \ $BAZEL_CONFIG \ diff --git a/kokoro/macos/cpp/build.sh b/kokoro/macos/cpp/build.sh index 7c21d4856d..9c3b8aa156 100755 --- a/kokoro/macos/cpp/build.sh +++ b/kokoro/macos/cpp/build.sh @@ -14,4 +14,4 @@ source kokoro/macos/prepare_build_macos_rc # # Run build # -bazel test //src/... -k --test_output=streamed +bazel test $(kokoro/common/bazel_flags.sh) //src/... diff --git a/kokoro/macos/cpp/common.cfg b/kokoro/macos/cpp/common.cfg index 4bea1cbbb1..26515517a9 100644 --- a/kokoro/macos/cpp/common.cfg +++ b/kokoro/macos/cpp/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/cpp/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/objectivec_ios_debug/common.cfg b/kokoro/macos/objectivec_ios_debug/common.cfg index 473d54554a..b4ccc45831 100644 --- a/kokoro/macos/objectivec_ios_debug/common.cfg +++ b/kokoro/macos/objectivec_ios_debug/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/objectivec_ios_debug/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/objectivec_ios_release/common.cfg b/kokoro/macos/objectivec_ios_release/common.cfg index 3cbfb685d8..3a6ac86716 100644 --- a/kokoro/macos/objectivec_ios_release/common.cfg +++ b/kokoro/macos/objectivec_ios_release/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/objectivec_ios_release/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/objectivec_osx/common.cfg b/kokoro/macos/objectivec_osx/common.cfg index 41bd46aa87..ee5c2db34f 100644 --- a/kokoro/macos/objectivec_osx/common.cfg +++ b/kokoro/macos/objectivec_osx/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/objectivec_osx/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/php74/common.cfg b/kokoro/macos/php74/common.cfg index cf7e80beb8..b9d5b822d6 100644 --- a/kokoro/macos/php74/common.cfg +++ b/kokoro/macos/php74/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/php74/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/php80/common.cfg b/kokoro/macos/php80/common.cfg index ded43e62c5..294fd52a00 100644 --- a/kokoro/macos/php80/common.cfg +++ b/kokoro/macos/php80/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/php80/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/python/build.sh b/kokoro/macos/python/build.sh index f1ea3aaf12..de3db88c67 100755 --- a/kokoro/macos/python/build.sh +++ b/kokoro/macos/python/build.sh @@ -9,4 +9,5 @@ cd $(dirname $0)/../../.. KOKORO_INSTALL_VENV=yes source kokoro/macos/prepare_build_macos_rc -bazel test //python/... @upb//python/... -k --macos_minimum_os=10.9 --test_output=streamed +bazel test //python/... @upb//python/... $(kokoro/common/bazel_flags.sh) \ + --macos_minimum_os=10.9 diff --git a/kokoro/macos/python/common.cfg b/kokoro/macos/python/common.cfg index ac3cbeebf5..dd9f8ac00a 100644 --- a/kokoro/macos/python/common.cfg +++ b/kokoro/macos/python/common.cfg @@ -9,3 +9,25 @@ action { regex: "**/*" } } + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/python_cpp/build.sh b/kokoro/macos/python_cpp/build.sh index ae480a5a06..8f94fcf9a8 100755 --- a/kokoro/macos/python_cpp/build.sh +++ b/kokoro/macos/python_cpp/build.sh @@ -9,4 +9,5 @@ cd $(dirname $0)/../../.. KOKORO_INSTALL_VENV=yes source kokoro/macos/prepare_build_macos_rc -bazel test //python/... -k --macos_minimum_os=10.9 --test_output=streamed --define=use_fast_cpp_protos=true +bazel test //python/... $(kokoro/common/bazel_flags.sh) \ + --macos_minimum_os=10.9 --define=use_fast_cpp_protos=true diff --git a/kokoro/macos/python_cpp/common.cfg b/kokoro/macos/python_cpp/common.cfg index 22f4a0e4c9..12270c531f 100644 --- a/kokoro/macos/python_cpp/common.cfg +++ b/kokoro/macos/python_cpp/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/python_cpp/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/ruby25/common.cfg b/kokoro/macos/ruby25/common.cfg index b3755e4104..ba17345259 100644 --- a/kokoro/macos/ruby25/common.cfg +++ b/kokoro/macos/ruby25/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/ruby25/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/ruby26/common.cfg b/kokoro/macos/ruby26/common.cfg index 688f63c2bc..deeaf51932 100644 --- a/kokoro/macos/ruby26/common.cfg +++ b/kokoro/macos/ruby26/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/ruby26/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/ruby27/common.cfg b/kokoro/macos/ruby27/common.cfg index b10b455da3..1451eb04ed 100644 --- a/kokoro/macos/ruby27/common.cfg +++ b/kokoro/macos/ruby27/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/ruby27/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/ruby30/common.cfg b/kokoro/macos/ruby30/common.cfg index d5051170be..79dc7a531a 100644 --- a/kokoro/macos/ruby30/common.cfg +++ b/kokoro/macos/ruby30/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/ruby30/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/ruby31/common.cfg b/kokoro/macos/ruby31/common.cfg index 19e16b3eaf..e2d1d1b83e 100644 --- a/kokoro/macos/ruby31/common.cfg +++ b/kokoro/macos/ruby31/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/macos/ruby31/build.sh" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/kokoro/macos/test_php.sh b/kokoro/macos/test_php.sh index 933b251101..74d88f6a36 100755 --- a/kokoro/macos/test_php.sh +++ b/kokoro/macos/test_php.sh @@ -11,4 +11,6 @@ composer test_c popd git clean -fXd -bazel test //php:conformance_test_c --action_env=PATH --test_env=PATH --test_output=streamed +bazel test $(kokoro/common/bazel_flags.sh) \ + --action_env=PATH --test_env=PATH \ + //php:conformance_test_c diff --git a/kokoro/windows/bazel/build.bat b/kokoro/windows/bazel/build.bat index 9b4e448f18..a783a075dd 100644 --- a/kokoro/windows/bazel/build.bat +++ b/kokoro/windows/bazel/build.bat @@ -13,9 +13,17 @@ bazel version choco install bazel -y -i --version 5.1.0 bazel version +@rem Set invocation ID so that bazel run is known to kokoro +uuidgen > %KOKORO_ARTIFACTS_DIR%\bazel_invocation_ids +SET /p BAZEL_INTERNAL_INVOCATION_ID=<%KOKORO_ARTIFACTS_DIR%\bazel_invocation_ids + @rem Make paths as short as possible to avoid long path issues. set BAZEL_STARTUP=--output_user_root=C:/tmp --windows_enable_symlinks -set BAZEL_FLAGS=--enable_runfiles --keep_going --test_output=streamed --verbose_failures +set BAZEL_FLAGS=--enable_runfiles --keep_going --test_output=errors ^ + --verbose_failures ^ + --invocation_id=%BAZEL_INTERNAL_INVOCATION_ID% ^ + --google_credentials=%KOKORO_BAZEL_AUTH_CREDENTIAL% ^ + --remote_cache=https://storage.googleapis.com/protobuf-bazel-cache/%KOKORO_JOB_NAME% @rem Build libraries first. bazel %BAZEL_STARTUP% build //:protoc //:protobuf //:protobuf_lite %BAZEL_FLAGS% || goto :error diff --git a/kokoro/windows/bazel/common.cfg b/kokoro/windows/bazel/common.cfg index 5978a7aa0d..52703cc16f 100644 --- a/kokoro/windows/bazel/common.cfg +++ b/kokoro/windows/bazel/common.cfg @@ -3,3 +3,25 @@ # Location of the build script in repository build_file: "protobuf/kokoro/windows/bazel/build.bat" timeout_mins: 1440 + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } + } +} +bazel_setting { + project_id: "protobuf-build" + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" + local_execution: true + + # Need to be same as the fetch_keystore entry in the previous step. + auth_credential: { + keystore_config_id: 77103 + keyname: "kokoro_gcp_service" + } +} diff --git a/objectivec/DevTools/full_mac_build.sh b/objectivec/DevTools/full_mac_build.sh index 95e8e5b80f..afff93d3d8 100755 --- a/objectivec/DevTools/full_mac_build.sh +++ b/objectivec/DevTools/full_mac_build.sh @@ -8,7 +8,8 @@ set -eu # Some base locations. readonly ScriptDir=$(dirname "$(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")") readonly ProtoRootDir="${ScriptDir}/../.." -readonly BazelFlags="-k --announce_rc --test_output=errors --macos_minimum_os=10.9" +readonly BazelFlags="--announce_rc --macos_minimum_os=10.9 \ + $(${ScriptDir}/../../kokoro/common/bazel_flags.sh)" # Invoke with BAZEL=bazelisk to use that instead. readonly BazelBin="${BAZEL:=bazel}" diff --git a/ruby/travis-test.sh b/ruby/travis-test.sh index 6e9c612380..39f58a23d4 100755 --- a/ruby/travis-test.sh +++ b/ruby/travis-test.sh @@ -5,8 +5,8 @@ set -ex test_version() { version=$1 - bazel_args=" \ - -k --test_output=streamed \ + bazel_args="\ + $(../kokoro/common/bazel_flags.sh) \ --action_env=PATH \ --action_env=GEM_PATH \ --action_env=GEM_HOME \ From 36f168f046007361d70556ae95a1ab532fd49683 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 18 Oct 2022 14:41:03 -0700 Subject: [PATCH 10/15] Update zlib to 1.2.13. This pulls in the fix for CVE-2022-37434. --- protobuf_deps.bzl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/protobuf_deps.bzl b/protobuf_deps.bzl index 83e6eeaece..9c6956706b 100644 --- a/protobuf_deps.bzl +++ b/protobuf_deps.bzl @@ -49,9 +49,12 @@ def protobuf_deps(): http_archive( name = "zlib", build_file = "@com_google_protobuf//:third_party/zlib.BUILD", - sha256 = "d8688496ea40fb61787500e863cc63c9afcbc524468cedeb478068924eb54932", - strip_prefix = "zlib-1.2.12", - urls = ["https://github.com/madler/zlib/archive/v1.2.12.tar.gz"], + sha256 = "d14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98", + strip_prefix = "zlib-1.2.13", + urls = [ + "https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.xz", + "https://zlib.net/zlib-1.2.13.tar.xz", + ], ) if not native.existing_rule("jsoncpp"): From c302d90db52e4661365eebc9a2f58fb3c9213c7c Mon Sep 17 00:00:00 2001 From: Mike Kruskal <62662355+mkruskal-google@users.noreply.github.com> Date: Wed, 19 Oct 2022 08:28:05 -0700 Subject: [PATCH 11/15] Merge 21.8 into main (#10788) * Force uninstall protobuf in python macos builds We are seeing failures in brew uninstall protobuf due to no package. Change this to a force install to avoid the error. * Fix spelling errors (#10717) * Merge pull request #10200 from tonydnewell/bugfix/protobuf-7474 Fix for grpc.tools #17995 & protobuf #7474 (handle UTF-8 paths in argumentfile) * Upgrade to kotlin 1.6 * 21.x No longer define no_threadlocal on OpenBSD * Upgrade kokoro to Xcode 14 (#10732) * Upgrade kokoro to Xcode 14 * Fix osx errors * Merge pull request #10770 from protocolbuffers/googleberg-cl-480629524 Mark default instance as immutable first to avoid race during static initialization of default instances. * Auto capitalize enums name in Ruby (#10454) (#10763) This closes #1965. * Edit toolchain to work with absl dep * Bump upb to latest version after fixes applied (#10783) * 21.x 202210180838 (#10785) * Updating version.json and repo version numbers to: 21.8 * Update changelog Co-authored-by: Protobuf Team Bot * Update generated protos Co-authored-by: deannagarcia <69992229+deannagarcia@users.noreply.github.com> Co-authored-by: Matt Fowles Kulukundis Co-authored-by: Deanna Garcia Co-authored-by: Brad Smith Co-authored-by: Jerry Berg <107155935+googleberg@users.noreply.github.com> Co-authored-by: tison Co-authored-by: Protobuf Team Bot --- .github/workflows/codespell.yml | 2 +- CHANGES.txt | 14 +++++++++++ Protobuf-C++.podspec | 2 +- Protobuf.podspec | 2 +- csharp/Google.Protobuf.Tools.nuspec | 2 +- .../TestMessagesProto2.cs | 5 ++-- csharp/src/Google.Protobuf.Test/testprotos.pb | Bin 346639 -> 346667 bytes .../Google.Protobuf/Google.Protobuf.csproj | 2 +- java/README.md | 6 ++--- java/bom/pom.xml | 2 +- java/core/pom.xml | 2 +- java/kotlin-lite/pom.xml | 2 +- java/kotlin/pom.xml | 2 +- java/lite.md | 2 +- java/lite/pom.xml | 2 +- java/pom.xml | 2 +- java/util/pom.xml | 2 +- php/ext/google/protobuf/package.xml | 23 +++++++++++++++--- php/ext/google/protobuf/protobuf.h | 2 +- protobuf_version.bzl | 6 ++--- python/google/protobuf/__init__.py | 2 +- ruby/google-protobuf.gemspec | 2 +- ruby/pom.xml | 4 +-- src/google/protobuf/any.pb.h | 2 +- src/google/protobuf/api.pb.h | 2 +- src/google/protobuf/compiler/plugin.pb.h | 2 +- src/google/protobuf/descriptor.pb.h | 2 +- src/google/protobuf/duration.pb.h | 2 +- src/google/protobuf/empty.pb.h | 2 +- src/google/protobuf/field_mask.pb.h | 2 +- src/google/protobuf/port_def.inc | 2 +- src/google/protobuf/source_context.pb.h | 2 +- src/google/protobuf/struct.pb.h | 2 +- src/google/protobuf/stubs/common.h | 2 +- src/google/protobuf/timestamp.pb.h | 2 +- src/google/protobuf/type.pb.h | 2 +- src/google/protobuf/wrappers.pb.h | 2 +- 37 files changed, 74 insertions(+), 44 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index d056ecc454..b32c0a2647 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -13,4 +13,4 @@ jobs: with: check_filenames: true skip: ./.git,./conformance/third_party,*.snk,*.pb,*.pb.cc,*.pb.h,./src/google/protobuf/testdata,./objectivec/Tests,./python/compatibility_tests/v2.5.0/tests/google/protobuf/internal,./.github/workflows/codespell.yml - ignore_words_list: "alow,alse,ba,chec,cleare,copyable,cloneable,dedup,dur,errorprone,files',fo,fundementals,hel,importd,inout,leapyear,nd,nin,ois,ons,parseable,process',te,testof,ue,unparseable,wasn,wee,gae,keyserver,objext,od,optin,streem,sur,falsy" + ignore_words_list: "alow,alse,ba,chec,cleare,copyable,cloneable,dedup,dur,errorprone,falsy,files',fo,fundementals,hel,importd,inout,leapyear,nd,nin,ois,ons,parseable,process',ro,te,testof,ue,unparseable,wasn,wee,gae,keyserver,objext,od,optin,streem,sur,falsy" diff --git a/CHANGES.txt b/CHANGES.txt index 4d9d344336..c110dcbffe 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -67,6 +67,20 @@ Compiler * Print full path name of source .proto file on error +2022-10-18 version 21.8 (C++/Java/Python/PHP/Objective-C/C#/Ruby) + + Other + * Fix for grpc.tools #17995 & protobuf #7474 (handle UTF-8 paths in argumentfile) (#10721) + + C++ + * 21.x No longer define no_threadlocal on OpenBSD (#10743) + + Java + * Mark default instance as immutable first to avoid race during static initialization of default instances (#10771) + + Ruby + * Auto capitalize enums name in Ruby (#10454) (#10763) + 2022-09-29 version 21.7 (C++/Java/Python/PHP/Objective-C/C#/Ruby) Java * Refactoring java full runtime to reuse sub-message builders and prepare to diff --git a/Protobuf-C++.podspec b/Protobuf-C++.podspec index 55d6d1b403..54a962d13e 100644 --- a/Protobuf-C++.podspec +++ b/Protobuf-C++.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Protobuf-C++' - s.version = '3.21.7' + s.version = '3.21.8' s.summary = 'Protocol Buffers v3 runtime library for C++.' s.homepage = 'https://github.com/google/protobuf' s.license = 'BSD-3-Clause' diff --git a/Protobuf.podspec b/Protobuf.podspec index d60e531b17..48fceea36f 100644 --- a/Protobuf.podspec +++ b/Protobuf.podspec @@ -5,7 +5,7 @@ # dependent projects use the :git notation to refer to the library. Pod::Spec.new do |s| s.name = 'Protobuf' - s.version = '3.21.7' + s.version = '3.21.8' s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.' s.homepage = 'https://github.com/protocolbuffers/protobuf' s.license = 'BSD-3-Clause' diff --git a/csharp/Google.Protobuf.Tools.nuspec b/csharp/Google.Protobuf.Tools.nuspec index 54a8d0cf82..64f78d0b3e 100644 --- a/csharp/Google.Protobuf.Tools.nuspec +++ b/csharp/Google.Protobuf.Tools.nuspec @@ -5,7 +5,7 @@ Google Protocol Buffers tools Tools for Protocol Buffers - Google's data interchange format. See project site for more info. - 3.21.7 + 3.21.8 Google Inc. protobuf-packages https://github.com/protocolbuffers/protobuf/blob/main/LICENSE diff --git a/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs b/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs index d5734552c0..bbfe2e057b 100644 --- a/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs +++ b/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs @@ -218,8 +218,9 @@ namespace ProtobufTestMessages.Proto2 { "GAIgASgJEhAKCHJlcXVpcmVzGAMgAygJKkYKEUZvcmVpZ25FbnVtUHJvdG8y", "Eg8KC0ZPUkVJR05fRk9PEAASDwoLRk9SRUlHTl9CQVIQARIPCgtGT1JFSUdO", "X0JBWhACOkoKD2V4dGVuc2lvbl9pbnQzMhIxLnByb3RvYnVmX3Rlc3RfbWVz", - "c2FnZXMucHJvdG8yLlRlc3RBbGxUeXBlc1Byb3RvMhh4IAEoBUIvCihjb20u", - "Z29vZ2xlLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8ySAH4AQE=")); + "c2FnZXMucHJvdG8yLlRlc3RBbGxUeXBlc1Byb3RvMhh4IAEoBUI4Cihjb20u", + "Z29vZ2xlLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8ySAH4AQGiAgZQ", + "cm90bzI=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ProtobufTestMessages.Proto2.ForeignEnumProto2), }, new pb::Extension[] { TestMessagesProto2Extensions.ExtensionInt32 }, new pbr::GeneratedClrTypeInfo[] { diff --git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q17WiB;>A#b9o5B9ec-7shUx=Pbum;Qc&hb$$;^9dJxoByv>v7pJ=1!a zKJ=bi&reZc6AHL$LlpkWN5TfEfR1VdRDbeR8=(4=kAw{r>Q6orE{VcFd!|cZ0y?Hk zVEVIRO6J8&p!&0?x&*2}d#a65_!m#L5h|dg+6dKOe4#eN^cT;x5vIR*CMx?^WiNbX zG&kJBzZN}J5vsp>Dp@i8)gP|$qc*UMi|tE!`ZwV+zb;(L`;~$VDTeHCLgt<)`8mvY z7`nef=f4?maj`0t+XGNA)Iy32&_ z??P8J_Lm9Y-zDxHhVSp5?{Xf0?5lgZ@PQrQ<-+%|FW%)s_pvz7&|S_;rQp>G5`lHquggoe-*#dGuyMs^(s5c1}zz!$aaiS!w>uCpjNd5Uc#u1LVj){2a+oi$Ckbq(4y)$oLR*r6%3;;# zSZ{*=4y)s)CL%?$$gP2YtI%AWO)#V+xUCTxsQSPC)`$d1|1CAMF?DwEsPIAJ=)tbv5%&b5jUgPsp+@fHY zSuTWK<1>S<^_j&M=<@Oa2yt0~+vd6Jb!IEYEAah6%5#I}WhkysEs$ry|yRvAgF+jN`|C*_bpI!JEmUSUowGE)$4BN zY(Kf>&v%Z^;Ufs9^s~o6VwTSycd|v+GSlqP)#fADJceqA=9_$S9wR7slh(2AMqtQD zaK#EJ)=j>K0bDm}yQm^FTsP^?GOfTRw>leh1>%pJv|EFbosuQiGQ1`KU=F|IXxmp3 zj5rCVt0W1??{wdiP7opcqc4g|Y2^PFie-r^5;6@6`ZkDteO&?Ylv zyR`i=2nf|KU2T?#a{YksH>WMnyZi#3U*sk@-+nf$P4dEYvu}Cc<_C5$;lC# runtime library for Protocol Buffers - Google's data interchange format. Copyright 2015, Google Inc. Google Protocol Buffers - 3.21.7 + 3.21.8 10.0 Google Inc. netstandard1.1;netstandard2.0;net45;net50 diff --git a/java/README.md b/java/README.md index 0b56993b36..798ce212f6 100644 --- a/java/README.md +++ b/java/README.md @@ -23,7 +23,7 @@ If you are using Maven, use the following: com.google.protobuf protobuf-java - 3.21.7 + 3.21.8 ``` @@ -37,7 +37,7 @@ protobuf-java-util package: com.google.protobuf protobuf-java-util - 3.21.7 + 3.21.8 ``` @@ -45,7 +45,7 @@ protobuf-java-util package: If you are using Gradle, add the following to your `build.gradle` file's dependencies: ``` - implementation 'com.google.protobuf:protobuf-java:3.21.7' + implementation 'com.google.protobuf:protobuf-java:3.21.8' ``` Again, be sure to check that the version number matches (or is newer than) the version number of protoc that you are using. diff --git a/java/bom/pom.xml b/java/bom/pom.xml index dc655626c3..ebbad006ea 100644 --- a/java/bom/pom.xml +++ b/java/bom/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-bom - 3.21.7 + 3.21.8 pom Protocol Buffers [BOM] diff --git a/java/core/pom.xml b/java/core/pom.xml index a6da8c850e..bedb61b915 100644 --- a/java/core/pom.xml +++ b/java/core/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.7 + 3.21.8 protobuf-java diff --git a/java/kotlin-lite/pom.xml b/java/kotlin-lite/pom.xml index 60bd0d4a1d..ace12aa6fa 100644 --- a/java/kotlin-lite/pom.xml +++ b/java/kotlin-lite/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.7 + 3.21.8 protobuf-kotlin-lite diff --git a/java/kotlin/pom.xml b/java/kotlin/pom.xml index d0f4c2d3ab..27be007720 100644 --- a/java/kotlin/pom.xml +++ b/java/kotlin/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.7 + 3.21.8 protobuf-kotlin diff --git a/java/lite.md b/java/lite.md index bd9c5a5bb8..87b917a7bd 100644 --- a/java/lite.md +++ b/java/lite.md @@ -29,7 +29,7 @@ protobuf Java Lite runtime. If you are using Maven, include the following: com.google.protobuf protobuf-javalite - 3.21.7 + 3.21.8 ``` diff --git a/java/lite/pom.xml b/java/lite/pom.xml index a78ff979b3..69bd30cc09 100644 --- a/java/lite/pom.xml +++ b/java/lite/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.7 + 3.21.8 protobuf-javalite diff --git a/java/pom.xml b/java/pom.xml index 8b304fa570..ad8628219b 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.7 + 3.21.8 pom Protocol Buffers [Parent] diff --git a/java/util/pom.xml b/java/util/pom.xml index 31fcbf269b..1c0ee7b687 100644 --- a/java/util/pom.xml +++ b/java/util/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.7 + 3.21.8 protobuf-java-util diff --git a/php/ext/google/protobuf/package.xml b/php/ext/google/protobuf/package.xml index 3a9f4250d9..462b405bd5 100644 --- a/php/ext/google/protobuf/package.xml +++ b/php/ext/google/protobuf/package.xml @@ -10,11 +10,11 @@ protobuf-packages@google.com yes - 2022-09-29 - + 2022-10-13 + - 3.21.7 - 3.21.7 + 3.21.8 + 3.21.8 stable @@ -1434,5 +1434,20 @@ G A release. + + + 3.21.8 + 3.21.8 + + + stable + stable + + 2022-10-13 + + BSD-3-Clause + + + diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h index 77b61c2358..14bd16c40d 100644 --- a/php/ext/google/protobuf/protobuf.h +++ b/php/ext/google/protobuf/protobuf.h @@ -127,7 +127,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_setter, 0, 0, 1) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -#define PHP_PROTOBUF_VERSION "3.21.7" +#define PHP_PROTOBUF_VERSION "3.21.8" // ptr -> PHP object cache. This is a weak map that caches lazily-created // wrapper objects around upb types: diff --git a/protobuf_version.bzl b/protobuf_version.bzl index bf6ec169ac..cc6cf85c55 100644 --- a/protobuf_version.bzl +++ b/protobuf_version.bzl @@ -1,3 +1,3 @@ -PROTOC_VERSION = "21.7" -PROTOBUF_JAVA_VERSION = "3.21.7" -PROTOBUF_PYTHON_VERSION = "4.21.7" +PROTOC_VERSION = "21.8" +PROTOBUF_JAVA_VERSION = "3.21.8" +PROTOBUF_PYTHON_VERSION = "4.21.8" diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py index 70d564a90a..6b0df47af0 100644 --- a/python/google/protobuf/__init__.py +++ b/python/google/protobuf/__init__.py @@ -30,4 +30,4 @@ # Copyright 2007 Google Inc. All Rights Reserved. -__version__ = '4.21.7' +__version__ = '4.21.8' diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec index 692264ca47..5f226b0fec 100644 --- a/ruby/google-protobuf.gemspec +++ b/ruby/google-protobuf.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = "google-protobuf" - s.version = "3.21.7" + s.version = "3.21.8" git_tag = "v#{s.version.to_s.sub('.rc.', '-rc')}" # Converts X.Y.Z.rc.N to vX.Y.Z-rcN, used for the git tag s.licenses = ["BSD-3-Clause"] s.summary = "Protocol Buffers" diff --git a/ruby/pom.xml b/ruby/pom.xml index 15fddeb352..c533dd7848 100644 --- a/ruby/pom.xml +++ b/ruby/pom.xml @@ -9,7 +9,7 @@ com.google.protobuf.jruby protobuf-jruby - 3.21.7 + 3.21.8 Protocol Buffer JRuby native extension Protocol Buffers are a way of encoding structured data in an efficient yet @@ -76,7 +76,7 @@ com.google.protobuf protobuf-java-util - 3.21.7 + 3.21.8 org.jruby diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 3d1e46fcc0..9921be577b 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 2f9a865ec3..cbfd5fce93 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index 41403cf89f..d86c27078b 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index 46c3c13c34..f592e76565 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index 2c1a5503b6..a3f393a931 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index c8c03c3e5e..807dc9cd19 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index 13fe9cfdb3..3a181fd5df 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index 021ac4f587..bac7b9038b 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -221,7 +221,7 @@ #ifdef PROTOBUF_VERSION #error PROTOBUF_VERSION was previously defined #endif -#define PROTOBUF_VERSION 3021007 +#define PROTOBUF_VERSION 3021008 #ifdef PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC #error PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC was previously defined diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 21d2fc23a0..5517333da8 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index b31f206529..5b0fe1bb36 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h index 4d9febcbd6..78bb9258df 100644 --- a/src/google/protobuf/stubs/common.h +++ b/src/google/protobuf/stubs/common.h @@ -99,7 +99,7 @@ namespace internal { // The current version, represented as a single integer to make comparison // easier: major * 10^6 + minor * 10^3 + micro -#define GOOGLE_PROTOBUF_VERSION 3021007 +#define GOOGLE_PROTOBUF_VERSION 3021008 // A suffix string for alpha, beta or rc releases. Empty for stable releases. #define GOOGLE_PROTOBUF_VERSION_SUFFIX "" diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index 64f0d59d0e..d752b99617 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index a630ba635e..423cede905 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index 48f4496c70..85837b8cb1 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h @@ -15,7 +15,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 3021007 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021008 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." From 7d1f2a72c09e7c7e0b21f561b32faa7625bdb0a8 Mon Sep 17 00:00:00 2001 From: deannagarcia <69992229+deannagarcia@users.noreply.github.com> Date: Wed, 19 Oct 2022 15:58:58 -0700 Subject: [PATCH 12/15] Fix C# Builds We need to call `dotnet restore` in order to properly setup the libraries to pack. The docker image we are using will save the packages in `/lib/csharp` --- csharp/build_release.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/csharp/build_release.sh b/csharp/build_release.sh index 1c3a9de002..8a641b21b3 100755 --- a/csharp/build_release.sh +++ b/csharp/build_release.sh @@ -7,4 +7,5 @@ set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true set DOTNET_CLI_TELEMETRY_OPTOUT=true # Builds Google.Protobuf NuGet packages +dotnet restore -s /lib/csharp/ src/Google.Protobuf/Google.Protobuf.csproj dotnet pack --no-restore -c Release src/Google.Protobuf.sln -p:ContinuousIntegrationBuild=true From c1202610e06393c1e2b9853592d1b62b7c99a7c5 Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Wed, 19 Oct 2022 16:13:56 -0700 Subject: [PATCH 13/15] Updating changelog --- CHANGES.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index c110dcbffe..52eee948ef 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -37,6 +37,12 @@ * Introduce the Printer::{SetRedactDebugString,SetRandomizeDebugString} private flags. * Introduce global flags to control Printer::{SetRedactDebugString, SetRandomizeDebugString}. * proto3 string fields no longer trigger clang-tidy warning bugprone-branch-clone. + * Fix the API of DescriptorUpgrader::set_allow_unknown_dependencies to set to True always, and to populate into the DescriptorPool as well. + * Report line numbers consistently in text-format deprecated-field warnings. + * Reserve C++20 keywords + * Fixed C++ code generation for protos that use int32_t, uint32_t, int64_t, uint64_t, size_t as field names. + * Annotate generated C++ public aliases for enum types. + * Change default arena max block size from 8K to 32K. Kotlin @@ -57,6 +63,12 @@ * Make message-type extensions merge from wire-format instead of building up instances and merging afterwards. This has much better performance. * Change the Lite runtime to prefer merging from the wireformat into mutable messages rather than building up a new immutable object before merging. This way results in fewer allocations and copy operations. * Move proto wireformat parsing functionality from the private "parsing constructor" to the Builder class. + * Refactoring java full runtime to reuse sub-message builders and prepare to migrate parsing logic from parse constructor to builder. + * Move proto wireformat parsing functionality from the private "parsing constructor" to the Builder class. + * Change the Lite runtime to prefer merging from the wireformat into mutable messages rather than building up a new immutable object before merging. This way results in fewer allocations and copy operations. + * Make message-type extensions merge from wire-format instead of building up instances and merging afterwards. This has much better performance. + * Fix TextFormat parser to build up recurring (but supposedly not repeated) sub-messages directly from text rather than building a new sub-message and merging the fully formed message into the existing field. + * Fix bug in nested builder caching logic where cleared sub-field builders would remain dirty after a clear and build in a parent layer. https://github.com/protocolbuffers/protobuf/issues/10624 Python * Changes ordering of printed fields in .pyi files from lexicographic to the same ordering found in the proto descriptor. @@ -66,6 +78,7 @@ Compiler * Print full path name of source .proto file on error + * Include proto message type in the annotation comments. 2022-10-18 version 21.8 (C++/Java/Python/PHP/Objective-C/C#/Ruby) From fcd3b9a85ef36e46643dc30176cea1a7ad62e02b Mon Sep 17 00:00:00 2001 From: deannagarcia <69992229+deannagarcia@users.noreply.github.com> Date: Fri, 21 Oct 2022 18:40:47 +0000 Subject: [PATCH 14/15] Target macOS 10.9 (#10802) Update toolchain to target macosx 10.9 to fix https://github.com/protocolbuffers/protobuf/issues/10799 --- toolchain/BUILD.bazel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/BUILD.bazel b/toolchain/BUILD.bazel index 20a435c76f..5bc8c8a030 100644 --- a/toolchain/BUILD.bazel +++ b/toolchain/BUILD.bazel @@ -102,7 +102,7 @@ cc_toolchain_config( linker_path = "/usr/tools", sysroot = "/usr/tools/xcode_14_0/macosx", target_cpu = "aarch64", - target_full_name = "aarch64-apple-macosx11.3", + target_full_name = "aarch64-apple-macosx10.9", ) cc_toolchain_config( @@ -119,7 +119,7 @@ cc_toolchain_config( linker_path = "/usr/tools", sysroot = "/usr/tools/xcode_14_0/macosx", target_cpu = "x86_64", - target_full_name = "x86_64-apple-macosx11.3", + target_full_name = "x86_64-apple-macosx10.9", ) cc_toolchain_config( From 449b6e860f52f2e166790295e599826348edd5c2 Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Wed, 19 Oct 2022 16:19:03 -0700 Subject: [PATCH 15/15] Fixing merge issues --- .bazelrc | 34 +++++++++++++++ CMakeLists.txt | 4 ++ cmake/protobuf-config.cmake.in | 1 + cmake/utf8_range.cmake | 8 ++-- kokoro/windows/prepare_build_win64.bat | 2 +- protobuf_deps.bzl | 4 +- python/google/protobuf/pyext/message.cc | 1 - python/setup.py | 2 + .../compiler/csharp/csharp_map_field.cc | 2 +- .../generated_message_tctable_lite.cc | 42 +++++++++++-------- third_party/utf8_range | 2 +- 11 files changed, 76 insertions(+), 26 deletions(-) diff --git a/.bazelrc b/.bazelrc index 554440cfe3..de30d6b48c 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1 +1,35 @@ build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 + +build:dbg --compilation_mode=dbg + +build:opt --compilation_mode=opt + +build:san-common --config=dbg --strip=never --copt=-O0 --copt=-fno-omit-frame-pointer + +build:asan --config=san-common --copt=-fsanitize=address --linkopt=-fsanitize=address +build:asan --copt=-DADDRESS_SANITIZER=1 +# ASAN hits ODR violations with shared linkage due to rules_proto. +build:asan --dynamic_mode=off + +build:msan --config=san-common --copt=-fsanitize=memory --linkopt=-fsanitize=memory +build:msan --copt=-fsanitize-memory-track-origins +build:msan --copt=-fsanitize-memory-use-after-dtor +build:msan --action_env=MSAN_OPTIONS=poison_in_dtor=1 +build:msan --copt=-DMEMORY_SANITIZER=1 + +# Use our instrumented LLVM libc++ in Kokoro. +build:kokoro-msan --config=msan +build:kokoro-msan --linkopt=-L/opt/libcxx_msan/lib +build:kokoro-msan --linkopt=-Wl,-rpath,/opt/libcxx_msan/lib +build:kokoro-msan --cxxopt=-stdlib=libc++ --linkopt=-stdlib=libc++ + + +build:tsan --config=san-common --copt=-fsanitize=thread --linkopt=-fsanitize=thread +build:tsan --copt=-DTHREAD_SANITIZER=1 + +build:ubsan --config=san-common --copt=-fsanitize=undefined --linkopt=-fsanitize=undefined +build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 +build:ubsan --copt=-DUNDEFINED_SANITIZER=1 +# Workaround for the fact that Bazel links with $CC, not $CXX +# https://github.com/bazelbuild/bazel/issues/11122#issuecomment-613746748 +build:ubsan --copt=-fno-sanitize=function --copt=-fno-sanitize=vptr diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c91c7b447..d490527747 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,10 @@ endif() if(POLICY CMP0063) cmake_policy(SET CMP0063 NEW) endif() +# option() honor variables +if (POLICY CMP0077) + cmake_policy(SET CMP0077 NEW) +endif (POLICY CMP0077) # Project project(protobuf C CXX) diff --git a/cmake/protobuf-config.cmake.in b/cmake/protobuf-config.cmake.in index 1a8d243a74..44805c79a7 100644 --- a/cmake/protobuf-config.cmake.in +++ b/cmake/protobuf-config.cmake.in @@ -4,6 +4,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/protobuf-options.cmake") # Depend packages @_protobuf_FIND_ZLIB@ @_protobuf_FIND_ABSL@ +@_protobuf_FIND_UTF8_RANGE@ # Imported targets include("${CMAKE_CURRENT_LIST_DIR}/protobuf-targets.cmake") diff --git a/cmake/utf8_range.cmake b/cmake/utf8_range.cmake index 90f5ff1ea5..4dcfa4bcca 100644 --- a/cmake/utf8_range.cmake +++ b/cmake/utf8_range.cmake @@ -1,4 +1,4 @@ -set(utf8_range_ENABLE_TESTS OFF) +set(utf8_range_ENABLE_TESTS OFF CACHE BOOL "Disable utf8_range tests") if (NOT EXISTS "${protobuf_SOURCE_DIR}/third_party/utf8_range/CMakeLists.txt") message(FATAL_ERROR @@ -8,5 +8,7 @@ if (NOT EXISTS "${protobuf_SOURCE_DIR}/third_party/utf8_range/CMakeLists.txt") " git submodule update --init --recursive\n") endif() -set(utf8_range_ENABLE_INSTALL ${protobuf_INSTALL}) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range third_party/utf8_range) \ No newline at end of file +set(utf8_range_ENABLE_INSTALL ${protobuf_INSTALL} CACHE BOOL "Set install") +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range third_party/utf8_range) + +set(_protobuf_FIND_UTF8_RANGE "if(NOT TARGET utf8_range)\n find_package(utf8_range CONFIG)\nendif()") diff --git a/kokoro/windows/prepare_build_win64.bat b/kokoro/windows/prepare_build_win64.bat index d8eb2a2b30..37d27ac7a7 100644 --- a/kokoro/windows/prepare_build_win64.bat +++ b/kokoro/windows/prepare_build_win64.bat @@ -13,4 +13,4 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary @rem Convert Windows line breaks to Unix line breaks @rem This allows text-matching tests to pass -find . -type f -print0 | xargs -0 d2u +@find . -type f -print0 | xargs -0 d2u diff --git a/protobuf_deps.bzl b/protobuf_deps.bzl index 47d6b251d4..82e7bf279d 100644 --- a/protobuf_deps.bzl +++ b/protobuf_deps.bzl @@ -67,8 +67,8 @@ def protobuf_deps(): _github_archive( name = "utf8_range", repo = "https://github.com/protocolbuffers/utf8_range", - commit = "a67b76f9f40107f2c78a5aa860bb6ce37ed83d85", - sha256 = "de5f99318f3b5073dd99f3d4ca31e00e90a86cc400fb375e2147ae1fd41711ed", + commit = "de0b4a8ff9b5d4c98108bdfe723291a33c52c54f", + sha256 = "5da960e5e5d92394c809629a03af3c7709d2d3d0ca731dacb3a9fb4bf28f7702", ) if not native.existing_rule("rules_cc"): diff --git a/python/google/protobuf/pyext/message.cc b/python/google/protobuf/pyext/message.cc index 532fc3cb4e..f4dd00dabf 100644 --- a/python/google/protobuf/pyext/message.cc +++ b/python/google/protobuf/pyext/message.cc @@ -70,7 +70,6 @@ #include "google/protobuf/pyext/unknown_field_set.h" #include "google/protobuf/pyext/unknown_fields.h" #include "google/protobuf/util/message_differencer.h" -#include "strings/util.h" #include "absl/strings/string_view.h" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/io/strtod.h" diff --git a/python/setup.py b/python/setup.py index 7a553594a7..9a95ff8f88 100755 --- a/python/setup.py +++ b/python/setup.py @@ -297,6 +297,8 @@ if __name__ == '__main__': extra_objects = ['../bazel-bin/src/google/protobuf/libprotobuf.a'] else: extra_objects = ['../libprotobuf.a'] + extra_objects += list( + glob.iglob('../third_party/utf8_range/*.a')) # Repeat all of these enough times to eliminate order-dependence. extra_objects += list( glob.iglob('../third_party/abseil-cpp/absl/**/*.a')) diff --git a/src/google/protobuf/compiler/csharp/csharp_map_field.cc b/src/google/protobuf/compiler/csharp/csharp_map_field.cc index efe87f2a6a..50d8b1d828 100644 --- a/src/google/protobuf/compiler/csharp/csharp_map_field.cc +++ b/src/google/protobuf/compiler/csharp/csharp_map_field.cc @@ -88,7 +88,7 @@ void MapFieldGenerator::GenerateMembers(io::Printer* printer) { void MapFieldGenerator::GenerateMergingCode(io::Printer* printer) { printer->Print( variables_, - "$name$_.Add(other.$name$_);\n"); + "$name$_.MergeFrom(other.$name$_);\n"); } void MapFieldGenerator::GenerateParsingCode(io::Printer* printer) { diff --git a/src/google/protobuf/generated_message_tctable_lite.cc b/src/google/protobuf/generated_message_tctable_lite.cc index a2a6c5720c..ea8f4fb005 100644 --- a/src/google/protobuf/generated_message_tctable_lite.cc +++ b/src/google/protobuf/generated_message_tctable_lite.cc @@ -297,23 +297,31 @@ const char* TcParser::MiniParse(PROTOBUF_TC_PARAM_DECL) { &Error, // kSplitMask | FieldKind::kFkMap }; // Just to be sure we got the order right, above. - static_assert(0 == FieldKind::kFkNone); - static_assert(1 == FieldKind::kFkVarint); - static_assert(2 == FieldKind::kFkPackedVarint); - static_assert(3 == FieldKind::kFkFixed); - static_assert(4 == FieldKind::kFkPackedFixed); - static_assert(5 == FieldKind::kFkString); - static_assert(6 == FieldKind::kFkMessage); - static_assert(7 == FieldKind::kFkMap); - - static_assert(8 == (+field_layout::kSplitMask | FieldKind::kFkNone)); - static_assert(9 == (+field_layout::kSplitMask | FieldKind::kFkVarint)); - static_assert(10 == (+field_layout::kSplitMask | FieldKind::kFkPackedVarint)); - static_assert(11 == (+field_layout::kSplitMask | FieldKind::kFkFixed)); - static_assert(12 == (+field_layout::kSplitMask | FieldKind::kFkPackedFixed)); - static_assert(13 == (+field_layout::kSplitMask | FieldKind::kFkString)); - static_assert(14 == (+field_layout::kSplitMask | FieldKind::kFkMessage)); - static_assert(15 == (+field_layout::kSplitMask | FieldKind::kFkMap)); + static_assert(0 == FieldKind::kFkNone, "Invalid table order"); + static_assert(1 == FieldKind::kFkVarint, "Invalid table order"); + static_assert(2 == FieldKind::kFkPackedVarint, "Invalid table order"); + static_assert(3 == FieldKind::kFkFixed, "Invalid table order"); + static_assert(4 == FieldKind::kFkPackedFixed, "Invalid table order"); + static_assert(5 == FieldKind::kFkString, "Invalid table order"); + static_assert(6 == FieldKind::kFkMessage, "Invalid table order"); + static_assert(7 == FieldKind::kFkMap, "Invalid table order"); + + static_assert(8 == (+field_layout::kSplitMask | FieldKind::kFkNone), + "Invalid table order"); + static_assert(9 == (+field_layout::kSplitMask | FieldKind::kFkVarint), + "Invalid table order"); + static_assert(10 == (+field_layout::kSplitMask | FieldKind::kFkPackedVarint), + "Invalid table order"); + static_assert(11 == (+field_layout::kSplitMask | FieldKind::kFkFixed), + "Invalid table order"); + static_assert(12 == (+field_layout::kSplitMask | FieldKind::kFkPackedFixed), + "Invalid table order"); + static_assert(13 == (+field_layout::kSplitMask | FieldKind::kFkString), + "Invalid table order"); + static_assert(14 == (+field_layout::kSplitMask | FieldKind::kFkMessage), + "Invalid table order"); + static_assert(15 == (+field_layout::kSplitMask | FieldKind::kFkMap), + "Invalid table order"); TailCallParseFunc parse_fn = kMiniParseTable[field_type]; PROTOBUF_MUSTTAIL return parse_fn(PROTOBUF_TC_PARAM_PASS); diff --git a/third_party/utf8_range b/third_party/utf8_range index a67b76f9f4..de0b4a8ff9 160000 --- a/third_party/utf8_range +++ b/third_party/utf8_range @@ -1 +1 @@ -Subproject commit a67b76f9f40107f2c78a5aa860bb6ce37ed83d85 +Subproject commit de0b4a8ff9b5d4c98108bdfe723291a33c52c54f