mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
Auto-generate files after cl/970967137
Some checks failed
Tests / Bazel (push) Has been skipped
Auto-generate stale checked-in files / Refresh stale files (push) Failing after 0s
Tests / Apply Safe for Tests Label (push) Failing after 0s
Tests / Validate YAML (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Failing after 4s
Tests / C++ (push) Has been skipped
Tests / Java (push) Has been skipped
Tests / Python (push) Has been skipped
Tests / Ruby (push) Has been skipped
Tests / PHP (push) Has been skipped
Tests / Remove safety tag (push) Failing after 0s
Tests / PHP Extension (push) Has been skipped
Tests / C# (push) Has been skipped
Tests / Objective-C (push) Has been skipped
Tests / Rust (push) Has been skipped
Tests / μpb (push) Has been skipped
Tests / hpb (push) Has been skipped
Tests / Staleness (push) Has been cancelled
Tests / All Blocking Tests (push) Has been cancelled
Some checks failed
Tests / Bazel (push) Has been skipped
Auto-generate stale checked-in files / Refresh stale files (push) Failing after 0s
Tests / Apply Safe for Tests Label (push) Failing after 0s
Tests / Validate YAML (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Failing after 4s
Tests / C++ (push) Has been skipped
Tests / Java (push) Has been skipped
Tests / Python (push) Has been skipped
Tests / Ruby (push) Has been skipped
Tests / PHP (push) Has been skipped
Tests / Remove safety tag (push) Failing after 0s
Tests / PHP Extension (push) Has been skipped
Tests / C# (push) Has been skipped
Tests / Objective-C (push) Has been skipped
Tests / Rust (push) Has been skipped
Tests / μpb (push) Has been skipped
Tests / hpb (push) Has been skipped
Tests / Staleness (push) Has been cancelled
Tests / All Blocking Tests (push) Has been cancelled
This commit is contained in:
parent
6a21212800
commit
7b091ee68e
2 changed files with 52 additions and 38 deletions
|
|
@ -1360,27 +1360,30 @@ void UPB_PRIVATE(_upb_Arena_SwapIn)(struct upb_Arena* des,
|
|||
void UPB_PRIVATE(_upb_Arena_SwapOut)(struct upb_Arena* des,
|
||||
const struct upb_Arena* src);
|
||||
|
||||
UPB_INLINE size_t UPB_PRIVATE(_upb_ArenaHas)(const struct upb_Arena* a) {
|
||||
UPB_NODISCARD UPB_INLINE size_t
|
||||
UPB_PRIVATE(_upb_ArenaHas)(const struct upb_Arena* a) {
|
||||
return (size_t)(a->UPB_ONLYBITS(end) - a->UPB_ONLYBITS(ptr));
|
||||
}
|
||||
|
||||
UPB_INLINE size_t UPB_PRIVATE(_upb_Arena_AllocSpan)(size_t size) {
|
||||
UPB_NODISCARD UPB_INLINE size_t UPB_PRIVATE(_upb_Arena_AllocSpan)(size_t size) {
|
||||
return UPB_ALIGN_MALLOC(size) + UPB_PRIVATE(kUpb_Asan_GuardSize);
|
||||
}
|
||||
|
||||
UPB_INLINE bool UPB_PRIVATE(_upb_Arena_WasLastAllocFromCurrentBlock)(
|
||||
const struct upb_Arena* a, void* ptr, size_t size) {
|
||||
UPB_NODISCARD UPB_INLINE bool UPB_PRIVATE(
|
||||
_upb_Arena_WasLastAllocFromCurrentBlock)(const struct upb_Arena* a,
|
||||
void* ptr, size_t size) {
|
||||
return UPB_PRIVATE(upb_Xsan_PtrEq)(
|
||||
(char*)ptr + UPB_PRIVATE(_upb_Arena_AllocSpan)(size),
|
||||
a->UPB_ONLYBITS(ptr));
|
||||
}
|
||||
|
||||
UPB_INLINE bool UPB_PRIVATE(_upb_Arena_IsAligned)(const void* ptr) {
|
||||
UPB_NODISCARD UPB_INLINE bool UPB_PRIVATE(_upb_Arena_IsAligned)(
|
||||
const void* ptr) {
|
||||
return (uintptr_t)ptr % UPB_MALLOC_ALIGN == 0;
|
||||
}
|
||||
|
||||
UPB_API_INLINE void* _upb_Arena_Malloc_Unchecked(struct upb_Arena* a,
|
||||
size_t size) {
|
||||
UPB_NODISCARD UPB_API_INLINE void* _upb_Arena_Malloc_Unchecked(
|
||||
struct upb_Arena* a, size_t size) {
|
||||
UPB_PRIVATE(upb_Xsan_AccessReadWrite)(UPB_XSAN(a));
|
||||
|
||||
size_t span = UPB_PRIVATE(_upb_Arena_AllocSpan)(size);
|
||||
|
|
@ -1399,7 +1402,8 @@ UPB_API_INLINE void* _upb_Arena_Malloc_Unchecked(struct upb_Arena* a,
|
|||
return UPB_PRIVATE(upb_Xsan_NewUnpoisonedRegion)(UPB_XSAN(a), ret, size);
|
||||
}
|
||||
|
||||
UPB_API_INLINE void* upb_Arena_Malloc(struct upb_Arena* a, size_t size) {
|
||||
UPB_NODISCARD UPB_API_INLINE void* upb_Arena_Malloc(struct upb_Arena* a,
|
||||
size_t size) {
|
||||
if (!upb_AllocationCount_IncrementAndCheck()) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -1428,8 +1432,9 @@ UPB_API_INLINE void upb_Arena_ShrinkLast(struct upb_Arena* a, void* ptr,
|
|||
}
|
||||
}
|
||||
|
||||
UPB_API_INLINE bool upb_Arena_TryExtend(struct upb_Arena* a, void* ptr,
|
||||
size_t oldsize, size_t size) {
|
||||
UPB_NODISCARD UPB_API_INLINE bool upb_Arena_TryExtend(struct upb_Arena* a,
|
||||
void* ptr, size_t oldsize,
|
||||
size_t size) {
|
||||
UPB_ASSERT(ptr);
|
||||
UPB_ASSERT(size > oldsize);
|
||||
|
||||
|
|
@ -1446,8 +1451,9 @@ UPB_API_INLINE bool upb_Arena_TryExtend(struct upb_Arena* a, void* ptr,
|
|||
return false;
|
||||
}
|
||||
|
||||
UPB_API_INLINE void* upb_Arena_Realloc(struct upb_Arena* a, void* ptr,
|
||||
size_t oldsize, size_t size) {
|
||||
UPB_NODISCARD UPB_API_INLINE void* upb_Arena_Realloc(struct upb_Arena* a,
|
||||
void* ptr, size_t oldsize,
|
||||
size_t size) {
|
||||
UPB_PRIVATE(upb_Xsan_AccessReadWrite)(UPB_XSAN(a));
|
||||
|
||||
void* ret;
|
||||
|
|
@ -4841,9 +4847,9 @@ UPB_API_INLINE void upb_Message_SetBaseField(struct upb_Message* msg,
|
|||
(f, UPB_PRIVATE(_upb_Message_MutableDataPtr)(msg, f), val);
|
||||
}
|
||||
|
||||
UPB_API_INLINE bool upb_Message_SetExtension(struct upb_Message* msg,
|
||||
const upb_MiniTableExtension* e,
|
||||
const void* val, upb_Arena* a) {
|
||||
UPB_NODISCARD UPB_API_INLINE bool upb_Message_SetExtension(
|
||||
struct upb_Message* msg, const upb_MiniTableExtension* e, const void* val,
|
||||
upb_Arena* a) {
|
||||
UPB_ASSERT(!upb_Message_IsFrozen(msg));
|
||||
UPB_ASSERT(a);
|
||||
upb_Extension* ext =
|
||||
|
|
@ -4854,9 +4860,10 @@ UPB_API_INLINE bool upb_Message_SetExtension(struct upb_Message* msg,
|
|||
return true;
|
||||
}
|
||||
|
||||
UPB_API_INLINE bool UPB_PRIVATE(_upb_Message_SetNonCanonicalExtension)(
|
||||
struct upb_Message* msg, const upb_MiniTableExtension* e, const void* val,
|
||||
upb_Arena* a) {
|
||||
UPB_NODISCARD UPB_API_INLINE bool UPB_PRIVATE(
|
||||
_upb_Message_SetNonCanonicalExtension)(struct upb_Message* msg,
|
||||
const upb_MiniTableExtension* e,
|
||||
const void* val, upb_Arena* a) {
|
||||
UPB_ASSERT(!upb_Message_IsFrozen(msg));
|
||||
UPB_ASSERT(a);
|
||||
upb_Extension* ext =
|
||||
|
|
@ -4883,7 +4890,7 @@ UPB_INLINE bool UPB_PRIVATE(_upb_Message_SetField)(struct upb_Message* msg,
|
|||
}
|
||||
}
|
||||
|
||||
UPB_API_INLINE const upb_Array* upb_Message_GetArray(
|
||||
UPB_NODISCARD UPB_API_INLINE const upb_Array* upb_Message_GetArray(
|
||||
const struct upb_Message* msg, const upb_MiniTableField* f) {
|
||||
UPB_PRIVATE(_upb_MiniTableField_CheckIsArray)(f);
|
||||
upb_Array* ret;
|
||||
|
|
|
|||
|
|
@ -1360,27 +1360,30 @@ void UPB_PRIVATE(_upb_Arena_SwapIn)(struct upb_Arena* des,
|
|||
void UPB_PRIVATE(_upb_Arena_SwapOut)(struct upb_Arena* des,
|
||||
const struct upb_Arena* src);
|
||||
|
||||
UPB_INLINE size_t UPB_PRIVATE(_upb_ArenaHas)(const struct upb_Arena* a) {
|
||||
UPB_NODISCARD UPB_INLINE size_t
|
||||
UPB_PRIVATE(_upb_ArenaHas)(const struct upb_Arena* a) {
|
||||
return (size_t)(a->UPB_ONLYBITS(end) - a->UPB_ONLYBITS(ptr));
|
||||
}
|
||||
|
||||
UPB_INLINE size_t UPB_PRIVATE(_upb_Arena_AllocSpan)(size_t size) {
|
||||
UPB_NODISCARD UPB_INLINE size_t UPB_PRIVATE(_upb_Arena_AllocSpan)(size_t size) {
|
||||
return UPB_ALIGN_MALLOC(size) + UPB_PRIVATE(kUpb_Asan_GuardSize);
|
||||
}
|
||||
|
||||
UPB_INLINE bool UPB_PRIVATE(_upb_Arena_WasLastAllocFromCurrentBlock)(
|
||||
const struct upb_Arena* a, void* ptr, size_t size) {
|
||||
UPB_NODISCARD UPB_INLINE bool UPB_PRIVATE(
|
||||
_upb_Arena_WasLastAllocFromCurrentBlock)(const struct upb_Arena* a,
|
||||
void* ptr, size_t size) {
|
||||
return UPB_PRIVATE(upb_Xsan_PtrEq)(
|
||||
(char*)ptr + UPB_PRIVATE(_upb_Arena_AllocSpan)(size),
|
||||
a->UPB_ONLYBITS(ptr));
|
||||
}
|
||||
|
||||
UPB_INLINE bool UPB_PRIVATE(_upb_Arena_IsAligned)(const void* ptr) {
|
||||
UPB_NODISCARD UPB_INLINE bool UPB_PRIVATE(_upb_Arena_IsAligned)(
|
||||
const void* ptr) {
|
||||
return (uintptr_t)ptr % UPB_MALLOC_ALIGN == 0;
|
||||
}
|
||||
|
||||
UPB_API_INLINE void* _upb_Arena_Malloc_Unchecked(struct upb_Arena* a,
|
||||
size_t size) {
|
||||
UPB_NODISCARD UPB_API_INLINE void* _upb_Arena_Malloc_Unchecked(
|
||||
struct upb_Arena* a, size_t size) {
|
||||
UPB_PRIVATE(upb_Xsan_AccessReadWrite)(UPB_XSAN(a));
|
||||
|
||||
size_t span = UPB_PRIVATE(_upb_Arena_AllocSpan)(size);
|
||||
|
|
@ -1399,7 +1402,8 @@ UPB_API_INLINE void* _upb_Arena_Malloc_Unchecked(struct upb_Arena* a,
|
|||
return UPB_PRIVATE(upb_Xsan_NewUnpoisonedRegion)(UPB_XSAN(a), ret, size);
|
||||
}
|
||||
|
||||
UPB_API_INLINE void* upb_Arena_Malloc(struct upb_Arena* a, size_t size) {
|
||||
UPB_NODISCARD UPB_API_INLINE void* upb_Arena_Malloc(struct upb_Arena* a,
|
||||
size_t size) {
|
||||
if (!upb_AllocationCount_IncrementAndCheck()) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -1428,8 +1432,9 @@ UPB_API_INLINE void upb_Arena_ShrinkLast(struct upb_Arena* a, void* ptr,
|
|||
}
|
||||
}
|
||||
|
||||
UPB_API_INLINE bool upb_Arena_TryExtend(struct upb_Arena* a, void* ptr,
|
||||
size_t oldsize, size_t size) {
|
||||
UPB_NODISCARD UPB_API_INLINE bool upb_Arena_TryExtend(struct upb_Arena* a,
|
||||
void* ptr, size_t oldsize,
|
||||
size_t size) {
|
||||
UPB_ASSERT(ptr);
|
||||
UPB_ASSERT(size > oldsize);
|
||||
|
||||
|
|
@ -1446,8 +1451,9 @@ UPB_API_INLINE bool upb_Arena_TryExtend(struct upb_Arena* a, void* ptr,
|
|||
return false;
|
||||
}
|
||||
|
||||
UPB_API_INLINE void* upb_Arena_Realloc(struct upb_Arena* a, void* ptr,
|
||||
size_t oldsize, size_t size) {
|
||||
UPB_NODISCARD UPB_API_INLINE void* upb_Arena_Realloc(struct upb_Arena* a,
|
||||
void* ptr, size_t oldsize,
|
||||
size_t size) {
|
||||
UPB_PRIVATE(upb_Xsan_AccessReadWrite)(UPB_XSAN(a));
|
||||
|
||||
void* ret;
|
||||
|
|
@ -4841,9 +4847,9 @@ UPB_API_INLINE void upb_Message_SetBaseField(struct upb_Message* msg,
|
|||
(f, UPB_PRIVATE(_upb_Message_MutableDataPtr)(msg, f), val);
|
||||
}
|
||||
|
||||
UPB_API_INLINE bool upb_Message_SetExtension(struct upb_Message* msg,
|
||||
const upb_MiniTableExtension* e,
|
||||
const void* val, upb_Arena* a) {
|
||||
UPB_NODISCARD UPB_API_INLINE bool upb_Message_SetExtension(
|
||||
struct upb_Message* msg, const upb_MiniTableExtension* e, const void* val,
|
||||
upb_Arena* a) {
|
||||
UPB_ASSERT(!upb_Message_IsFrozen(msg));
|
||||
UPB_ASSERT(a);
|
||||
upb_Extension* ext =
|
||||
|
|
@ -4854,9 +4860,10 @@ UPB_API_INLINE bool upb_Message_SetExtension(struct upb_Message* msg,
|
|||
return true;
|
||||
}
|
||||
|
||||
UPB_API_INLINE bool UPB_PRIVATE(_upb_Message_SetNonCanonicalExtension)(
|
||||
struct upb_Message* msg, const upb_MiniTableExtension* e, const void* val,
|
||||
upb_Arena* a) {
|
||||
UPB_NODISCARD UPB_API_INLINE bool UPB_PRIVATE(
|
||||
_upb_Message_SetNonCanonicalExtension)(struct upb_Message* msg,
|
||||
const upb_MiniTableExtension* e,
|
||||
const void* val, upb_Arena* a) {
|
||||
UPB_ASSERT(!upb_Message_IsFrozen(msg));
|
||||
UPB_ASSERT(a);
|
||||
upb_Extension* ext =
|
||||
|
|
@ -4883,7 +4890,7 @@ UPB_INLINE bool UPB_PRIVATE(_upb_Message_SetField)(struct upb_Message* msg,
|
|||
}
|
||||
}
|
||||
|
||||
UPB_API_INLINE const upb_Array* upb_Message_GetArray(
|
||||
UPB_NODISCARD UPB_API_INLINE const upb_Array* upb_Message_GetArray(
|
||||
const struct upb_Message* msg, const upb_MiniTableField* f) {
|
||||
UPB_PRIVATE(_upb_MiniTableField_CheckIsArray)(f);
|
||||
upb_Array* ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue