slidge-whatsapp 0.2.7__cp312-cp312-manylinux_2_36_aarch64.whl → 0.3.0b0__cp312-cp312-manylinux_2_36_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. slidge_whatsapp/contact.py +13 -3
  2. slidge_whatsapp/event.go +107 -37
  3. slidge_whatsapp/gateway.go +7 -63
  4. slidge_whatsapp/gateway.py +2 -3
  5. slidge_whatsapp/generated/_whatsapp.cpython-312-aarch64-linux-gnu.h +186 -169
  6. slidge_whatsapp/generated/_whatsapp.cpython-312-aarch64-linux-gnu.so +0 -0
  7. slidge_whatsapp/generated/build.py +148 -134
  8. slidge_whatsapp/generated/whatsapp.c +1652 -1380
  9. slidge_whatsapp/generated/whatsapp.go +798 -687
  10. slidge_whatsapp/generated/whatsapp.py +1169 -1044
  11. slidge_whatsapp/generated/whatsapp_go.h +186 -169
  12. slidge_whatsapp/go.mod +18 -15
  13. slidge_whatsapp/go.sum +38 -26
  14. slidge_whatsapp/group.py +34 -30
  15. slidge_whatsapp/media/media.go +1 -1
  16. slidge_whatsapp/session.go +33 -16
  17. slidge_whatsapp/session.py +46 -14
  18. slidge_whatsapp/vendor/github.com/beeper/argo-go/LICENSE +9 -0
  19. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockreader.go +329 -0
  20. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockwriter.go +417 -0
  21. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/decoder.go +652 -0
  22. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/encoder.go +985 -0
  23. slidge_whatsapp/vendor/github.com/beeper/argo-go/header/header.go +135 -0
  24. slidge_whatsapp/vendor/github.com/beeper/argo-go/internal/util/util.go +133 -0
  25. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/label.go +384 -0
  26. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/wiremarkers.go +37 -0
  27. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/bitset/bitset.go +197 -0
  28. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/buf/buf.go +420 -0
  29. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/varint/varint.go +246 -0
  30. slidge_whatsapp/vendor/github.com/beeper/argo-go/wire/wire.go +614 -0
  31. slidge_whatsapp/vendor/github.com/beeper/argo-go/wirecodec/decode.go +341 -0
  32. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/LICENSE +21 -0
  33. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/list.go +95 -0
  34. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/orderedmap.go +187 -0
  35. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz.go +1 -0
  36. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_cgo.go +3 -0
  37. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_nocgo.go +4 -5
  38. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_darwin.go +11 -1
  39. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_linux.go +10 -0
  40. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_windows.go +12 -0
  41. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/.gitignore +0 -2
  42. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +30 -0
  43. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/COPYRIGHT.txt +6 -1
  44. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/README.md +14 -17
  45. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi.go +1 -1
  46. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi2.go +7 -0
  47. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/LICENSE +21 -0
  48. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_amd64/libffi.8.dylib +0 -0
  49. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_arm64/libffi.8.dylib +0 -0
  50. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/windows_amd64/libffi-8.dll +0 -0
  51. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif.go +15 -0
  52. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif_arm64.go +16 -0
  53. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed.go +49 -0
  54. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_amd64.go +10 -0
  55. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_arm64.go +10 -0
  56. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_windows_amd64.go +10 -0
  57. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +51 -13
  58. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/init.go +22 -9
  59. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -0
  60. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +3096 -1651
  61. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +188 -128
  62. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth.go +13 -140
  63. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3ext.h +4 -0
  64. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +2 -2
  65. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.25.go +37 -0
  66. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/LICENSE +19 -0
  67. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/argmap.go +37 -0
  68. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/collections.go +148 -0
  69. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/comment.go +31 -0
  70. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/decode.go +216 -0
  71. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/definition.go +110 -0
  72. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/directive.go +43 -0
  73. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/document.go +89 -0
  74. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/dumper.go +159 -0
  75. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/fragment.go +41 -0
  76. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/operation.go +32 -0
  77. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/path.go +72 -0
  78. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/selection.go +41 -0
  79. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/source.go +19 -0
  80. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/type.go +68 -0
  81. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/value.go +122 -0
  82. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +60 -26
  83. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +2 -1
  84. slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +28 -0
  85. slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +19 -3
  86. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/.pre-commit-config.yaml +3 -3
  87. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +1 -1
  88. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/hash.go +1 -1
  89. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +5 -1
  90. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo-wire-type-store.argo +63 -0
  91. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo.go +62 -0
  92. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/name-to-queryids.json +306 -0
  93. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +3 -2
  94. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +1 -0
  95. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +15 -18
  96. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +5 -0
  97. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +4 -0
  98. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +3 -0
  99. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +97 -25
  100. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +22 -10
  101. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +10 -9
  102. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +2 -14
  103. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/newsletter.go +83 -7
  104. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +5 -1
  105. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +2 -2
  106. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +15 -6
  107. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.pb.go +5156 -0
  108. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.proto +516 -0
  109. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.pb.go +30 -3
  110. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.proto +3 -0
  111. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +8532 -11526
  112. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +132 -438
  113. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +52 -23
  114. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +3 -0
  115. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +225 -73
  116. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +21 -5
  117. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +884 -441
  118. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +40 -0
  119. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +60 -38
  120. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +3 -0
  121. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +8 -1
  122. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +6 -4
  123. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
  124. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +3 -2
  125. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +25 -5
  126. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +3 -1
  127. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/call.go +1 -0
  128. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +8 -0
  129. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +2 -1
  130. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/user.go +2 -0
  131. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +12 -8
  132. slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +1 -1
  133. slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +44 -2
  134. slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +14 -3
  135. slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +7 -29
  136. slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +53 -71
  137. slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +20 -74
  138. slidge_whatsapp/vendor/golang.org/x/sys/unix/affinity_linux.go +1 -3
  139. slidge_whatsapp/vendor/golang.org/x/sys/unix/mkerrors.sh +3 -0
  140. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +1 -55
  141. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_solaris.go +1 -1
  142. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux.go +47 -16
  143. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +3 -0
  144. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +3 -0
  145. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +3 -0
  146. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +3 -0
  147. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +3 -0
  148. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +3 -0
  149. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +3 -0
  150. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +3 -0
  151. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +3 -0
  152. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +3 -0
  153. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +3 -0
  154. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +3 -0
  155. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +3 -0
  156. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +3 -0
  157. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +3 -0
  158. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +4 -4
  159. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +1 -0
  160. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +1 -0
  161. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +1 -0
  162. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +1 -0
  163. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +1 -0
  164. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +1 -0
  165. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +1 -0
  166. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +1 -0
  167. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +1 -0
  168. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +1 -0
  169. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +1 -0
  170. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +1 -0
  171. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +1 -0
  172. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +1 -0
  173. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +1 -0
  174. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux.go +168 -12
  175. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +17 -1
  176. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +16 -0
  177. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +18 -2
  178. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +16 -0
  179. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +16 -0
  180. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +17 -1
  181. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +16 -0
  182. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +16 -0
  183. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +17 -1
  184. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +18 -2
  185. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +16 -0
  186. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +16 -0
  187. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +16 -0
  188. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +16 -0
  189. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +16 -0
  190. slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +6 -0
  191. slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +483 -483
  192. slidge_whatsapp/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +25 -1
  193. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
  194. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +10 -5
  195. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/presence.go +33 -0
  196. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +6 -0
  197. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +68 -22
  198. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go +2 -1
  199. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go +8 -37
  200. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/presence.go +0 -3
  201. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
  202. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +8 -0
  203. slidge_whatsapp/vendor/modules.txt +43 -23
  204. {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/METADATA +2 -2
  205. {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/RECORD +208 -161
  206. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi_amd64.go +0 -7
  207. slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +0 -61
  208. slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +0 -16
  209. slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +0 -20
  210. {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/LICENSE +0 -0
  211. {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/WHEEL +0 -0
  212. {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/entry_points.txt +0 -0
@@ -371,7 +371,31 @@ func ConsumeVarint(b []byte) (v uint64, n int) {
371
371
  func SizeVarint(v uint64) int {
372
372
  // This computes 1 + (bits.Len64(v)-1)/7.
373
373
  // 9/64 is a good enough approximation of 1/7
374
- return int(9*uint32(bits.Len64(v))+64) / 64
374
+ //
375
+ // The Go compiler can translate the bits.LeadingZeros64 call into the LZCNT
376
+ // instruction, which is very fast on CPUs from the last few years. The
377
+ // specific way of expressing the calculation matches C++ Protobuf, see
378
+ // https://godbolt.org/z/4P3h53oM4 for the C++ code and how gcc/clang
379
+ // optimize that function for GOAMD64=v1 and GOAMD64=v3 (-march=haswell).
380
+
381
+ // By OR'ing v with 1, we guarantee that v is never 0, without changing the
382
+ // result of SizeVarint. LZCNT is not defined for 0, meaning the compiler
383
+ // needs to add extra instructions to handle that case.
384
+ //
385
+ // The Go compiler currently (go1.24.4) does not make use of this knowledge.
386
+ // This opportunity (removing the XOR instruction, which handles the 0 case)
387
+ // results in a small (1%) performance win across CPU architectures.
388
+ //
389
+ // Independently of avoiding the 0 case, we need the v |= 1 line because
390
+ // it allows the Go compiler to eliminate an extra XCHGL barrier.
391
+ v |= 1
392
+
393
+ // It would be clearer to write log2value := 63 - uint32(...), but
394
+ // writing uint32(...) ^ 63 is much more efficient (-14% ARM, -20% Intel).
395
+ // Proof of identity for our value range [0..63]:
396
+ // https://go.dev/play/p/Pdn9hEWYakX
397
+ log2value := uint32(bits.LeadingZeros64(v)) ^ 63
398
+ return int((log2value*9 + (64 + 9)) / 64)
375
399
  }
376
400
 
377
401
  // AppendFixed32 appends v to b as a little-endian uint32.
@@ -13,8 +13,10 @@ import (
13
13
  "google.golang.org/protobuf/reflect/protoreflect"
14
14
  )
15
15
 
16
- var defaultsCache = make(map[Edition]EditionFeatures)
17
- var defaultsKeys = []Edition{}
16
+ var (
17
+ defaultsCache = make(map[Edition]EditionFeatures)
18
+ defaultsKeys = []Edition{}
19
+ )
18
20
 
19
21
  func init() {
20
22
  unmarshalEditionDefaults(editiondefaults.Defaults)
@@ -41,7 +43,7 @@ func unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures {
41
43
  b = b[m:]
42
44
  parent.StripEnumPrefix = int(v)
43
45
  default:
44
- panic(fmt.Sprintf("unkown field number %d while unmarshalling GoFeatures", num))
46
+ panic(fmt.Sprintf("unknown field number %d while unmarshalling GoFeatures", num))
45
47
  }
46
48
  }
47
49
  return parent
@@ -72,8 +74,11 @@ func unmarshalFeatureSet(b []byte, parent EditionFeatures) EditionFeatures {
72
74
  case genid.FeatureSet_EnforceNamingStyle_field_number:
73
75
  // EnforceNamingStyle is enforced in protoc, languages other than C++
74
76
  // are not supposed to do anything with this feature.
77
+ case genid.FeatureSet_DefaultSymbolVisibility_field_number:
78
+ // DefaultSymbolVisibility is enforced in protoc, runtimes should not
79
+ // inspect this value.
75
80
  default:
76
- panic(fmt.Sprintf("unkown field number %d while unmarshalling FeatureSet", num))
81
+ panic(fmt.Sprintf("unknown field number %d while unmarshalling FeatureSet", num))
77
82
  }
78
83
  case protowire.BytesType:
79
84
  v, m := protowire.ConsumeBytes(b)
@@ -147,7 +152,7 @@ func unmarshalEditionDefaults(b []byte) {
147
152
  _, m := protowire.ConsumeVarint(b)
148
153
  b = b[m:]
149
154
  default:
150
- panic(fmt.Sprintf("unkown field number %d while unmarshalling EditionDefault", num))
155
+ panic(fmt.Sprintf("unknown field number %d while unmarshalling EditionDefault", num))
151
156
  }
152
157
  }
153
158
  }
@@ -0,0 +1,33 @@
1
+ // Copyright 2025 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package filedesc
6
+
7
+ import "google.golang.org/protobuf/reflect/protoreflect"
8
+
9
+ // UsePresenceForField reports whether the presence bitmap should be used for
10
+ // the specified field.
11
+ func UsePresenceForField(fd protoreflect.FieldDescriptor) (usePresence, canBeLazy bool) {
12
+ switch {
13
+ case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
14
+ // Oneof fields never use the presence bitmap.
15
+ //
16
+ // Synthetic oneofs are an exception: Those are used to implement proto3
17
+ // optional fields and hence should follow non-oneof field semantics.
18
+ return false, false
19
+
20
+ case fd.IsMap():
21
+ // Map-typed fields never use the presence bitmap.
22
+ return false, false
23
+
24
+ case fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind:
25
+ // Lazy fields always use the presence bitmap (only messages can be lazy).
26
+ isLazy := fd.(interface{ IsLazy() bool }).IsLazy()
27
+ return isLazy, isLazy
28
+
29
+ default:
30
+ // If the field has presence, use the presence bitmap.
31
+ return fd.HasPresence(), false
32
+ }
33
+ }
@@ -27,6 +27,7 @@ const (
27
27
  Api_SourceContext_field_name protoreflect.Name = "source_context"
28
28
  Api_Mixins_field_name protoreflect.Name = "mixins"
29
29
  Api_Syntax_field_name protoreflect.Name = "syntax"
30
+ Api_Edition_field_name protoreflect.Name = "edition"
30
31
 
31
32
  Api_Name_field_fullname protoreflect.FullName = "google.protobuf.Api.name"
32
33
  Api_Methods_field_fullname protoreflect.FullName = "google.protobuf.Api.methods"
@@ -35,6 +36,7 @@ const (
35
36
  Api_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Api.source_context"
36
37
  Api_Mixins_field_fullname protoreflect.FullName = "google.protobuf.Api.mixins"
37
38
  Api_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Api.syntax"
39
+ Api_Edition_field_fullname protoreflect.FullName = "google.protobuf.Api.edition"
38
40
  )
39
41
 
40
42
  // Field numbers for google.protobuf.Api.
@@ -46,6 +48,7 @@ const (
46
48
  Api_SourceContext_field_number protoreflect.FieldNumber = 5
47
49
  Api_Mixins_field_number protoreflect.FieldNumber = 6
48
50
  Api_Syntax_field_number protoreflect.FieldNumber = 7
51
+ Api_Edition_field_number protoreflect.FieldNumber = 8
49
52
  )
50
53
 
51
54
  // Names for google.protobuf.Method.
@@ -63,6 +66,7 @@ const (
63
66
  Method_ResponseStreaming_field_name protoreflect.Name = "response_streaming"
64
67
  Method_Options_field_name protoreflect.Name = "options"
65
68
  Method_Syntax_field_name protoreflect.Name = "syntax"
69
+ Method_Edition_field_name protoreflect.Name = "edition"
66
70
 
67
71
  Method_Name_field_fullname protoreflect.FullName = "google.protobuf.Method.name"
68
72
  Method_RequestTypeUrl_field_fullname protoreflect.FullName = "google.protobuf.Method.request_type_url"
@@ -71,6 +75,7 @@ const (
71
75
  Method_ResponseStreaming_field_fullname protoreflect.FullName = "google.protobuf.Method.response_streaming"
72
76
  Method_Options_field_fullname protoreflect.FullName = "google.protobuf.Method.options"
73
77
  Method_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Method.syntax"
78
+ Method_Edition_field_fullname protoreflect.FullName = "google.protobuf.Method.edition"
74
79
  )
75
80
 
76
81
  // Field numbers for google.protobuf.Method.
@@ -82,6 +87,7 @@ const (
82
87
  Method_ResponseStreaming_field_number protoreflect.FieldNumber = 5
83
88
  Method_Options_field_number protoreflect.FieldNumber = 6
84
89
  Method_Syntax_field_number protoreflect.FieldNumber = 7
90
+ Method_Edition_field_number protoreflect.FieldNumber = 8
85
91
  )
86
92
 
87
93
  // Names for google.protobuf.Mixin.
@@ -34,6 +34,19 @@ const (
34
34
  Edition_EDITION_MAX_enum_value = 2147483647
35
35
  )
36
36
 
37
+ // Full and short names for google.protobuf.SymbolVisibility.
38
+ const (
39
+ SymbolVisibility_enum_fullname = "google.protobuf.SymbolVisibility"
40
+ SymbolVisibility_enum_name = "SymbolVisibility"
41
+ )
42
+
43
+ // Enum values for google.protobuf.SymbolVisibility.
44
+ const (
45
+ SymbolVisibility_VISIBILITY_UNSET_enum_value = 0
46
+ SymbolVisibility_VISIBILITY_LOCAL_enum_value = 1
47
+ SymbolVisibility_VISIBILITY_EXPORT_enum_value = 2
48
+ )
49
+
37
50
  // Names for google.protobuf.FileDescriptorSet.
38
51
  const (
39
52
  FileDescriptorSet_message_name protoreflect.Name = "FileDescriptorSet"
@@ -65,6 +78,7 @@ const (
65
78
  FileDescriptorProto_Dependency_field_name protoreflect.Name = "dependency"
66
79
  FileDescriptorProto_PublicDependency_field_name protoreflect.Name = "public_dependency"
67
80
  FileDescriptorProto_WeakDependency_field_name protoreflect.Name = "weak_dependency"
81
+ FileDescriptorProto_OptionDependency_field_name protoreflect.Name = "option_dependency"
68
82
  FileDescriptorProto_MessageType_field_name protoreflect.Name = "message_type"
69
83
  FileDescriptorProto_EnumType_field_name protoreflect.Name = "enum_type"
70
84
  FileDescriptorProto_Service_field_name protoreflect.Name = "service"
@@ -79,6 +93,7 @@ const (
79
93
  FileDescriptorProto_Dependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.dependency"
80
94
  FileDescriptorProto_PublicDependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.public_dependency"
81
95
  FileDescriptorProto_WeakDependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.weak_dependency"
96
+ FileDescriptorProto_OptionDependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.option_dependency"
82
97
  FileDescriptorProto_MessageType_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.message_type"
83
98
  FileDescriptorProto_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.enum_type"
84
99
  FileDescriptorProto_Service_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.service"
@@ -96,6 +111,7 @@ const (
96
111
  FileDescriptorProto_Dependency_field_number protoreflect.FieldNumber = 3
97
112
  FileDescriptorProto_PublicDependency_field_number protoreflect.FieldNumber = 10
98
113
  FileDescriptorProto_WeakDependency_field_number protoreflect.FieldNumber = 11
114
+ FileDescriptorProto_OptionDependency_field_number protoreflect.FieldNumber = 15
99
115
  FileDescriptorProto_MessageType_field_number protoreflect.FieldNumber = 4
100
116
  FileDescriptorProto_EnumType_field_number protoreflect.FieldNumber = 5
101
117
  FileDescriptorProto_Service_field_number protoreflect.FieldNumber = 6
@@ -124,6 +140,7 @@ const (
124
140
  DescriptorProto_Options_field_name protoreflect.Name = "options"
125
141
  DescriptorProto_ReservedRange_field_name protoreflect.Name = "reserved_range"
126
142
  DescriptorProto_ReservedName_field_name protoreflect.Name = "reserved_name"
143
+ DescriptorProto_Visibility_field_name protoreflect.Name = "visibility"
127
144
 
128
145
  DescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.name"
129
146
  DescriptorProto_Field_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.field"
@@ -135,6 +152,7 @@ const (
135
152
  DescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.options"
136
153
  DescriptorProto_ReservedRange_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.reserved_range"
137
154
  DescriptorProto_ReservedName_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.reserved_name"
155
+ DescriptorProto_Visibility_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.visibility"
138
156
  )
139
157
 
140
158
  // Field numbers for google.protobuf.DescriptorProto.
@@ -149,6 +167,7 @@ const (
149
167
  DescriptorProto_Options_field_number protoreflect.FieldNumber = 7
150
168
  DescriptorProto_ReservedRange_field_number protoreflect.FieldNumber = 9
151
169
  DescriptorProto_ReservedName_field_number protoreflect.FieldNumber = 10
170
+ DescriptorProto_Visibility_field_number protoreflect.FieldNumber = 11
152
171
  )
153
172
 
154
173
  // Names for google.protobuf.DescriptorProto.ExtensionRange.
@@ -388,12 +407,14 @@ const (
388
407
  EnumDescriptorProto_Options_field_name protoreflect.Name = "options"
389
408
  EnumDescriptorProto_ReservedRange_field_name protoreflect.Name = "reserved_range"
390
409
  EnumDescriptorProto_ReservedName_field_name protoreflect.Name = "reserved_name"
410
+ EnumDescriptorProto_Visibility_field_name protoreflect.Name = "visibility"
391
411
 
392
412
  EnumDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.name"
393
413
  EnumDescriptorProto_Value_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.value"
394
414
  EnumDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.options"
395
415
  EnumDescriptorProto_ReservedRange_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.reserved_range"
396
416
  EnumDescriptorProto_ReservedName_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.reserved_name"
417
+ EnumDescriptorProto_Visibility_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.visibility"
397
418
  )
398
419
 
399
420
  // Field numbers for google.protobuf.EnumDescriptorProto.
@@ -403,6 +424,7 @@ const (
403
424
  EnumDescriptorProto_Options_field_number protoreflect.FieldNumber = 3
404
425
  EnumDescriptorProto_ReservedRange_field_number protoreflect.FieldNumber = 4
405
426
  EnumDescriptorProto_ReservedName_field_number protoreflect.FieldNumber = 5
427
+ EnumDescriptorProto_Visibility_field_number protoreflect.FieldNumber = 6
406
428
  )
407
429
 
408
430
  // Names for google.protobuf.EnumDescriptorProto.EnumReservedRange.
@@ -1008,32 +1030,35 @@ const (
1008
1030
 
1009
1031
  // Field names for google.protobuf.FeatureSet.
1010
1032
  const (
1011
- FeatureSet_FieldPresence_field_name protoreflect.Name = "field_presence"
1012
- FeatureSet_EnumType_field_name protoreflect.Name = "enum_type"
1013
- FeatureSet_RepeatedFieldEncoding_field_name protoreflect.Name = "repeated_field_encoding"
1014
- FeatureSet_Utf8Validation_field_name protoreflect.Name = "utf8_validation"
1015
- FeatureSet_MessageEncoding_field_name protoreflect.Name = "message_encoding"
1016
- FeatureSet_JsonFormat_field_name protoreflect.Name = "json_format"
1017
- FeatureSet_EnforceNamingStyle_field_name protoreflect.Name = "enforce_naming_style"
1018
-
1019
- FeatureSet_FieldPresence_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.field_presence"
1020
- FeatureSet_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enum_type"
1021
- FeatureSet_RepeatedFieldEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.repeated_field_encoding"
1022
- FeatureSet_Utf8Validation_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.utf8_validation"
1023
- FeatureSet_MessageEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.message_encoding"
1024
- FeatureSet_JsonFormat_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.json_format"
1025
- FeatureSet_EnforceNamingStyle_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enforce_naming_style"
1033
+ FeatureSet_FieldPresence_field_name protoreflect.Name = "field_presence"
1034
+ FeatureSet_EnumType_field_name protoreflect.Name = "enum_type"
1035
+ FeatureSet_RepeatedFieldEncoding_field_name protoreflect.Name = "repeated_field_encoding"
1036
+ FeatureSet_Utf8Validation_field_name protoreflect.Name = "utf8_validation"
1037
+ FeatureSet_MessageEncoding_field_name protoreflect.Name = "message_encoding"
1038
+ FeatureSet_JsonFormat_field_name protoreflect.Name = "json_format"
1039
+ FeatureSet_EnforceNamingStyle_field_name protoreflect.Name = "enforce_naming_style"
1040
+ FeatureSet_DefaultSymbolVisibility_field_name protoreflect.Name = "default_symbol_visibility"
1041
+
1042
+ FeatureSet_FieldPresence_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.field_presence"
1043
+ FeatureSet_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enum_type"
1044
+ FeatureSet_RepeatedFieldEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.repeated_field_encoding"
1045
+ FeatureSet_Utf8Validation_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.utf8_validation"
1046
+ FeatureSet_MessageEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.message_encoding"
1047
+ FeatureSet_JsonFormat_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.json_format"
1048
+ FeatureSet_EnforceNamingStyle_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enforce_naming_style"
1049
+ FeatureSet_DefaultSymbolVisibility_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.default_symbol_visibility"
1026
1050
  )
1027
1051
 
1028
1052
  // Field numbers for google.protobuf.FeatureSet.
1029
1053
  const (
1030
- FeatureSet_FieldPresence_field_number protoreflect.FieldNumber = 1
1031
- FeatureSet_EnumType_field_number protoreflect.FieldNumber = 2
1032
- FeatureSet_RepeatedFieldEncoding_field_number protoreflect.FieldNumber = 3
1033
- FeatureSet_Utf8Validation_field_number protoreflect.FieldNumber = 4
1034
- FeatureSet_MessageEncoding_field_number protoreflect.FieldNumber = 5
1035
- FeatureSet_JsonFormat_field_number protoreflect.FieldNumber = 6
1036
- FeatureSet_EnforceNamingStyle_field_number protoreflect.FieldNumber = 7
1054
+ FeatureSet_FieldPresence_field_number protoreflect.FieldNumber = 1
1055
+ FeatureSet_EnumType_field_number protoreflect.FieldNumber = 2
1056
+ FeatureSet_RepeatedFieldEncoding_field_number protoreflect.FieldNumber = 3
1057
+ FeatureSet_Utf8Validation_field_number protoreflect.FieldNumber = 4
1058
+ FeatureSet_MessageEncoding_field_number protoreflect.FieldNumber = 5
1059
+ FeatureSet_JsonFormat_field_number protoreflect.FieldNumber = 6
1060
+ FeatureSet_EnforceNamingStyle_field_number protoreflect.FieldNumber = 7
1061
+ FeatureSet_DefaultSymbolVisibility_field_number protoreflect.FieldNumber = 8
1037
1062
  )
1038
1063
 
1039
1064
  // Full and short names for google.protobuf.FeatureSet.FieldPresence.
@@ -1128,6 +1153,27 @@ const (
1128
1153
  FeatureSet_STYLE_LEGACY_enum_value = 2
1129
1154
  )
1130
1155
 
1156
+ // Names for google.protobuf.FeatureSet.VisibilityFeature.
1157
+ const (
1158
+ FeatureSet_VisibilityFeature_message_name protoreflect.Name = "VisibilityFeature"
1159
+ FeatureSet_VisibilityFeature_message_fullname protoreflect.FullName = "google.protobuf.FeatureSet.VisibilityFeature"
1160
+ )
1161
+
1162
+ // Full and short names for google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility.
1163
+ const (
1164
+ FeatureSet_VisibilityFeature_DefaultSymbolVisibility_enum_fullname = "google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility"
1165
+ FeatureSet_VisibilityFeature_DefaultSymbolVisibility_enum_name = "DefaultSymbolVisibility"
1166
+ )
1167
+
1168
+ // Enum values for google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility.
1169
+ const (
1170
+ FeatureSet_VisibilityFeature_DEFAULT_SYMBOL_VISIBILITY_UNKNOWN_enum_value = 0
1171
+ FeatureSet_VisibilityFeature_EXPORT_ALL_enum_value = 1
1172
+ FeatureSet_VisibilityFeature_EXPORT_TOP_LEVEL_enum_value = 2
1173
+ FeatureSet_VisibilityFeature_LOCAL_ALL_enum_value = 3
1174
+ FeatureSet_VisibilityFeature_STRICT_enum_value = 4
1175
+ )
1176
+
1131
1177
  // Names for google.protobuf.FeatureSetDefaults.
1132
1178
  const (
1133
1179
  FeatureSetDefaults_message_name protoreflect.Name = "FeatureSetDefaults"
@@ -11,6 +11,7 @@ import (
11
11
 
12
12
  "google.golang.org/protobuf/encoding/protowire"
13
13
  "google.golang.org/protobuf/internal/encoding/messageset"
14
+ "google.golang.org/protobuf/internal/filedesc"
14
15
  "google.golang.org/protobuf/internal/order"
15
16
  "google.golang.org/protobuf/reflect/protoreflect"
16
17
  piface "google.golang.org/protobuf/runtime/protoiface"
@@ -80,7 +81,7 @@ func (mi *MessageInfo) makeOpaqueCoderMethods(t reflect.Type, si opaqueStructInf
80
81
  // permit us to skip over definitely-unset fields at marshal time.
81
82
 
82
83
  var hasPresence bool
83
- hasPresence, cf.isLazy = usePresenceForField(si, fd)
84
+ hasPresence, cf.isLazy = filedesc.UsePresenceForField(fd)
84
85
 
85
86
  if hasPresence {
86
87
  cf.presenceIndex, mi.presenceSize = presenceIndex(mi.Desc, fd)
@@ -11,6 +11,7 @@ import (
11
11
  "strings"
12
12
  "sync/atomic"
13
13
 
14
+ "google.golang.org/protobuf/internal/filedesc"
14
15
  "google.golang.org/protobuf/reflect/protoreflect"
15
16
  )
16
17
 
@@ -53,7 +54,7 @@ func opaqueInitHook(mi *MessageInfo) bool {
53
54
  fd := fds.Get(i)
54
55
  fs := si.fieldsByNumber[fd.Number()]
55
56
  var fi fieldInfo
56
- usePresence, _ := usePresenceForField(si, fd)
57
+ usePresence, _ := filedesc.UsePresenceForField(fd)
57
58
 
58
59
  switch {
59
60
  case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
@@ -343,17 +344,15 @@ func (mi *MessageInfo) fieldInfoForMessageListOpaqueNoPresence(si opaqueStructIn
343
344
  if p.IsNil() {
344
345
  return false
345
346
  }
346
- sp := p.Apply(fieldOffset).AtomicGetPointer()
347
- if sp.IsNil() {
347
+ rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
348
+ if rv.IsNil() {
348
349
  return false
349
350
  }
350
- rv := sp.AsValueOf(fs.Type.Elem())
351
351
  return rv.Elem().Len() > 0
352
352
  },
353
353
  clear: func(p pointer) {
354
- sp := p.Apply(fieldOffset).AtomicGetPointer()
355
- if !sp.IsNil() {
356
- rv := sp.AsValueOf(fs.Type.Elem())
354
+ rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
355
+ if !rv.IsNil() {
357
356
  rv.Elem().Set(reflect.Zero(rv.Type().Elem()))
358
357
  }
359
358
  },
@@ -361,11 +360,10 @@ func (mi *MessageInfo) fieldInfoForMessageListOpaqueNoPresence(si opaqueStructIn
361
360
  if p.IsNil() {
362
361
  return conv.Zero()
363
362
  }
364
- sp := p.Apply(fieldOffset).AtomicGetPointer()
365
- if sp.IsNil() {
363
+ rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
364
+ if rv.IsNil() {
366
365
  return conv.Zero()
367
366
  }
368
- rv := sp.AsValueOf(fs.Type.Elem())
369
367
  if rv.Elem().Len() == 0 {
370
368
  return conv.Zero()
371
369
  }
@@ -598,30 +596,3 @@ func (mi *MessageInfo) clearPresent(p pointer, index uint32) {
598
596
  func (mi *MessageInfo) present(p pointer, index uint32) bool {
599
597
  return p.Apply(mi.presenceOffset).PresenceInfo().Present(index)
600
598
  }
601
-
602
- // usePresenceForField implements the somewhat intricate logic of when
603
- // the presence bitmap is used for a field. The main logic is that a
604
- // field that is optional or that can be lazy will use the presence
605
- // bit, but for proto2, also maps have a presence bit. It also records
606
- // if the field can ever be lazy, which is true if we have a
607
- // lazyOffset and the field is a message or a slice of messages. A
608
- // field that is lazy will always need a presence bit. Oneofs are not
609
- // lazy and do not use presence, unless they are a synthetic oneof,
610
- // which is a proto3 optional field. For proto3 optionals, we use the
611
- // presence and they can also be lazy when applicable (a message).
612
- func usePresenceForField(si opaqueStructInfo, fd protoreflect.FieldDescriptor) (usePresence, canBeLazy bool) {
613
- hasLazyField := fd.(interface{ IsLazy() bool }).IsLazy()
614
-
615
- // Non-oneof scalar fields with explicit field presence use the presence array.
616
- usesPresenceArray := fd.HasPresence() && fd.Message() == nil && (fd.ContainingOneof() == nil || fd.ContainingOneof().IsSynthetic())
617
- switch {
618
- case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
619
- return false, false
620
- case fd.IsMap():
621
- return false, false
622
- case fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind:
623
- return hasLazyField, hasLazyField
624
- default:
625
- return usesPresenceArray || (hasLazyField && fd.HasPresence()), false
626
- }
627
- }
@@ -32,9 +32,6 @@ func (p presence) toElem(num uint32) (ret *uint32) {
32
32
 
33
33
  // Present checks for the presence of a specific field number in a presence set.
34
34
  func (p presence) Present(num uint32) bool {
35
- if p.P == nil {
36
- return false
37
- }
38
35
  return Export{}.Present(p.toElem(num), num)
39
36
  }
40
37
 
@@ -52,7 +52,7 @@ import (
52
52
  const (
53
53
  Major = 1
54
54
  Minor = 36
55
- Patch = 6
55
+ Patch = 9
56
56
  PreRelease = ""
57
57
  )
58
58
 
@@ -21,6 +21,8 @@ func (p *SourcePath) appendFileDescriptorProto(b []byte) []byte {
21
21
  b = p.appendRepeatedField(b, "public_dependency", nil)
22
22
  case 11:
23
23
  b = p.appendRepeatedField(b, "weak_dependency", nil)
24
+ case 15:
25
+ b = p.appendRepeatedField(b, "option_dependency", nil)
24
26
  case 4:
25
27
  b = p.appendRepeatedField(b, "message_type", (*SourcePath).appendDescriptorProto)
26
28
  case 5:
@@ -66,6 +68,8 @@ func (p *SourcePath) appendDescriptorProto(b []byte) []byte {
66
68
  b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendDescriptorProto_ReservedRange)
67
69
  case 10:
68
70
  b = p.appendRepeatedField(b, "reserved_name", nil)
71
+ case 11:
72
+ b = p.appendSingularField(b, "visibility", nil)
69
73
  }
70
74
  return b
71
75
  }
@@ -85,6 +89,8 @@ func (p *SourcePath) appendEnumDescriptorProto(b []byte) []byte {
85
89
  b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendEnumDescriptorProto_EnumReservedRange)
86
90
  case 5:
87
91
  b = p.appendRepeatedField(b, "reserved_name", nil)
92
+ case 6:
93
+ b = p.appendSingularField(b, "visibility", nil)
88
94
  }
89
95
  return b
90
96
  }
@@ -400,6 +406,8 @@ func (p *SourcePath) appendFeatureSet(b []byte) []byte {
400
406
  b = p.appendSingularField(b, "json_format", nil)
401
407
  case 7:
402
408
  b = p.appendSingularField(b, "enforce_naming_style", nil)
409
+ case 8:
410
+ b = p.appendSingularField(b, "default_symbol_visibility", nil)
403
411
  }
404
412
  return b
405
413
  }
@@ -2,14 +2,29 @@
2
2
  ## explicit; go 1.20
3
3
  filippo.io/edwards25519
4
4
  filippo.io/edwards25519/field
5
+ # github.com/beeper/argo-go v1.1.2
6
+ ## explicit; go 1.23.0
7
+ github.com/beeper/argo-go/block
8
+ github.com/beeper/argo-go/codec
9
+ github.com/beeper/argo-go/header
10
+ github.com/beeper/argo-go/internal/util
11
+ github.com/beeper/argo-go/label
12
+ github.com/beeper/argo-go/pkg/bitset
13
+ github.com/beeper/argo-go/pkg/buf
14
+ github.com/beeper/argo-go/pkg/varint
15
+ github.com/beeper/argo-go/wire
16
+ github.com/beeper/argo-go/wirecodec
5
17
  # github.com/ebitengine/purego v0.8.4
6
18
  ## explicit; go 1.18
7
19
  github.com/ebitengine/purego
8
20
  github.com/ebitengine/purego/internal/cgo
9
21
  github.com/ebitengine/purego/internal/fakecgo
10
22
  github.com/ebitengine/purego/internal/strings
11
- # github.com/gen2brain/go-fitz v1.24.14
12
- ## explicit; go 1.22
23
+ # github.com/elliotchance/orderedmap/v3 v3.1.0
24
+ ## explicit; go 1.23.0
25
+ github.com/elliotchance/orderedmap/v3
26
+ # github.com/gen2brain/go-fitz v1.24.15
27
+ ## explicit; go 1.23.0
13
28
  github.com/gen2brain/go-fitz
14
29
  github.com/gen2brain/go-fitz/include/mupdf
15
30
  github.com/gen2brain/go-fitz/include/mupdf/fitz
@@ -29,7 +44,7 @@ github.com/h2non/filetype
29
44
  github.com/h2non/filetype/matchers
30
45
  github.com/h2non/filetype/matchers/isobmff
31
46
  github.com/h2non/filetype/types
32
- # github.com/jupiterrider/ffi v0.4.1
47
+ # github.com/jupiterrider/ffi v0.5.1
33
48
  ## explicit; go 1.18
34
49
  github.com/jupiterrider/ffi
35
50
  # github.com/mattn/go-colorable v0.1.14
@@ -38,10 +53,10 @@ github.com/mattn/go-colorable
38
53
  # github.com/mattn/go-isatty v0.0.20
39
54
  ## explicit; go 1.15
40
55
  github.com/mattn/go-isatty
41
- # github.com/mattn/go-sqlite3 v1.14.28
56
+ # github.com/mattn/go-sqlite3 v1.14.32
42
57
  ## explicit; go 1.19
43
58
  github.com/mattn/go-sqlite3
44
- # github.com/petermattis/goid v0.0.0-20250508124226-395b08cebbdb
59
+ # github.com/petermattis/goid v0.0.0-20250904145737-900bdf8bb490
45
60
  ## explicit; go 1.17
46
61
  github.com/petermattis/goid
47
62
  # github.com/rs/zerolog v1.34.0
@@ -50,6 +65,9 @@ github.com/rs/zerolog
50
65
  github.com/rs/zerolog/internal/cbor
51
66
  github.com/rs/zerolog/internal/json
52
67
  github.com/rs/zerolog/log
68
+ # github.com/vektah/gqlparser/v2 v2.5.30
69
+ ## explicit; go 1.22
70
+ github.com/vektah/gqlparser/v2/ast
53
71
  # go.mau.fi/libsignal v0.2.0
54
72
  ## explicit; go 1.23.0
55
73
  go.mau.fi/libsignal/cipher
@@ -78,8 +96,8 @@ go.mau.fi/libsignal/util/errorhelper
78
96
  go.mau.fi/libsignal/util/keyhelper
79
97
  go.mau.fi/libsignal/util/medium
80
98
  go.mau.fi/libsignal/util/optional
81
- # go.mau.fi/util v0.8.8
82
- ## explicit; go 1.23.0
99
+ # go.mau.fi/util v0.9.0
100
+ ## explicit; go 1.24.0
83
101
  go.mau.fi/util/dbutil
84
102
  go.mau.fi/util/exerrors
85
103
  go.mau.fi/util/exhttp
@@ -91,11 +109,12 @@ go.mau.fi/util/jsontime
91
109
  go.mau.fi/util/ptr
92
110
  go.mau.fi/util/random
93
111
  go.mau.fi/util/retryafter
94
- # go.mau.fi/whatsmeow v0.0.0-20250701221811-9adf672adc90
95
- ## explicit; go 1.23.0
112
+ # go.mau.fi/whatsmeow v0.0.0-20250905121447-8d6da61ecbfa
113
+ ## explicit; go 1.24.0
96
114
  go.mau.fi/whatsmeow
97
115
  go.mau.fi/whatsmeow/appstate
98
116
  go.mau.fi/whatsmeow/appstate/lthash
117
+ go.mau.fi/whatsmeow/argo
99
118
  go.mau.fi/whatsmeow/binary
100
119
  go.mau.fi/whatsmeow/binary/token
101
120
  go.mau.fi/whatsmeow/proto
@@ -114,6 +133,7 @@ go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef
114
133
  go.mau.fi/whatsmeow/proto/waAdv
115
134
  go.mau.fi/whatsmeow/proto/waArmadilloApplication
116
135
  go.mau.fi/whatsmeow/proto/waArmadilloXMA
136
+ go.mau.fi/whatsmeow/proto/waBotMetadata
117
137
  go.mau.fi/whatsmeow/proto/waCert
118
138
  go.mau.fi/whatsmeow/proto/waChatLockSettings
119
139
  go.mau.fi/whatsmeow/proto/waCommon
@@ -146,24 +166,24 @@ go.mau.fi/whatsmeow/util/gcmutil
146
166
  go.mau.fi/whatsmeow/util/hkdfutil
147
167
  go.mau.fi/whatsmeow/util/keys
148
168
  go.mau.fi/whatsmeow/util/log
149
- # golang.org/x/crypto v0.39.0
150
- ## explicit; go 1.23.0
169
+ # golang.org/x/crypto v0.42.0
170
+ ## explicit; go 1.24.0
151
171
  golang.org/x/crypto/curve25519
152
172
  golang.org/x/crypto/hkdf
153
173
  golang.org/x/crypto/pbkdf2
154
- # golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476
155
- ## explicit; go 1.23.0
174
+ # golang.org/x/exp v0.0.0-20250911091902-df9299821621
175
+ ## explicit; go 1.24.0
156
176
  golang.org/x/exp/constraints
157
- # golang.org/x/image v0.27.0
158
- ## explicit; go 1.23.0
177
+ # golang.org/x/image v0.31.0
178
+ ## explicit; go 1.24.0
159
179
  golang.org/x/image/draw
160
180
  golang.org/x/image/math/f64
161
181
  golang.org/x/image/riff
162
182
  golang.org/x/image/vp8
163
183
  golang.org/x/image/vp8l
164
184
  golang.org/x/image/webp
165
- # golang.org/x/net v0.41.0
166
- ## explicit; go 1.23.0
185
+ # golang.org/x/net v0.44.0
186
+ ## explicit; go 1.24.0
167
187
  golang.org/x/net/http/httpguts
168
188
  golang.org/x/net/http2
169
189
  golang.org/x/net/http2/hpack
@@ -171,18 +191,18 @@ golang.org/x/net/idna
171
191
  golang.org/x/net/internal/httpcommon
172
192
  golang.org/x/net/internal/socks
173
193
  golang.org/x/net/proxy
174
- # golang.org/x/sys v0.33.0
175
- ## explicit; go 1.23.0
194
+ # golang.org/x/sys v0.36.0
195
+ ## explicit; go 1.24.0
176
196
  golang.org/x/sys/unix
177
197
  golang.org/x/sys/windows
178
- # golang.org/x/text v0.26.0
179
- ## explicit; go 1.23.0
198
+ # golang.org/x/text v0.29.0
199
+ ## explicit; go 1.24.0
180
200
  golang.org/x/text/secure/bidirule
181
201
  golang.org/x/text/transform
182
202
  golang.org/x/text/unicode/bidi
183
203
  golang.org/x/text/unicode/norm
184
- # google.golang.org/protobuf v1.36.6
185
- ## explicit; go 1.22
204
+ # google.golang.org/protobuf v1.36.9
205
+ ## explicit; go 1.23
186
206
  google.golang.org/protobuf/encoding/prototext
187
207
  google.golang.org/protobuf/encoding/protowire
188
208
  google.golang.org/protobuf/internal/descfmt