The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) https://grpc.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2050 lines
145 KiB

/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/descriptor.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
#define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
#include "upb/msg_internal.h"
#include "upb/decode.h"
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct google_protobuf_FileDescriptorSet;
struct google_protobuf_FileDescriptorProto;
struct google_protobuf_DescriptorProto;
struct google_protobuf_DescriptorProto_ExtensionRange;
struct google_protobuf_DescriptorProto_ReservedRange;
struct google_protobuf_ExtensionRangeOptions;
struct google_protobuf_FieldDescriptorProto;
struct google_protobuf_OneofDescriptorProto;
struct google_protobuf_EnumDescriptorProto;
struct google_protobuf_EnumDescriptorProto_EnumReservedRange;
struct google_protobuf_EnumValueDescriptorProto;
struct google_protobuf_ServiceDescriptorProto;
struct google_protobuf_MethodDescriptorProto;
struct google_protobuf_FileOptions;
struct google_protobuf_MessageOptions;
struct google_protobuf_FieldOptions;
struct google_protobuf_OneofOptions;
struct google_protobuf_EnumOptions;
struct google_protobuf_EnumValueOptions;
struct google_protobuf_ServiceOptions;
struct google_protobuf_MethodOptions;
struct google_protobuf_UninterpretedOption;
struct google_protobuf_UninterpretedOption_NamePart;
struct google_protobuf_SourceCodeInfo;
struct google_protobuf_SourceCodeInfo_Location;
struct google_protobuf_GeneratedCodeInfo;
struct google_protobuf_GeneratedCodeInfo_Annotation;
typedef struct google_protobuf_FileDescriptorSet google_protobuf_FileDescriptorSet;
typedef struct google_protobuf_FileDescriptorProto google_protobuf_FileDescriptorProto;
typedef struct google_protobuf_DescriptorProto google_protobuf_DescriptorProto;
typedef struct google_protobuf_DescriptorProto_ExtensionRange google_protobuf_DescriptorProto_ExtensionRange;
typedef struct google_protobuf_DescriptorProto_ReservedRange google_protobuf_DescriptorProto_ReservedRange;
typedef struct google_protobuf_ExtensionRangeOptions google_protobuf_ExtensionRangeOptions;
typedef struct google_protobuf_FieldDescriptorProto google_protobuf_FieldDescriptorProto;
typedef struct google_protobuf_OneofDescriptorProto google_protobuf_OneofDescriptorProto;
typedef struct google_protobuf_EnumDescriptorProto google_protobuf_EnumDescriptorProto;
typedef struct google_protobuf_EnumDescriptorProto_EnumReservedRange google_protobuf_EnumDescriptorProto_EnumReservedRange;
typedef struct google_protobuf_EnumValueDescriptorProto google_protobuf_EnumValueDescriptorProto;
typedef struct google_protobuf_ServiceDescriptorProto google_protobuf_ServiceDescriptorProto;
typedef struct google_protobuf_MethodDescriptorProto google_protobuf_MethodDescriptorProto;
typedef struct google_protobuf_FileOptions google_protobuf_FileOptions;
typedef struct google_protobuf_MessageOptions google_protobuf_MessageOptions;
typedef struct google_protobuf_FieldOptions google_protobuf_FieldOptions;
typedef struct google_protobuf_OneofOptions google_protobuf_OneofOptions;
typedef struct google_protobuf_EnumOptions google_protobuf_EnumOptions;
typedef struct google_protobuf_EnumValueOptions google_protobuf_EnumValueOptions;
typedef struct google_protobuf_ServiceOptions google_protobuf_ServiceOptions;
typedef struct google_protobuf_MethodOptions google_protobuf_MethodOptions;
typedef struct google_protobuf_UninterpretedOption google_protobuf_UninterpretedOption;
typedef struct google_protobuf_UninterpretedOption_NamePart google_protobuf_UninterpretedOption_NamePart;
typedef struct google_protobuf_SourceCodeInfo google_protobuf_SourceCodeInfo;
typedef struct google_protobuf_SourceCodeInfo_Location google_protobuf_SourceCodeInfo_Location;
typedef struct google_protobuf_GeneratedCodeInfo google_protobuf_GeneratedCodeInfo;
typedef struct google_protobuf_GeneratedCodeInfo_Annotation google_protobuf_GeneratedCodeInfo_Annotation;
extern const upb_msglayout google_protobuf_FileDescriptorSet_msginit;
extern const upb_msglayout google_protobuf_FileDescriptorProto_msginit;
extern const upb_msglayout google_protobuf_DescriptorProto_msginit;
extern const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit;
extern const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit;
extern const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit;
extern const upb_msglayout google_protobuf_FieldDescriptorProto_msginit;
extern const upb_msglayout google_protobuf_OneofDescriptorProto_msginit;
extern const upb_msglayout google_protobuf_EnumDescriptorProto_msginit;
extern const upb_msglayout google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit;
extern const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit;
extern const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit;
extern const upb_msglayout google_protobuf_MethodDescriptorProto_msginit;
extern const upb_msglayout google_protobuf_FileOptions_msginit;
extern const upb_msglayout google_protobuf_MessageOptions_msginit;
extern const upb_msglayout google_protobuf_FieldOptions_msginit;
extern const upb_msglayout google_protobuf_OneofOptions_msginit;
extern const upb_msglayout google_protobuf_EnumOptions_msginit;
extern const upb_msglayout google_protobuf_EnumValueOptions_msginit;
extern const upb_msglayout google_protobuf_ServiceOptions_msginit;
extern const upb_msglayout google_protobuf_MethodOptions_msginit;
extern const upb_msglayout google_protobuf_UninterpretedOption_msginit;
extern const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit;
extern const upb_msglayout google_protobuf_SourceCodeInfo_msginit;
extern const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit;
extern const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit;
extern const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit;
typedef enum {
google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL = 1,
google_protobuf_FieldDescriptorProto_LABEL_REQUIRED = 2,
google_protobuf_FieldDescriptorProto_LABEL_REPEATED = 3
} google_protobuf_FieldDescriptorProto_Label;
typedef enum {
google_protobuf_FieldDescriptorProto_TYPE_DOUBLE = 1,
google_protobuf_FieldDescriptorProto_TYPE_FLOAT = 2,
google_protobuf_FieldDescriptorProto_TYPE_INT64 = 3,
google_protobuf_FieldDescriptorProto_TYPE_UINT64 = 4,
google_protobuf_FieldDescriptorProto_TYPE_INT32 = 5,
google_protobuf_FieldDescriptorProto_TYPE_FIXED64 = 6,
google_protobuf_FieldDescriptorProto_TYPE_FIXED32 = 7,
google_protobuf_FieldDescriptorProto_TYPE_BOOL = 8,
google_protobuf_FieldDescriptorProto_TYPE_STRING = 9,
google_protobuf_FieldDescriptorProto_TYPE_GROUP = 10,
google_protobuf_FieldDescriptorProto_TYPE_MESSAGE = 11,
google_protobuf_FieldDescriptorProto_TYPE_BYTES = 12,
google_protobuf_FieldDescriptorProto_TYPE_UINT32 = 13,
google_protobuf_FieldDescriptorProto_TYPE_ENUM = 14,
google_protobuf_FieldDescriptorProto_TYPE_SFIXED32 = 15,
google_protobuf_FieldDescriptorProto_TYPE_SFIXED64 = 16,
google_protobuf_FieldDescriptorProto_TYPE_SINT32 = 17,
google_protobuf_FieldDescriptorProto_TYPE_SINT64 = 18
} google_protobuf_FieldDescriptorProto_Type;
typedef enum {
google_protobuf_FieldOptions_STRING = 0,
google_protobuf_FieldOptions_CORD = 1,
google_protobuf_FieldOptions_STRING_PIECE = 2
} google_protobuf_FieldOptions_CType;
typedef enum {
google_protobuf_FieldOptions_JS_NORMAL = 0,
google_protobuf_FieldOptions_JS_STRING = 1,
google_protobuf_FieldOptions_JS_NUMBER = 2
} google_protobuf_FieldOptions_JSType;
typedef enum {
google_protobuf_FileOptions_SPEED = 1,
google_protobuf_FileOptions_CODE_SIZE = 2,
google_protobuf_FileOptions_LITE_RUNTIME = 3
} google_protobuf_FileOptions_OptimizeMode;
typedef enum {
google_protobuf_MethodOptions_IDEMPOTENCY_UNKNOWN = 0,
google_protobuf_MethodOptions_NO_SIDE_EFFECTS = 1,
google_protobuf_MethodOptions_IDEMPOTENT = 2
} google_protobuf_MethodOptions_IdempotencyLevel;
/* google.protobuf.FileDescriptorSet */
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_FileDescriptorSet *)_upb_msg_new(&google_protobuf_FileDescriptorSet_msginit, arena);
}
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_FileDescriptorSet_has_file(const google_protobuf_FileDescriptorSet *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
UPB_INLINE const google_protobuf_FileDescriptorProto* const* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet *msg, size_t *len) { return (const google_protobuf_FileDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_mutable_file(google_protobuf_FileDescriptorSet *msg, size_t *len) {
return (google_protobuf_FileDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_resize_file(google_protobuf_FileDescriptorSet *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_FileDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorSet_add_file(google_protobuf_FileDescriptorSet *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)_upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.FileDescriptorProto */
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_FileDescriptorProto *)_upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena);
}
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
UPB_INLINE upb_strview const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_message_type(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); }
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(40, 80), len); }
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_enum_type(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 88)); }
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(44, 88), len); }
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 96)); }
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(48, 96), len); }
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 104)); }
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(52, 104), len); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_FileOptions*); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(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(32, 64), const google_protobuf_SourceCodeInfo*); }
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(56, 112), len); }
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(60, 120), len); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_strview value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_strview value) {
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
}
UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto *msg, upb_strview val, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return _upb_array_append_accessor2(msg, UPB_SIZE(36, 72), UPB_SIZE(3, 4), &val,
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
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(40, 80), len);
}
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 80), 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) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(40, 80), 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(44, 88), len);
}
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 88), 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) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(44, 88), 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(48, 96), len);
}
UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_ServiceDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 96), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(48, 96), 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(52, 104), len);
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 104), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(52, 104), 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) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(28, 56), 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);
if (sub == NULL) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
sub = (struct google_protobuf_FileOptions*)_upb_msg_new(&google_protobuf_FileOptions_msginit, arena);
if (!sub) return NULL;
google_protobuf_FileDescriptorProto_set_options(msg, sub);
}
return sub;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(32, 64), 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);
if (sub == NULL) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
sub = (struct google_protobuf_SourceCodeInfo*)_upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena);
if (!sub) return NULL;
google_protobuf_FileDescriptorProto_set_source_code_info(msg, sub);
}
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(56, 112), len);
}
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(56, 112), len, 2, arena);
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return _upb_array_append_accessor2(msg, UPB_SIZE(56, 112), 2, &val,
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
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(60, 120), len);
}
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(60, 120), len, 2, arena);
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return _upb_array_append_accessor2(msg, UPB_SIZE(60, 120), 2, &val,
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
arena);
}
UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
}
/* google.protobuf.DescriptorProto */
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_DescriptorProto *)_upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena);
}
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE bool google_protobuf_DescriptorProto_has_field(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
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(16, 32), len); }
UPB_INLINE bool google_protobuf_DescriptorProto_has_nested_type(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
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(20, 40), len); }
UPB_INLINE bool google_protobuf_DescriptorProto_has_enum_type(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
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(24, 48), len); }
UPB_INLINE bool google_protobuf_DescriptorProto_has_extension_range(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
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(28, 56), len); }
UPB_INLINE bool google_protobuf_DescriptorProto_has_extension(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
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(32, 64), len); }
UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), 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)); }
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); }
UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_range(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 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); }
UPB_INLINE upb_strview const* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); }
UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_strview value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = 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(16, 32), len);
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(16, 32), 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(20, 40), len);
}
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 40), 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) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(20, 40), 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(24, 48), len);
}
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), 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) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(24, 48), 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(28, 56), len);
}
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), 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) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(28, 56), 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(32, 64), len);
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(32, 64), 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(12, 24), 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);
if (sub == NULL) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
sub = (struct google_protobuf_MessageOptions*)_upb_msg_new(&google_protobuf_MessageOptions_msginit, arena);
if (!sub) return NULL;
google_protobuf_DescriptorProto_set_options(msg, sub);
}
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);
}
UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_OneofDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 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) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(36, 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);
}
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 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) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(40, 80), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE upb_strview* google_protobuf_DescriptorProto_mutable_reserved_name(google_protobuf_DescriptorProto *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
}
UPB_INLINE upb_strview* google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto *msg, upb_strview val, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return _upb_array_append_accessor2(msg, UPB_SIZE(44, 88), UPB_SIZE(3, 4), &val,
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
arena);
}
/* google.protobuf.DescriptorProto.ExtensionRange */
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_DescriptorProto_ExtensionRange *)_upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena);
}
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const google_protobuf_ExtensionRangeOptions*); }
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) {
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) {
_upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), google_protobuf_ExtensionRangeOptions*) = value;
}
UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena) {
struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg);
if (sub == NULL) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
sub = (struct google_protobuf_ExtensionRangeOptions*)_upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena);
if (!sub) return NULL;
google_protobuf_DescriptorProto_ExtensionRange_set_options(msg, sub);
}
return sub;
}
/* google.protobuf.DescriptorProto.ReservedRange */
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_DescriptorProto_ReservedRange *)_upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena);
}
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) {
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
/* google.protobuf.ExtensionRangeOptions */
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_ExtensionRangeOptions *)_upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena);
}
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_ExtensionRangeOptions_has_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_mutable_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t *len) {
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ExtensionRangeOptions_add_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.FieldDescriptorProto */
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_FieldDescriptorProto *)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
}
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len);
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_strview); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 6); }
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_strview); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 7); }
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_strview); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 8); }
UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 104), 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 int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 10); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 88), upb_strview); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(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); }
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
_upb_sethas(msg, 3);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
*UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 6);
*UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 7);
*UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 8);
*UPB_PTR_AT(msg, UPB_SIZE(64, 104), 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);
if (sub == NULL) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
sub = (struct google_protobuf_FieldOptions*)_upb_msg_new(&google_protobuf_FieldOptions_msginit, arena);
if (!sub) return NULL;
google_protobuf_FieldDescriptorProto_set_options(msg, sub);
}
return sub;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 9);
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
_upb_sethas(msg, 10);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
*UPB_PTR_AT(msg, UPB_SIZE(56, 88), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 11);
*UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = value;
}
/* google.protobuf.OneofDescriptorProto */
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_OneofDescriptorProto *)_upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena);
}
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto *msg) { return _upb_hasbit(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*); }
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_strview value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = 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_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);
if (sub == NULL) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
sub = (struct google_protobuf_OneofOptions*)_upb_msg_new(&google_protobuf_OneofOptions_msginit, arena);
if (!sub) return NULL;
google_protobuf_OneofDescriptorProto_set_options(msg, sub);
}
return sub;
}
/* google.protobuf.EnumDescriptorProto */
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_EnumDescriptorProto *)_upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena);
}
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_value(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
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(16, 32), len); }
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), 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)); }
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); }
UPB_INLINE upb_strview const* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_strview value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = 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(16, 32), len);
}
UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_EnumValueDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(16, 32), 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(12, 24), 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);
if (sub == NULL) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
sub = (struct google_protobuf_EnumOptions*)_upb_msg_new(&google_protobuf_EnumOptions_msginit, arena);
if (!sub) return NULL;
google_protobuf_EnumDescriptorProto_set_options(msg, sub);
}
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);
}
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 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) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE upb_strview* google_protobuf_EnumDescriptorProto_mutable_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE upb_strview* google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto *msg, upb_strview val, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return _upb_array_append_accessor2(msg, UPB_SIZE(24, 48), UPB_SIZE(3, 4), &val,
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
arena);
}
/* google.protobuf.EnumDescriptorProto.EnumReservedRange */
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_EnumDescriptorProto_EnumReservedRange *)_upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena);
}
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) {
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
/* google.protobuf.EnumValueDescriptorProto */
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_EnumValueDescriptorProto *)_upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena);
}
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len);
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(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*); }
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
}
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
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_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);
if (sub == NULL) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
sub = (struct google_protobuf_EnumValueOptions*)_upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena);
if (!sub) return NULL;
google_protobuf_EnumValueDescriptorProto_set_options(msg, sub);
}
return sub;
}
/* google.protobuf.ServiceDescriptorProto */
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_ServiceDescriptorProto *)_upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena);
}
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_method(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
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(16, 32), len); }
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_ServiceOptions*); }
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_strview value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = 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(16, 32), len);
}
UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_MethodDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(16, 32), 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(12, 24), 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);
if (sub == NULL) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
sub = (struct google_protobuf_ServiceOptions*)_upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena);
if (!sub) return NULL;
google_protobuf_ServiceDescriptorProto_set_options(msg, sub);
}
return sub;
}
/* google.protobuf.MethodDescriptorProto */
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_MethodDescriptorProto *)_upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena);
}
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len);
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(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*); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(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); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(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); }
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(28, 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);
if (sub == NULL) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
sub = (struct google_protobuf_MethodOptions*)_upb_msg_new(&google_protobuf_MethodOptions_msginit, arena);
if (!sub) return NULL;
google_protobuf_MethodDescriptorProto_set_options(msg, sub);
}
return sub;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 6);
*UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
}
/* google.protobuf.FileOptions */
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_FileOptions *)_upb_msg_new(&google_protobuf_FileOptions_msginit, arena);
}
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len);
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_strview); }
UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_strview); }
UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_strview); }
UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 6); }
UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool); }
UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 7); }
UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool); }
UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 8); }
UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool); }
UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 9); }
UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool); }
UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 10); }
UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool); }
UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 11); }
UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool); }
UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 12); }
UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool); }
UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 13); }
UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_strview); }
UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 14); }
UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_strview); }
UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 15); }
UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_strview); }
UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 16); }
UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_strview); }
UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 17); }
UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_strview); }
UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 18); }
UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); }
UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 19); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE upb_strview google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_strview); }
UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 20); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE upb_strview google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_strview); }
UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const google_protobuf_FileOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 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); }
UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 6);
*UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 7);
*UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 8);
*UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 9);
*UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 10);
*UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 11);
*UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 12);
*UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 13);
*UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 14);
*UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 15);
*UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 16);
*UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 17);
*UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 18);
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace(google_protobuf_FileOptions *msg, upb_strview value) {
_upb_sethas(msg, 19);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
*UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_ruby_package(google_protobuf_FileOptions *msg, upb_strview value) {
_upb_sethas(msg, 20);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
*UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_strview) = value;
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions *msg, size_t *len) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(100, 184), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(100, 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) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(100, 184), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.MessageOptions */
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_MessageOptions *)_upb_msg_new(&google_protobuf_MessageOptions_msginit, arena);
}
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); }
UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
UPB_INLINE bool google_protobuf_MessageOptions_has_uninterpreted_option(const google_protobuf_MessageOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); }
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); }
UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) {
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
}
UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) {
_upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value;
}
UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) {
_upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t *len) {
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_resize_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 8), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOptions_add_uninterpreted_option(google_protobuf_MessageOptions *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(8, 8), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.FieldOptions */
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_FieldOptions *)_upb_msg_new(&google_protobuf_FieldOptions_msginit, arena);
}
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 1); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool); }
UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool); }
UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool); }
UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 6); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool); }
UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const google_protobuf_FieldOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 16)); }
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(16, 16), len); }
UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value) {
_upb_sethas(msg, 1);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value;
}
UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool) = value;
}
UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool) = value;
}
UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) {
_upb_sethas(msg, 6);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
*UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool) = value;
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t *len) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 16), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_resize_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOptions_add_uninterpreted_option(google_protobuf_FieldOptions *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(16, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.OneofOptions */
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_OneofOptions *)_upb_msg_new(&google_protobuf_OneofOptions_msginit, arena);
}
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_OneofOptions_has_uninterpreted_option(const google_protobuf_OneofOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_mutable_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t *len) {
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_resize_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOptions_add_uninterpreted_option(google_protobuf_OneofOptions *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.EnumOptions */
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_EnumOptions *)_upb_msg_new(&google_protobuf_EnumOptions_msginit, arena);
}
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
UPB_INLINE bool google_protobuf_EnumOptions_has_uninterpreted_option(const google_protobuf_EnumOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) {
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t *len) {
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_resize_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptions_add_uninterpreted_option(google_protobuf_EnumOptions *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.EnumValueOptions */
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_EnumValueOptions *)_upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena);
}
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE bool google_protobuf_EnumValueOptions_has_uninterpreted_option(const google_protobuf_EnumValueOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t *len) {
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_resize_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValueOptions_add_uninterpreted_option(google_protobuf_EnumValueOptions *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.ServiceOptions */
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_ServiceOptions *)_upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena);
}
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE bool google_protobuf_ServiceOptions_has_uninterpreted_option(const google_protobuf_ServiceOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t *len) {
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_resize_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOptions_add_uninterpreted_option(google_protobuf_ServiceOptions *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.MethodOptions */
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_MethodOptions *)_upb_msg_new(&google_protobuf_MethodOptions_msginit, arena);
}
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len);
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const google_protobuf_MethodOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); }
UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
}
UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t *len) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_resize_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOptions_add_uninterpreted_option(google_protobuf_MethodOptions *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(12, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.UninterpretedOption */
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_UninterpretedOption *)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
}
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_UninterpretedOption_has_name(const google_protobuf_UninterpretedOption *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 80)); }
UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg, size_t *len) { return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_accessor(msg, UPB_SIZE(56, 80), len); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double); }
UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview); }
UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 6); }
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview); }
UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption *msg, size_t *len) {
return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 80), len);
}
UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_resize_name(google_protobuf_UninterpretedOption *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_resize_accessor2(msg, UPB_SIZE(56, 80), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_add_name(google_protobuf_UninterpretedOption *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)_upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(56, 80), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview) = value;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(24, 24), double) = value;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_strview value) {
_upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview) = value;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_strview value) {
_upb_sethas(msg, 6);
*UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview) = value;
}
/* google.protobuf.UninterpretedOption.NamePart */
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_UninterpretedOption_NamePart *)_upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena);
}
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len);
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
/* google.protobuf.SourceCodeInfo */
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_SourceCodeInfo *)_upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena);
}
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_has_location(const google_protobuf_SourceCodeInfo *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
UPB_INLINE const google_protobuf_SourceCodeInfo_Location* const* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo *msg, size_t *len) { return (const google_protobuf_SourceCodeInfo_Location* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_mutable_location(google_protobuf_SourceCodeInfo *msg, size_t *len) {
return (google_protobuf_SourceCodeInfo_Location**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_resize_location(google_protobuf_SourceCodeInfo *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_SourceCodeInfo_Location**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_add_location(google_protobuf_SourceCodeInfo *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)_upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.SourceCodeInfo.Location */
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_SourceCodeInfo_Location *)_upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena);
}
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, arena, len);
}
UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
UPB_INLINE upb_strview const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) {
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_path(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 40), len, 2, arena);
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_path(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return _upb_array_append_accessor2(msg, UPB_SIZE(20, 40), 2, &val,
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
arena);
}
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_span(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) {
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_span(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, 2, arena);
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return _upb_array_append_accessor2(msg, UPB_SIZE(24, 48), 2, &val,
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
arena);
}
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value) {
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview val, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return _upb_array_append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(3, 4), &val,
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
arena);
}
/* google.protobuf.GeneratedCodeInfo */
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_GeneratedCodeInfo *)_upb_msg_new(&google_protobuf_GeneratedCodeInfo_msginit, arena);
}
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_has_annotation(const google_protobuf_GeneratedCodeInfo *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
UPB_INLINE const google_protobuf_GeneratedCodeInfo_Annotation* const* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo *msg, size_t *len) { return (const google_protobuf_GeneratedCodeInfo_Annotation* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_mutable_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t *len) {
return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_resize_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_add_annotation(google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)_upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena);
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
bool ok = _upb_array_append_accessor2(
msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
/* google.protobuf.GeneratedCodeInfo.Annotation */
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_new(upb_arena *arena) {
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
return (google_protobuf_GeneratedCodeInfo_Annotation *)_upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena);
}
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse(const char *buf, size_t size,
upb_arena *arena) {
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena)) return NULL;
return ret;
}
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse_ex(const char *buf, size_t size,
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
const upb_extreg *extreg, int options,
upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
Upb upgrade to the lastest (#26869) * Squashed 'third_party/upb/' changes from 60607da72e..2de300726a 2de300726a Merge pull request #401 from philwo/patch-1 0010bd88ff Merge pull request #403 from haberman/google-wyhash 3f7ecfe315 A few fixes in the 32-bit fallback. 2c14e2788d Added #include for Windows instrinsic. 9e618009ec Removed some extraneous whitespace. c4744c0b21 Updated generated files. 039975556d Merge branch 'master' into google-wyhash ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark c2f2e93990 Fix Bazel at 4.1.0 41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream. 91d506ac32 Ported ABSL's wyhash to C. 3328f06117 Remove ubuntu1604 from presubmit.yml f925acf5f0 Merge pull request #400 from haberman/extreg 897bd2500a Fixed compile error. 6e53de4a03 Addressed PR comments. cdd6434a31 Introduced upb_extreg and plumbed it into decoder. 69f186bd75 Merge pull request #399 from haberman/msg-extrep 3f8aa6ef20 Define the extension representation in messages and mini-tables. 4ccfab154b Merge pull request #398 from haberman/field-mode 58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label." 7596fa740f Merge pull request #397 from haberman/codegen-refactor fa4dfc2baa Addressed PR comments. 0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions. 52be845c39 Merge pull request #396 from haberman/pre-ext-opt 807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen. 2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant. 6394894b6e Addressed PR comments. 65d7b8ab0c Optimized decoder and paved the way for parsing extensions. 3e035cb553 Merge pull request #395 from haberman/locale e8ba2a1899 Added a fix for locales that output ',' as decimal separator. 7010a73828 Merge pull request #394 from haberman/file-uniqueness 9482957425 Enforce that filenames are unique when loaded into symtab. aaad7801bf Merge pull request #393 from haberman/has-attribute 7887dc0c76 Fixed the __has_attribute() check for old versions of Clang. 01e7436ed3 Merge pull request #390 from haberman/musttail 4132034634 Addressed PR comment. ed708fcd5d Addressed PR comments. 876abae2db Removed some debug printing and simplified checktag slightly. 286441afa7 Fixed a size regression due to inlining UTF-8 verification. 75df4cdaa3 Loosened the check for fasttable to match what we did before. e84793dd73 Cleaned up debugging artifacts. a4b35aa388 Everything passes except 4 conformance tests. 6e10b5789d Removed redundant license from port_def in amalgmation. 4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks. 0723bfa700 Merge pull request #387 from haberman/json-null dda5416569 Update bazel-skylib main branch name. 2fa52e6951 Merge branch 'master' into json-null a3126b7c7e Merge pull request #388 from haberman/fix-macos b344a6c582 Fixed the macOS build for XCode 11.3. a778f2639a Only perform multiple oneof check for non-null fields. 42bdfcb849 Fix BUILD file. 75d6dab37a Merge pull request #384 from haberman/internal 3881393907 Renamed .int.h to _internal.h, for greater clarity. 5084cbe646 Merge pull request #383 from fowles/master da4b75b979 Fix build rules for more restrive deps checks a8f9cf54cf Merge pull request #382 from haberman/license-headers 1ba446ccfe Updated Google, Inc. to Google LLC. 823eb09694 Update all 2011 dates to 2021. ff89277ef0 Merge pull request #380 from fowles/master 5f74d43cf9 Re-add some comment text that was accidentally removed. 0f27b0450a Merge branch 'master' into license-headers e59d2c8fa7 Added license headers to all files. be4f64b926 Merge pull request #381 from haberman/mv-msg-public 1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h. 6481f6319e Spell out deps explicitly f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem 3c3799498d Merge pull request #379 from fowles/master 2e83d5c98f Remove unused file test_util.h b053fa6991 Merge pull request #378 from fowles/master 7876639e50 remove unused macro 5b97df91dd Restrict fuse to matching block_alloc e74d6c23de Small renames and use uintptr_t instead of void* d9a0c58108 Allow arena fuse to fail 53f5d9f69b Merge pull request #377 from haberman/json-parse-null 8370818143 Switch to a macro to avoid signed/const mismatches. 63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder. add9b12f18 Fixed quadratic memory usage in upb_array_append(). 97e2aeb7ee Merge pull request #375 from haberman/cleanups 83c0edbd2a A few minor cleanups. baa7fe7473 Merge pull request #374 from haberman/update-deps 900bd5c426 Merge pull request #355 from haberman/aarch64 89df647460 Updated versions of ABSL and protobuf deps. e4343f0fa3 Update comment for ARM64. 103d51f102 Merge branch 'master' into aarch64 1b9cc09f0e Removed extraneous copybara directive. bbd817fdb6 Merge pull request #373 from haberman/table-cleanup c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively. ed5b4108e0 Merge pull request #363 from haberman/delete-handlers bfa528f0ae Merge pull request #372 from haberman/errmsg-fix ec9ba3f893 Fixed error message buffer overflow. eb0fdda14b Merge pull request #371 from haberman/json-any e58f7a0284 Fix for Any messages with no fields. 7541ba0f38 Merge pull request #364 from catenacyber/cifuzz 81829bacc3 Removed quote chars from error message. 88ed8f5d3b Changed JSON decoding error message to be more clear. f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use. b080659eee Merge pull request #367 from haberman/timestamp-minute-offset f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON. 451dcbbb9a Adds CIFuzz f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name. 0f40d59258 Merge pull request #362 from haberman/rb-warnings c7787cbaa1 Fixed a bunch of Clang warnings. 5e53b5bb3d Merge pull request #360 from haberman/default-msgval 7a6e647be1 Merge branch 'master' into default-msgval edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix 9175989431 Bugfix for arena cleanup list when passing to upb_decode(). 5e550e88f8 Added API for getting fielddef default as a upb_msgval. de76b31f9c Merge pull request #359 from veblush/fix-upbdefs 3cab8a38fc Fixed upbdefs error 48bb3e5662 Merge pull request #357 from veblush/string-opt 4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix 38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names 9b020d8f65 Optimize calls to std::string::find() and friends for a single char. 3c9ae7837a The fasttable parser works on ARM64! git-subtree-dir: third_party/upb git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f * Updated upb for bazel * Regen upb files * Updated src/upb/gen_build_yaml.py
3 years ago
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
}
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, len);
}
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(20, 32), len); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(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); }
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(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); }
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(20, 32), len);
}
UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t len, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 32), len, 2, arena);
}
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t val, upb_arena *arena) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
return _upb_array_append_accessor2(msg, UPB_SIZE(20, 32), 2, &val,
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
arena);
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_strview value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
Squashed 'third_party/upb/' changes from 382d5afc60..60607da72e 60607da72e Merge pull request #356 from haberman/codegen-uniquefiles 7a54a5f3d6 Split the code generators for .upb and .upbdefs. b10b02f66f Merge pull request #353 from haberman/small-fixes cd7c2d2701 Merge pull request #352 from haberman/large-field-number 10b355a6e0 A couple minor fixes. These are exercised by Ruby. 6c30b5fe73 Fixed upb encoder for field numbers > 2**28. 31b3528424 Merge pull request #350 from haberman/encode-depthlimit e9551022c1 Added depth limit checking to upb_encode(). f389384c5a Merge pull request #349 from lidizheng/json-public f72c26cbc4 Make :json publically visible 5797d95172 Merge pull request #348 from haberman/json-emit-defaults 7a17493269 Removed print debugging. 695b7f4617 Added code to test UPB_JSONENC_EMITDEFAULTS. 6b357607bd Fixed bugs in JSON encoding with UPB_JSONENC_EMITDEFAULTS. 1b08391979 Merge pull request #347 from haberman/filedef-symtab ee49a8d7df Added an accessor to get the symtab from a filedef. a81b47025a Merge pull request #345 from haberman/encode-skipunknown 6535cbe380 Merge pull request #346 from timgates42/bugfix_typo_position 7225108720 docs: fix simple typo, posisiton -> position 871ff96252 Test SKIPUNKNOWN on regular fields. 0569c22a1e Removed debug print. 76764643ac Added option to binary encoder to skip unknown fields. 794ce6d061 Merge pull request #344 from haberman/deterministic-serialize a04627abc8 Added map sorting to binary and text encoders. 3e071ea91a Merge pull request #343 from haberman/msvc e70e488e09 MSVC apparently doesn't support the standard C/C++ defines. 963e501aa6 Merge pull request #342 from haberman/fuzz 8d670d8aea Renamed decode_varint32() to decode_tag(). 9abf8e043f Clamp 32-bit varints to 5 bytes to fix a fuzz failure. 50a543de7f Merge pull request #341 from haberman/code-size 9c87f1168f Added size benchmark for CODE_SIZE. 6f82028236 Merge pull request #340 from haberman/darwin-setjmp 358fa14d0e Fixed headers and updated benchmark script. bc200451ce Use a macro instead of an inline function for setjmp/longjmp. ca279f8afa Merge branch 'master' into darwin-setjmp fbc0639b07 Use _setjmp on mac to avoid saving/restoring the signal mask. 10f0a38450 Merge pull request #337 from haberman/size-benchmarks 4be07a2dce Increase build timeout until we can parallelize the build. 378a27b640 Force "size" to run locally. da48e01f05 More google3 fixes. d2446fd2db Moved cc_api_version attribute to proto_library(). 4a84390c89 Added cc_proto_library() tweaks for google3. 4dd4212a34 Merge branch 'master' into size-benchmarks ffecfef161 Merge branch 'master' into size-benchmarks 86f671d5fd Fix for Darwin (output is different, but it won't error out). 165e01ec6f Fix for old Python versions. 40fdff5e43 Merge pull request #339 from haberman/benchmark-alias 5f8bb5de1d Updated generated code. 65d166a6ba Added API for copy vs. alias and added benchmarks to test both. 27b9c999a7 Merge pull request #338 from haberman/arena-initial 9df96874e9 Start arena block doubling at initial block size. 881ddac7fe Also use .format() for gen_synthetic_protos.py. 8b7dabe1a2 Use format() instead of string interpolation, for old Python versions. 8e08282c3b Removed unused small.proto. 0f79d47215 Added missing lite binaries to size_data.txt. 555fbbc0bc Size benchmarks are working pretty well. 85cbc41a89 Merge branch 'master' into size-benchmarks e5bdfba92c Removed accidentally-added .orig file. 07851fac58 Merge pull request #336 from haberman/fuzz 982b634bc5 Fixed a few minor bugs found by fuzzing. c9d2e58480 Merge pull request #310 from haberman/fast-table a01f3e23a4 Fixes for google3 build, and exclude even more tests from macOS to avoid timeout. a83d55ee4b Exclude Clang tests from MacOS to avoid Kokoro timeouts. 73fcfe9ed0 Tried to slim down the tests a bit more. baab25b7aa Removed excess/redundant tests from Kokoro script. 1eb7bd39e7 Some formatting fixes. 9d87055ce4 Updated Kokoro build script. 4bd34da105 WIP. a7993615bf Merge branch 'master' into fast-table 3a3efe69a2 Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584 7b4e376f79 Switch unordered_set -> absl::flat_hash_set. fe62fc83e1 Removed obsolete includes in benchmark. 5ed089dc42 Merge pull request #335 from haberman/wyhash-rule e9b79542ad Added a BUILD file for wyhash. 7b8ae7ec4e Merge branch 'master' into size-benchmarks a5b5445da6 Merge pull request #334 from haberman/rm-port-c 6c16cba83f Removed obsolete port.c file. 484d8f746a Updated comment in wyhash.h to correct spelling mistake. 6a9d0f45b8 Merge pull request #333 from haberman/32bitfixes 5b1f0d86a1 For Kokoro, only build/test -m32 on Linux. 0497f8deed Fixed a critical bug on 32-bit builds, and added much more Kokoro testing. 7543f851f1 Merge pull request #332 from haberman/php-amalgamation 64abb5eb11 Amalgamation no longer bundles wyhash, but #includes it. a2a40792b5 Merge pull request #331 from haberman/json-oneof-fix dd0994d377 Bugfix for JSON decoding: only check real oneofs for duplicates. 496f638025 Merge pull request #330 from haberman/symtab-longjmp c9f9668234 symtab: use longjmp() for errors and avoid intermediate table. 4d9a8cd67b Merge branch 'master' into symtab-longjmp 6322d1d72d Merge pull request #329 from haberman/benchmark-ads-descriptor 5ec1d39224 Avoid building .pb.cc for ads protos, as C++ takes forever to compile. 43c207ea7e Added CMake dummy rule. c3b5637646 Added benchmark for loading ads descriptor. acd72c6d3f WIP. 6ae3b66cd2 Merge pull request #328 from haberman/optdefload 8113ebd6c7 Added explanatory comment about integer constants. f2d826b9f3 Got rid of floating-point division in table init. 723cd8ffc1 Added wyhash code and LICENSE, and removed temporary benchmark. 15e20636c3 Merge branch 'master' into optdefload 154f2c25f4 Added UTF-8 validation for proto3 string fields. e8f9eac68c Added #defines UPB_ENABLE_FASTTABLE and UPB_TRY_ENABLE_FASTTABLE. 994cf07cf3 Merge pull request #327 from benjaminp/modern-linking b5bd5807a7 Migrate to modern Starlark linking api. dc64613607 Merge branch 'fastest-table' into fast-table e86541ac1d Fixed the build after the merge. 1cd0cb17d3 Merge branch 'master' into fastest-table 901744a97e Merge pull request #326 from haberman/c99 a0d16e7073 Added a few missing copts, and made some functions proper prototypes. 558315a1c3 Added COPTS to :port. 7e5bd65098 Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 8f3ee80d46 Drop C89/C90 support and MSVC prior to Visual Studio 2015. a274ad786a Plumbed copts (including the crucial -std=c99) to upb_proto_library() aspect. 2c8bb6dd9d Specify C99 explicitly until/unless we stop using bool. efd576b698 Added -std=gnu99 for fastdecode and ran Buildifier. b928696942 A few more fixes, and test fastdecode under Kokoro. 55f3569cd2 A few minor fixes and more assertions. 8b38e8f214 Merge branch 'fastest-table' into fast-table 46eb82467a Added comment to decode_fast.h. bd9f8f580d Fixed a few bugs with the fast decoder. 3eba47914b Allocate hasbits and table slots in "hotness" order. 021db6fcd5 Allow larger tags into the table if they are unique mod 31. 86d9908c55 Fastdecode support for packed fields. e3e797b680 Added fasttable support for oneofs. 7ffa9c181a Fixed some small bugs and performance problems in string copying. e2c709e047 Repeated string and primitive support. e9103eda9e Merge branch 'master' into fastest-table 0756999ab6 Merge pull request #325 from haberman/inlined-arena 25db40bc30 Fixed upb::InlinedArena, which was compeltely broken. d81ba58215 Optimized short string copying. f3a2a79349 More optimization, back up to 2.56GB/s. 199c914295 Simplify push/pop when msg fits in the current buffer. d5f5db2729 Put string-copying field parser into a separate function. 883f20d4dc Merge branch 'master' into fastest-table 1bd62e8218 Merge pull request #324 from haberman/simplemomi f4adbe0698 Optimized varint decoding from Gerben. 48689df72e Eliminated bounds checks inside parsing a field. a345af9883 Added a codegen parameter for whether fasttables are generated or not. 8a3470c543 WIP. 8e8dbb5258 Merge branch 'fastest-table' into fast-table 7d17a0e8c5 Merge branch 'master' into fastest-table a7e2e8338d Fixed benchmark script. 72de7b7002 Merge branch 'fastest-table' into fast-table cb234e652c Merge branch 'master' into fastest-table b86cf2d789 Merge pull request #323 from haberman/build-files 4ea81ab107 Fixed pedantic warning. 6399b31f4b Removed ULL constants in json_decode.c. c8ae197e64 Removed "U" suffixes, they are not necessary. bc1e0b314f Fixed some strict C89 errors. 2c1664906a Removed license comments and upb_amalgamation for google3. b7dc77415a Added licenses() to all BUILD files. de22764b33 Updated Kokoro to test ... instead of :all. e3f41de6c7 Split monolithic BUILD file into many build files. fbe2bcafbc Merge pull request #4 from gerben-s/gerbens-fast-table 9e68ec033f Add repeated varints and fixed parsers d0e4b688c6 Shorten name of kAliasString, so benchmark results don't wrap. c0c9b5a168 Regenerated generated code. eb8e6de8b7 Regenerated source files. 7f0d535826 Merge branch 'fastest-table' into fast-table bf8e08074c Added a few more comments. 6e3c22e6ee Merge branch 'fastest-table' into fast-table 3238821315 Gave fast table entry a nicer name. 2a574d3d01 Added a bunch of comments for readability. 0deca8b8fb Merge branch 'master' into fast-table bfadc99709 Merge branch 'master' into fastest-table 84e0f6127d Merge branch 'master' into fastest-table 61c51a607b Merge branch 'master' into fast-table 4f066765a9 Merge pull request #320 from haberman/string-view-benchmark bf393bf086 Cleaned up benchmark names. 9eb8414b31 Added descriptor_sv.proto. ee7da95367 Bzl formatting fix per buildifier. de1b6b0718 Refactored proto2 benchmarks and added StringView benchmark. c2901eeee1 Added missing #includes (caught by Blaze). 52721eadc7 Order LargeInitialBlock after non-initial-block test. 44a7130845 Used the correct copy of the protos in the benchmark. 3a242e7a48 Merge branch 'master' into fast-table d01b712dbb Merge branch 'master' into fastest-table d225dfc2ed Buildifier formatting fixes. b0994a6501 Added missing dep from benchmark. de80054018 Make required fields optional for benchmarking. 745661bf1f Merge branch 'master' into fastest-table 11585095b7 Merge pull request #319 from haberman/copy-descriptor fd5a35d49d Minor comment changes. bdd1a516e8 Fixed other tests. 27262adf93 Snapshot descriptor.proto into our own copy for benchmarking purposes. d6b40fd5e2 Added missing dependency on reflection. b9f1b67d07 Use quoted include. 1c8c16b9b1 Use quoted include. 4f901b6430 Passes all tests. de84e20788 Merge branch 'master' into optdefload d5c64476fd Merge pull request #318 from haberman/descriptor-load-benchmark 42d2f6cef9 Add MB/s measures in the benchmarks. 1ce98b86ec Added LoadDescriptor benchmark for proto2. 4890735ce2 Added benchmark for descriptor loading. 6f59f1256e Optimizations to descriptor loading. 6874d61704 Merge pull request #317 from haberman/gencode-compat c81113e60f Added fallback code for when no enum matches. c10b24ffb2 Simplified switch(). ded2e657a7 Added compatibility with old generated code. 5b0c5c7d4a Dispatch inline. 75edd3e59c Changed to use table pairs, seems to ever-so-slightly regress. 69d99a247e Merge pull request #3 from haberman/shifted-table bca7edac8c Cleaned up table compression a bit. b95f217996 A little speed boost, now hitting 2.51GB/s. 8ed6b2fe85 Stored mask in the table pointer. a6dc88556d Tables are compressed, but perf goes down to 2.44GB/s. 91eb09b1bc Add a few comments. 7a1835d7c3 Merge branch 'master' into fast-table 8bd5c0088e Merge pull request #316 from haberman/submsg-array a4966fd230 Added a few extra sanity checks. 99acbe0da8 Fixed bug where submsg array could have excess elements. 2a0425ecf5 Merge pull request #315 from haberman/conformance-fixes 7ccf5650c7 If we encounter "null" for a non-NullValue enum, throw an error. 0a3a94a12f Updated to a new version of protobuf and fixed a few conformance tests. ddd5f28c4f Merge branch 'is_bazel' 10fa3a0c77 Merge pull request #314 from haberman/addunknown 504e105420 undef UPB_ASAN. ab96d1ec41 Removed extraneous C++-style comment. d5096f9ee8 Fixed bug in addunknown and added ASAN poisoning. 6fe84526be Mark _is_bazel to be replace in google3. f01efe8b64 Removed another C99-ism. 1749082bbb Removed C99-ism. 147e363f56 Merge branch 'master' into fast-table f2ddc15d76 Bugfix: initialize fastlimit and fastend. 65e49b694b Merge branch 'gerben-fast-table' into fast-table 1abf7d418d Added generated files. 3f719fa6b2 Bugfix: offsetting hasbits with 16 introduced a bug in calculating hasmasks. Removing extra <<16 shift in hasmask calculating and masking out the first 16 bits. This makes messages without hasbits work as well. aec762e405 Merge branch 'master' into fast-table 4f77aaafd8 Merge pull request #2 from gerben-s/fast-table 4053805759 Bugfixes d1cd80385b Merge pull request #313 from haberman/inline-arena ad21083623 Merge pull request #313 from haberman/inline-arena 2339fc779c Updated obsolete comment. b393849bbd Updated obsolete comment. ebe53f8590 Fixed compile error. b37f82b58b Fixed compile error. 71749b7caf Implemented inline array allocation, and moved type->lg2 map to reflection. 9557b97acc Implemented inline array allocation, and moved type->lg2 map to reflection. b58d2a0ee6 Shrink overhead of message representation. 0bf063a2ca Shrink overhead of message representation. d87ceeacab Shave off one more store. ddc52ab9d6 Shave off one more store. c25d895adf Shrunk the arena state that needs to be synced. 7f67f68c1c Shrunk the arena state that needs to be synced. ff40dd6ea9 Added new internal header. 85a43e5461 Added new internal header. 36662b3735 Refactor some code. I extracted some common code from all message field parsers, to a tail recursive function. Removed the varint jmp table for a simple varint parse loop, that removes the stack frames. Also careful with not losing information in repeated message tag check. When written mindful the checks and loads that happen can be reused for tag dispatch if not the expected tag. cbcd635917 Fixed memory leak. bcbcdadbd2 Fixed memory leak. e5264bd794 Merge pull request #312 from haberman/defiter 52957fa984 Merge pull request #312 from haberman/defiter 746f64692c Moved arena inline for decoder. 7363b91ac3 Moved arena inline for decoder. b8ef1dcc57 Removed C++-style comments. 575acd85bd Re-added const for all of the pointer wrapper types. 5aa5b77b41 Added simple offset-based accessors for defs, and deprecated old iterators. 33384301e2 Merge pull request #311 from haberman/proto2-benchmark2 578e7c1f4c Merge pull request #311 from haberman/proto2-benchmark2 bc301e7da4 Use merge/partial variants to give proto2 benchmark the fairest hearing. 30f01afa83 Added LargeInitialBlock test for proto2. 5d23fd99af Used shorter protobuf:: namespace alias. 9938cf8f27 Put submsg_index directly in table data. Drop oneof support for now to focus. d87179501d Another build fix. 89bd8b87e1 Fixed a few more C89 compat issues. 64d293894a Fixed bug introduced by last optimization. ff957b996c Fixed C89 compat issues. 537b6f42c2 A few updates to the benchamrk and minor implementation changes. 0dcc5641eb Replicated dispatch and implemeted array resizing logic. Up to 2.67GB/s. 526e430794 I think this may have reached the optimization limit. 4c65b25daf Handle long varints, now 2GB/s! e39ec95ca2 Hoisted updates to limits and depth out of the loop. 52a0ed3891 Fixed a bug with tag number 15. 388b6f64eb A small optimization: don't increment array length every iteration. 9e5c5ce089 Optimized memset() with cutoff and fixed group & unknown message bugs. 8dd7b5a2ca A bunch more optimization. e46e94ec7f Added benchmarks for proto2. 405e7934b1 Handle 2-byte submessage lengths. 88b1ec7784 Table-driven supports repeated sub-messages. f173642db4 Handle non-repeated submessages. e219a2d91d Merge branch 'decode-arena' into fast-table 7ec2c52346 Donate/steal from arena to accelerate decoding. d43ccfa079 Revert test changes. fac992db83 Cleanup for showing. 3937874a85 We have a properly structured algorithm, but perf regresses by 20%. 438ecaeb5a Give all field parsers a generic table entry. 383ae5293e WIP. 26abaa2345 WIP. 34b98bc030 Avoid passing too many params to fallback. 763a3f6293 WIP. 02ff6fb996 Merge pull request #309 from haberman/decoder-forceinline a202ce9629 Add UPB_FORCEINLINE for varint32 decoding. d0f2c4c8a2 Merge pull request #308 from haberman/encoder 5741eb9ad7 Expanded benchmarking script and added one size opt to the encoder. 0135399e60 Fixed bug introduced in refactoring. df3438222b Notated impossible branch as unreachable. 9b31e8fe12 Merged common encode tag paths. 5d7dc718cc Minor formatting fix. 80441e4eb4 Optimized binary encoder. ada28896b9 Changed encoder to use longjmp() for error recovery. 6e140c267c Added benchmark for encoding. 7338facddb Merge pull request #307 from veblush/port-backport 4d2251c3e4 Add UPB_NORETURN for MSC git-subtree-dir: third_party/upb git-subtree-split: 60607da72e89ba0c84c84054d2e562d8b6b61177
4 years ago
_upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
extern const upb_msglayout_file google_protobuf_descriptor_proto_upb_file_layout;
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ */