Joshua Haberman
d5bd5b90da
Fixed a bug with tree shaking: use a separate MiniTable for statically tree shaken messages.
...
Since statically tree shaken messages can never later become linked, we should not need to use any of the special code in the decoder. By using a distinct "empty" message type, we avoid triggering any of this special behavior. This avoids bugs around hazzers and other presence checks.
Also fixed a bug in the cmake staleness test that was causing test failures.
PiperOrigin-RevId: 643036818
6 months ago
Joshua Haberman
1b451603f6
Enable tree shaking unused sub-messages for C generated MiniTables.
...
PiperOrigin-RevId: 642616862
6 months ago
Joshua Haberman
bcde8d4b54
Generate one source file per message/enum/extension on Android/iOS.
...
The functionality is enabled when the proto_one_output_per_message option used by C++ Lite is enabled.
This mirrors the behavior of C++ lite protos.
PiperOrigin-RevId: 642327960
6 months ago
Joshua Haberman
85c7cc24e0
Add an indirection to sub-messages pointers to allow for static tree shaking.
...
PiperOrigin-RevId: 640369522
6 months ago
Joshua Haberman
a1c99afd98
Introduced a generated extension registry using linker arrays.
...
PiperOrigin-RevId: 640196225
6 months ago
Éamonn McManus
b5fc2735e9
In `upb_MiniTableExtension_GetSubMessage`, return NULL for non-messages.
...
This parallels the logic in `upb_MiniTable_SubMessage`.
PiperOrigin-RevId: 632277936
7 months ago
Eric Salo
d923896299
upb: implement most of the non-universal setters
...
PiperOrigin-RevId: 631620526
7 months ago
Joshua Haberman
37e484a0aa
Replace direct access to MiniTable subs with calls to the encapsulated functions.
...
PiperOrigin-RevId: 626485595
8 months ago
Eric Salo
bcd44f65c8
upb: upb_MiniTable_MessageFieldIsLinked() -> upb_MiniTable_FieldIsLinked()
...
PiperOrigin-RevId: 622902387
8 months ago
Protobuf Team Bot
d7f032ad15
Move private definitions out of //bazel
...
This is needed to make protobuf/bazel package minimal for other proto rules.
Keep 4 public bzl files in upb/bazel. They end up under protobuf/bazel, and they are legitimately used by other repositories.
Move upb_proto_library_internal/* under bazel/private. Those are utilities used in the rules. Moving them one level deeper makes protobuf/bazel package clean for other rules.
Move build_defs.bzl and amalgamation under /upb/bazel. Those are utilities used in the build.
Move lua.BUILD and python* uner /python/dist. Those are used in the WORKSPACE dependency setup.
PiperOrigin-RevId: 621442236
8 months ago
Mike Kruskal
b6032d72e3
Add basic upb cmake support.
...
libupb will always be statically linked, and currently doesn't ever install itself.
PiperOrigin-RevId: 615136389
9 months ago
Protobuf Team Bot
99315b19d2
Fix upb_MiniTable_SetFullName signature.
...
PiperOrigin-RevId: 613716602
9 months ago
Protobuf Team Bot
cbfb6991f3
Add api to trace message allocations.
...
Initialize minitable tracing field for MtDecoder
Add api for non C language runtimes to initialize dynamic mini table name.
PiperOrigin-RevId: 613664457
9 months ago
Protobuf Team Bot
f2242d7136
Add proto full name support for tracing.
...
Creates a tracing helper function to associate mini tables with proto full names to use for upcoming upb metrics collectors.
PiperOrigin-RevId: 613290255
9 months ago
Eric Salo
4502dd1ea3
upb: fix upb_MiniTableField_IsInOneof() to be UPB_API_INLINE everywhere
...
PiperOrigin-RevId: 611488947
9 months ago
Eric Salo
b0d3a787cc
upb: Simplify inline functions in mini_table/ and mem/ and wire/ and message/
...
PiperOrigin-RevId: 605413999
10 months ago
Eric Salo
7b6a845ab7
upb: implement immutability
...
PiperOrigin-RevId: 601848001
10 months ago
Eric Salo
7c5ff29979
upb: add upb_MiniTableExtension_CType()
...
PiperOrigin-RevId: 599313198
11 months ago
Eric Salo
72275ded70
upb: move upb_Message definition back into upb/message/
...
PiperOrigin-RevId: 598741329
11 months ago
Eric Salo
5c5f092606
upb: implement upb_Message
...
PiperOrigin-RevId: 597662892
11 months ago
Eric Salo
4ba7d27201
upb: implement _upb_Message_ClearOneofCase()
...
PiperOrigin-RevId: 595018281
11 months ago
Eric Salo
64dbf0dba4
upb: delete the aliases for upb:hash, upb:lex, upb:reflection_internal
...
PiperOrigin-RevId: 594992691
11 months ago
Adam Cozzette
4ec9170bcd
Fix layering check for usage of gtest
...
To satisfy the layering check, we need to depend on :gtest for the headers, in
addition to :gtest_main which provides the main() function.
There are a bunch of formatting changes as a side effect of this, but they
should be harmless.
PiperOrigin-RevId: 594318263
11 months ago
Eric Salo
27eae8f404
upb: delete mini_table/types.h
...
PiperOrigin-RevId: 594089137
11 months ago
Eric Salo
e397296217
upb: restore the mini_table:internal target
...
PiperOrigin-RevId: 593870914
11 months ago
Eric Salo
0896146034
upb: make all mini_table/ includes unidirectional
...
PiperOrigin-RevId: 593859422
11 months ago
Eric Salo
3c3d77158f
upb: add :test_srcs targets for cmake on GH
...
PiperOrigin-RevId: 593854176
11 months ago
Eric Salo
2fb0b93d9d
upb: tighten up and lock down upb/wire/
...
PiperOrigin-RevId: 593821827
11 months ago
Eric Salo
cdb078275d
upb: add more functions to bits/mini_table_field.h
...
PiperOrigin-RevId: 592847506
12 months ago
Eric Salo
fd6f83576f
upb: stop returning void from void functions
...
PiperOrigin-RevId: 592844285
12 months ago
Eric Salo
de7f589d44
upb: eliminate :mini_table_internal
...
PiperOrigin-RevId: 592392732
12 months ago
Eric Salo
1f67b8dfe1
upb: tag upb_MiniTableField:offset as UPB_ONLYBITS()
...
PiperOrigin-RevId: 592081461
12 months ago
Eric Salo
b83a1fece1
upb: implement upb_MiniTable_MapKey() and upb_MiniTable_MapValue()
...
PiperOrigin-RevId: 588418734
1 year ago
Eric Salo
6efd909a9b
upb: clean up and lock down the internal oneof accessors
...
PiperOrigin-RevId: 588166536
1 year ago
Eric Salo
347486dd85
upb: clean up and lock down the internal hasbit accessors
...
PiperOrigin-RevId: 588147628
1 year ago
Eric Salo
b64c6e193b
upb: implement upb_Message_ShallowClone()/Copy()
...
PiperOrigin-RevId: 588088145
1 year ago
Eric Salo
848a2bfd41
upb: tag upb_MiniTableField:number as UPB_ONLYBITS()
...
PiperOrigin-RevId: 587127664
1 year ago
Protobuf Team Bot
2ff245ef18
Internal
...
PiperOrigin-RevId: 587060845
1 year ago
Eric Salo
0e6607a5c9
upb: tag upb_MiniTableField:mode as UPB_ONLYBITS()
...
PiperOrigin-RevId: 587022805
1 year ago
Eric Salo
bb5322a194
upb: lock down upb_MiniTable (mostly)
...
PiperOrigin-RevId: 586542236
1 year ago
Eric Salo
d0c85637e7
upb: lock down upb_MiniTableSub
...
PiperOrigin-RevId: 586187469
1 year ago
Eric Salo
19ef3a58cf
upb: lock down MiniTableField
...
PiperOrigin-RevId: 586171362
1 year ago
Eric Salo
8dfd82096b
upb: lock down upbMiniTable_File
...
PiperOrigin-RevId: 586003350
1 year ago
Eric Salo
21133d554f
upb: lock down upb_MiniTableExtension
...
PiperOrigin-RevId: 585817227
1 year ago
Eric Salo
f6b38b5838
upb: lock down upb_MiniTableEnum
...
PiperOrigin-RevId: 585733953
1 year ago
Eric Salo
a49f6b8ea0
upb: move ElemSizeLg2() from message/ into mini_table/
...
PiperOrigin-RevId: 584380544
1 year ago
Eric Salo
0b892a5466
upb: move IsOneof() from message/internal/accessors.h
...
PiperOrigin-RevId: 584358795
1 year ago
Eric Salo
45b292f119
upb: refactor mini_table/enum.h
...
PiperOrigin-RevId: 584154442
1 year ago
Eric Salo
7fa050d8c1
upb: move IsSubMessage() and IsRepeatedOrMap() from mini_table/internal/field.h
...
PiperOrigin-RevId: 584082079
1 year ago
Eric Salo
8849deab91
upb: implement some upb_FieldType and upb_CType functions
...
PiperOrigin-RevId: 582150596
1 year ago