Add read-update-write benchmark
Update the README with a new benchmark group and performance results. Include new data files and update the Rust benchmark implementation. Regenerate UPB bindings and fix a data path in the C benchmark runner.
This commit is contained in:
@@ -148,11 +148,12 @@ Two benchmark suites share the same binary data files and the same four
|
|||||||
measurement groups:
|
measurement groups:
|
||||||
|
|
||||||
| Group | What is timed |
|
| Group | What is timed |
|
||||||
| --------------- | ------------------------------------------------------- |
|
| ------------------- | ------------------------------------------------------- |
|
||||||
| `shallow_parse` | Become ready to read any field (one scan / full decode) |
|
| `shallow_parse` | Become ready to read any field (one scan / full decode) |
|
||||||
| `deep_parse` | Walk the full tree: Campaign → Operations → Hackers |
|
| `deep_parse` | Walk the full tree: Campaign → Operations → Hackers |
|
||||||
| `field_access` | Read individual fields on an already-parsed message |
|
| `field_access` | Read individual fields on an already-parsed message |
|
||||||
| `iterate` | Count top-level and nested repeated fields |
|
| `iterate` | Count top-level and nested repeated fields |
|
||||||
|
| `read_update_write` | Parse, update a field, and serialize back to a buffer |
|
||||||
|
|
||||||
### 1 — Generate the shared data files (do this once)
|
### 1 — Generate the shared data files (do this once)
|
||||||
|
|
||||||
@@ -267,6 +268,18 @@ criterion medians; C/upb times are the custom runner's mean over ≥ 0.5 s.
|
|||||||
> `shallow_parse`. `count_all_crew` also parses each `Operation` sub-message;
|
> `shallow_parse`. `count_all_crew` also parses each `Operation` sub-message;
|
||||||
> roto's per-level scans remain cheaper than upb's full decode.
|
> roto's per-level scans remain cheaper than upb's full decode.
|
||||||
|
|
||||||
|
#### `read_update_write` — parse, update a field, and serialize back to a buffer
|
||||||
|
|
||||||
|
| Size | Bytes | roto (ns) | upb (ns) | roto speedup |
|
||||||
|
| ------ | --------: | --------: | ----------: | -----------: |
|
||||||
|
| tiny | 588 | 153.8 | 1,120.3 | **7.3×** |
|
||||||
|
| small | 20,265 | 1,301.8 | 42,089.6 | **32.3×** |
|
||||||
|
| medium | 2,071,053 | 302,090.0 | 9,233,397.9 | **30.5×** |
|
||||||
|
|
||||||
|
> roto's `with()` method allows copying fields directly from the original binary
|
||||||
|
> without decoding them, making the update process extremely efficient. upb must
|
||||||
|
> fully parse the message into structs and then re-serialize the entire tree.
|
||||||
|
|
||||||
### Interpreting the comparison
|
### Interpreting the comparison
|
||||||
|
|
||||||
The two libraries have fundamentally different models:
|
The two libraries have fundamentally different models:
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
//! - `iterate` — counting repeated fields at different nesting depths
|
//! - `iterate` — counting repeated fields at different nesting depths
|
||||||
|
|
||||||
use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main};
|
use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main};
|
||||||
use roto_benches::hackers::{Campaign, Hacker, Operation, Worm};
|
use roto_benches::hackers::{Campaign, CampaignBuilder, Hacker, Operation, Worm};
|
||||||
use std::hint::black_box;
|
use std::hint::black_box;
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
@@ -223,9 +223,11 @@ fn bench_read_update_write(c: &mut Criterion) {
|
|||||||
let mut buf = vec![0u8; data.len() * 2];
|
let mut buf = vec![0u8; data.len() * 2];
|
||||||
let res = CampaignBuilder::builder(&mut buf)
|
let res = CampaignBuilder::builder(&mut buf)
|
||||||
.name("updated")
|
.name("updated")
|
||||||
|
.unwrap()
|
||||||
.with(&campaign)
|
.with(&campaign)
|
||||||
|
.unwrap()
|
||||||
.finish();
|
.finish();
|
||||||
black_box(res)
|
black_box(res.unwrap().len())
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+293
-192
@@ -10,58 +10,75 @@
|
|||||||
#define HACKERS_PROTO_UPB_H__UPB_H_
|
#define HACKERS_PROTO_UPB_H__UPB_H_
|
||||||
|
|
||||||
#include "upb/generated_code_support.h"
|
#include "upb/generated_code_support.h"
|
||||||
|
|
||||||
#include "hackers.upb_minitable.h"
|
#include "hackers.upb_minitable.h"
|
||||||
|
|
||||||
|
|
||||||
// Must be last.
|
// Must be last.
|
||||||
#include "upb/port/def.inc"
|
#include "upb/port/def.inc"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
typedef struct Tool {
|
||||||
|
upb_Message UPB_PRIVATE(base);
|
||||||
|
} Tool;
|
||||||
|
|
||||||
|
typedef struct Connection {
|
||||||
|
upb_Message UPB_PRIVATE(base);
|
||||||
|
} Connection;
|
||||||
|
|
||||||
|
typedef struct Hacker {
|
||||||
|
upb_Message UPB_PRIVATE(base);
|
||||||
|
} Hacker;
|
||||||
|
|
||||||
|
typedef struct Worm {
|
||||||
|
upb_Message UPB_PRIVATE(base);
|
||||||
|
} Worm;
|
||||||
|
|
||||||
|
typedef struct Operation {
|
||||||
|
upb_Message UPB_PRIVATE(base);
|
||||||
|
} Operation;
|
||||||
|
|
||||||
|
typedef struct Campaign {
|
||||||
|
upb_Message UPB_PRIVATE(base);
|
||||||
|
} Campaign;
|
||||||
|
|
||||||
typedef struct Tool { upb_Message UPB_PRIVATE(base); } Tool;
|
|
||||||
typedef struct Connection { upb_Message UPB_PRIVATE(base); } Connection;
|
|
||||||
typedef struct Hacker { upb_Message UPB_PRIVATE(base); } Hacker;
|
|
||||||
typedef struct Worm { upb_Message UPB_PRIVATE(base); } Worm;
|
|
||||||
typedef struct Operation { upb_Message UPB_PRIVATE(base); } Operation;
|
|
||||||
typedef struct Campaign { upb_Message UPB_PRIVATE(base); } Campaign;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Tool */
|
/* Tool */
|
||||||
|
|
||||||
UPB_INLINE Tool* Tool_new(upb_Arena* arena) {
|
UPB_INLINE Tool* Tool_new(upb_Arena* arena) {
|
||||||
return (Tool*)_upb_Message_New(&Tool_msg_init, arena);
|
return (Tool*)_upb_Message_New(&Tool_msg_init, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE Tool* Tool_parse(const char* buf, size_t size, upb_Arena* arena) {
|
UPB_INLINE Tool* Tool_parse(const char* buf, size_t size,
|
||||||
|
upb_Arena* arena) {
|
||||||
Tool* ret = Tool_new(arena);
|
Tool* ret = Tool_new(arena);
|
||||||
if (!ret) return NULL;
|
if (!ret) return NULL;
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Tool_msg_init, NULL, 0, arena) !=
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Tool_msg_init, NULL, 0,
|
||||||
kUpb_DecodeStatus_Ok) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
UPB_INLINE Tool* Tool_parse_ex(const char* buf, size_t size,
|
|
||||||
const upb_ExtensionRegistry* extreg,
|
|
||||||
int options, upb_Arena* arena) {
|
|
||||||
Tool* ret = Tool_new(arena);
|
|
||||||
if (!ret) return NULL;
|
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Tool_msg_init, extreg, options,
|
|
||||||
arena) != kUpb_DecodeStatus_Ok) {
|
arena) != kUpb_DecodeStatus_Ok) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Tool_serialize(const Tool* msg, upb_Arena* arena, size_t* len) {
|
UPB_INLINE Tool* Tool_parse_ex(
|
||||||
|
const char* buf, size_t size, const upb_ExtensionRegistry* extreg,
|
||||||
|
int options, upb_Arena* arena) {
|
||||||
|
Tool* ret = Tool_new(arena);
|
||||||
|
if (!ret) return NULL;
|
||||||
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Tool_msg_init, extreg,
|
||||||
|
options, arena) != kUpb_DecodeStatus_Ok) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
UPB_INLINE char* Tool_serialize(const Tool* msg,
|
||||||
|
upb_Arena* arena, size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Tool_msg_init, 0, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Tool_msg_init, 0, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Tool_serialize_ex(const Tool* msg, int options,
|
UPB_INLINE char* Tool_serialize_ex(const Tool* msg,
|
||||||
upb_Arena* arena, size_t* len) {
|
int options, upb_Arena* arena,
|
||||||
|
size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Tool_msg_init, options, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Tool_msg_init, options, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
@@ -149,37 +166,39 @@ UPB_INLINE void Tool_set_exploit_count(Tool *msg, int32_t value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Connection */
|
/* Connection */
|
||||||
|
|
||||||
UPB_INLINE Connection* Connection_new(upb_Arena* arena) {
|
UPB_INLINE Connection* Connection_new(upb_Arena* arena) {
|
||||||
return (Connection*)_upb_Message_New(&Connection_msg_init, arena);
|
return (Connection*)_upb_Message_New(&Connection_msg_init, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE Connection* Connection_parse(const char* buf, size_t size, upb_Arena* arena) {
|
UPB_INLINE Connection* Connection_parse(const char* buf, size_t size,
|
||||||
|
upb_Arena* arena) {
|
||||||
Connection* ret = Connection_new(arena);
|
Connection* ret = Connection_new(arena);
|
||||||
if (!ret) return NULL;
|
if (!ret) return NULL;
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Connection_msg_init, NULL, 0, arena) !=
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Connection_msg_init, NULL, 0,
|
||||||
kUpb_DecodeStatus_Ok) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
UPB_INLINE Connection* Connection_parse_ex(const char* buf, size_t size,
|
|
||||||
const upb_ExtensionRegistry* extreg,
|
|
||||||
int options, upb_Arena* arena) {
|
|
||||||
Connection* ret = Connection_new(arena);
|
|
||||||
if (!ret) return NULL;
|
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Connection_msg_init, extreg, options,
|
|
||||||
arena) != kUpb_DecodeStatus_Ok) {
|
arena) != kUpb_DecodeStatus_Ok) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Connection_serialize(const Connection* msg, upb_Arena* arena, size_t* len) {
|
UPB_INLINE Connection* Connection_parse_ex(
|
||||||
|
const char* buf, size_t size, const upb_ExtensionRegistry* extreg,
|
||||||
|
int options, upb_Arena* arena) {
|
||||||
|
Connection* ret = Connection_new(arena);
|
||||||
|
if (!ret) return NULL;
|
||||||
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Connection_msg_init, extreg,
|
||||||
|
options, arena) != kUpb_DecodeStatus_Ok) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
UPB_INLINE char* Connection_serialize(const Connection* msg,
|
||||||
|
upb_Arena* arena, size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Connection_msg_init, 0, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Connection_msg_init, 0, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Connection_serialize_ex(const Connection* msg, int options,
|
UPB_INLINE char* Connection_serialize_ex(const Connection* msg,
|
||||||
upb_Arena* arena, size_t* len) {
|
int options, upb_Arena* arena,
|
||||||
|
size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Connection_msg_init, options, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Connection_msg_init, options, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
@@ -267,37 +286,39 @@ UPB_INLINE void Connection_set_session_key(Connection *msg, upb_StringView value
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Hacker */
|
/* Hacker */
|
||||||
|
|
||||||
UPB_INLINE Hacker* Hacker_new(upb_Arena* arena) {
|
UPB_INLINE Hacker* Hacker_new(upb_Arena* arena) {
|
||||||
return (Hacker*)_upb_Message_New(&Hacker_msg_init, arena);
|
return (Hacker*)_upb_Message_New(&Hacker_msg_init, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE Hacker* Hacker_parse(const char* buf, size_t size, upb_Arena* arena) {
|
UPB_INLINE Hacker* Hacker_parse(const char* buf, size_t size,
|
||||||
|
upb_Arena* arena) {
|
||||||
Hacker* ret = Hacker_new(arena);
|
Hacker* ret = Hacker_new(arena);
|
||||||
if (!ret) return NULL;
|
if (!ret) return NULL;
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Hacker_msg_init, NULL, 0, arena) !=
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Hacker_msg_init, NULL, 0,
|
||||||
kUpb_DecodeStatus_Ok) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
UPB_INLINE Hacker* Hacker_parse_ex(const char* buf, size_t size,
|
|
||||||
const upb_ExtensionRegistry* extreg,
|
|
||||||
int options, upb_Arena* arena) {
|
|
||||||
Hacker* ret = Hacker_new(arena);
|
|
||||||
if (!ret) return NULL;
|
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Hacker_msg_init, extreg, options,
|
|
||||||
arena) != kUpb_DecodeStatus_Ok) {
|
arena) != kUpb_DecodeStatus_Ok) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Hacker_serialize(const Hacker* msg, upb_Arena* arena, size_t* len) {
|
UPB_INLINE Hacker* Hacker_parse_ex(
|
||||||
|
const char* buf, size_t size, const upb_ExtensionRegistry* extreg,
|
||||||
|
int options, upb_Arena* arena) {
|
||||||
|
Hacker* ret = Hacker_new(arena);
|
||||||
|
if (!ret) return NULL;
|
||||||
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Hacker_msg_init, extreg,
|
||||||
|
options, arena) != kUpb_DecodeStatus_Ok) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
UPB_INLINE char* Hacker_serialize(const Hacker* msg,
|
||||||
|
upb_Arena* arena, size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Hacker_msg_init, 0, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Hacker_msg_init, 0, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Hacker_serialize_ex(const Hacker* msg, int options,
|
UPB_INLINE char* Hacker_serialize_ex(const Hacker* msg,
|
||||||
upb_Arena* arena, size_t* len) {
|
int options, upb_Arena* arena,
|
||||||
|
size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Hacker_msg_init, options, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Hacker_msg_init, options, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
@@ -378,7 +399,8 @@ UPB_INLINE void Hacker_clear_exploits(Hacker* msg) {
|
|||||||
const upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_StringView const* Hacker_exploits(const Hacker* msg, size_t* size) {
|
UPB_INLINE upb_StringView const* Hacker_exploits(const Hacker* msg,
|
||||||
|
size_t* size) {
|
||||||
const upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -389,7 +411,10 @@ UPB_INLINE upb_StringView const* Hacker_exploits(const Hacker* msg, size_t* size
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE const upb_Array* _Hacker_exploits_upb_array(const Hacker* msg, size_t* size) {
|
|
||||||
|
//
|
||||||
|
UPB_INLINE const upb_Array* _Hacker_exploits_upb_array(
|
||||||
|
const Hacker* msg, size_t* size) {
|
||||||
const upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (size) {
|
if (size) {
|
||||||
@@ -397,7 +422,9 @@ UPB_INLINE const upb_Array* _Hacker_exploits_upb_array(const Hacker* msg, size_t
|
|||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_Array* _Hacker_exploits_mutable_upb_array(Hacker* msg, size_t* size, upb_Arena* arena) {
|
|
||||||
|
UPB_INLINE upb_Array* _Hacker_exploits_mutable_upb_array(
|
||||||
|
Hacker* msg, size_t* size, upb_Arena* arena) {
|
||||||
const upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
||||||
&field, arena);
|
&field, arena);
|
||||||
@@ -407,11 +434,12 @@ UPB_INLINE upb_Array* _Hacker_exploits_mutable_upb_array(Hacker* msg, size_t* si
|
|||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
UPB_INLINE void Hacker_clear_tools(Hacker* msg) {
|
UPB_INLINE void Hacker_clear_tools(Hacker* msg) {
|
||||||
const upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
||||||
}
|
}
|
||||||
UPB_INLINE const Tool* const* Hacker_tools(const Hacker* msg, size_t* size) {
|
UPB_INLINE const Tool* const* Hacker_tools(const Hacker* msg,
|
||||||
const upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
size_t* size) {
|
||||||
|
const upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Tool_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Tool_msg_init);
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -422,8 +450,11 @@ UPB_INLINE const Tool* const* Hacker_tools(const Hacker* msg, size_t* size) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE const upb_Array* _Hacker_tools_upb_array(const Hacker* msg, size_t* size) {
|
|
||||||
const upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
//
|
||||||
|
UPB_INLINE const upb_Array* _Hacker_tools_upb_array(
|
||||||
|
const Hacker* msg, size_t* size) {
|
||||||
|
const upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Tool_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Tool_msg_init);
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (size) {
|
if (size) {
|
||||||
@@ -431,8 +462,10 @@ UPB_INLINE const upb_Array* _Hacker_tools_upb_array(const Hacker* msg, size_t* s
|
|||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_Array* _Hacker_tools_mutable_upb_array(Hacker* msg, size_t* size, upb_Arena* arena) {
|
|
||||||
const upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
UPB_INLINE upb_Array* _Hacker_tools_mutable_upb_array(
|
||||||
|
Hacker* msg, size_t* size, upb_Arena* arena) {
|
||||||
|
const upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Tool_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Tool_msg_init);
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
||||||
&field, arena);
|
&field, arena);
|
||||||
@@ -442,20 +475,20 @@ UPB_INLINE upb_Array* _Hacker_tools_mutable_upb_array(Hacker* msg, size_t* size,
|
|||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
UPB_INLINE void Hacker_clear_active_connection(Hacker* msg) {
|
UPB_INLINE void Hacker_clear_active_connection(Hacker* msg) {
|
||||||
const upb_MiniTableField field = {9, UPB_SIZE(28, 80), 64, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {9, UPB_SIZE(28, 80), 64, UPB_SIZE(4, 6), 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
||||||
}
|
}
|
||||||
UPB_INLINE const Connection* Hacker_active_connection(const Hacker* msg) {
|
UPB_INLINE const Connection* Hacker_active_connection(const Hacker* msg) {
|
||||||
const Connection* default_val = NULL;
|
const Connection* default_val = NULL;
|
||||||
const Connection* ret;
|
const Connection* ret;
|
||||||
const upb_MiniTableField field = {9, UPB_SIZE(28, 80), 64, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {9, UPB_SIZE(28, 80), 64, UPB_SIZE(4, 6), 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Connection_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Connection_msg_init);
|
||||||
_upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
|
_upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
|
||||||
&default_val, &ret);
|
&default_val, &ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
UPB_INLINE bool Hacker_has_active_connection(const Hacker* msg) {
|
UPB_INLINE bool Hacker_has_active_connection(const Hacker* msg) {
|
||||||
const upb_MiniTableField field = {9, UPB_SIZE(28, 80), 64, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {9, UPB_SIZE(28, 80), 64, UPB_SIZE(4, 6), 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
return upb_Message_HasBaseField(UPB_UPCAST(msg), &field);
|
return upb_Message_HasBaseField(UPB_UPCAST(msg), &field);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -483,7 +516,8 @@ UPB_INLINE void Hacker_set_crew_id(Hacker *msg, int64_t value) {
|
|||||||
const upb_MiniTableField field = {6, UPB_SIZE(48, 56), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {6, UPB_SIZE(48, 56), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_StringView* Hacker_mutable_exploits(Hacker* msg, size_t* size) {
|
UPB_INLINE upb_StringView* Hacker_mutable_exploits(Hacker* msg,
|
||||||
|
size_t* size) {
|
||||||
upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -494,12 +528,16 @@ UPB_INLINE upb_StringView* Hacker_mutable_exploits(Hacker* msg, size_t* size) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_StringView* Hacker_resize_exploits(Hacker* msg, size_t size, upb_Arena* arena) {
|
|
||||||
|
UPB_INLINE upb_StringView* Hacker_resize_exploits(Hacker* msg,
|
||||||
|
size_t size,
|
||||||
|
upb_Arena* arena) {
|
||||||
upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
return (upb_StringView*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg),
|
return (upb_StringView*)upb_Message_ResizeArrayUninitialized(
|
||||||
&field, size, arena);
|
UPB_UPCAST(msg), &field, size, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE bool Hacker_add_exploits(Hacker* msg, upb_StringView val, upb_Arena* arena) {
|
UPB_INLINE bool Hacker_add_exploits(Hacker* msg, upb_StringView val,
|
||||||
|
upb_Arena* arena) {
|
||||||
upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
upb_MiniTableField field = {7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
||||||
UPB_UPCAST(msg), &field, arena);
|
UPB_UPCAST(msg), &field, arena);
|
||||||
@@ -511,8 +549,9 @@ UPB_INLINE bool Hacker_add_exploits(Hacker* msg, upb_StringView val, upb_Arena*
|
|||||||
(arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val));
|
(arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
UPB_INLINE Tool** Hacker_mutable_tools(Hacker* msg, size_t* size) {
|
UPB_INLINE Tool** Hacker_mutable_tools(Hacker* msg,
|
||||||
upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
size_t* size) {
|
||||||
|
upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Tool_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Tool_msg_init);
|
||||||
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -523,13 +562,18 @@ UPB_INLINE Tool** Hacker_mutable_tools(Hacker* msg, size_t* size) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE Tool** Hacker_resize_tools(Hacker* msg, size_t size, upb_Arena* arena) {
|
|
||||||
upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
UPB_INLINE Tool** Hacker_resize_tools(Hacker* msg,
|
||||||
return (Tool**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg),
|
size_t size,
|
||||||
&field, size, arena);
|
upb_Arena* arena) {
|
||||||
|
upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Tool_msg_init);
|
||||||
|
return (Tool**)upb_Message_ResizeArrayUninitialized(
|
||||||
|
UPB_UPCAST(msg), &field, size, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE struct Tool* Hacker_add_tools(Hacker* msg, upb_Arena* arena) {
|
UPB_INLINE struct Tool* Hacker_add_tools(
|
||||||
upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
Hacker* msg, upb_Arena* arena) {
|
||||||
|
upb_MiniTableField field = {8, UPB_SIZE(24, 72), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Tool_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Tool_msg_init);
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
||||||
UPB_UPCAST(msg), &field, arena);
|
UPB_UPCAST(msg), &field, arena);
|
||||||
@@ -537,18 +581,20 @@ UPB_INLINE struct Tool* Hacker_add_tools(Hacker* msg, upb_Arena* arena) {
|
|||||||
arr, arr->UPB_PRIVATE(size) + 1, arena)) {
|
arr, arr->UPB_PRIVATE(size) + 1, arena)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
struct Tool* sub = (struct Tool*)_upb_Message_New(&Tool_msg_init, arena);
|
struct Tool* sub =
|
||||||
|
(struct Tool*)_upb_Message_New(&Tool_msg_init, arena);
|
||||||
if (!arr || !sub) return NULL;
|
if (!arr || !sub) return NULL;
|
||||||
UPB_PRIVATE(_upb_Array_Set)
|
UPB_PRIVATE(_upb_Array_Set)
|
||||||
(arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub));
|
(arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub));
|
||||||
return sub;
|
return sub;
|
||||||
}
|
}
|
||||||
UPB_INLINE void Hacker_set_active_connection(Hacker* msg, Connection* value) {
|
UPB_INLINE void Hacker_set_active_connection(Hacker* msg, Connection* value) {
|
||||||
const upb_MiniTableField field = {9, UPB_SIZE(28, 80), 64, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {9, UPB_SIZE(28, 80), 64, UPB_SIZE(4, 6), 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Connection_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Connection_msg_init);
|
||||||
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
||||||
}
|
}
|
||||||
UPB_INLINE struct Connection* Hacker_mutable_active_connection(Hacker* msg, upb_Arena* arena) {
|
UPB_INLINE struct Connection* Hacker_mutable_active_connection(
|
||||||
|
Hacker* msg, upb_Arena* arena) {
|
||||||
struct Connection* sub = (struct Connection*)Hacker_active_connection(msg);
|
struct Connection* sub = (struct Connection*)Hacker_active_connection(msg);
|
||||||
if (sub == NULL) {
|
if (sub == NULL) {
|
||||||
sub = (struct Connection*)_upb_Message_New(&Connection_msg_init, arena);
|
sub = (struct Connection*)_upb_Message_New(&Connection_msg_init, arena);
|
||||||
@@ -558,37 +604,39 @@ UPB_INLINE struct Connection* Hacker_mutable_active_connection(Hacker* msg, upb_
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Worm */
|
/* Worm */
|
||||||
|
|
||||||
UPB_INLINE Worm* Worm_new(upb_Arena* arena) {
|
UPB_INLINE Worm* Worm_new(upb_Arena* arena) {
|
||||||
return (Worm*)_upb_Message_New(&Worm_msg_init, arena);
|
return (Worm*)_upb_Message_New(&Worm_msg_init, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE Worm* Worm_parse(const char* buf, size_t size, upb_Arena* arena) {
|
UPB_INLINE Worm* Worm_parse(const char* buf, size_t size,
|
||||||
|
upb_Arena* arena) {
|
||||||
Worm* ret = Worm_new(arena);
|
Worm* ret = Worm_new(arena);
|
||||||
if (!ret) return NULL;
|
if (!ret) return NULL;
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Worm_msg_init, NULL, 0, arena) !=
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Worm_msg_init, NULL, 0,
|
||||||
kUpb_DecodeStatus_Ok) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
UPB_INLINE Worm* Worm_parse_ex(const char* buf, size_t size,
|
|
||||||
const upb_ExtensionRegistry* extreg,
|
|
||||||
int options, upb_Arena* arena) {
|
|
||||||
Worm* ret = Worm_new(arena);
|
|
||||||
if (!ret) return NULL;
|
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Worm_msg_init, extreg, options,
|
|
||||||
arena) != kUpb_DecodeStatus_Ok) {
|
arena) != kUpb_DecodeStatus_Ok) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Worm_serialize(const Worm* msg, upb_Arena* arena, size_t* len) {
|
UPB_INLINE Worm* Worm_parse_ex(
|
||||||
|
const char* buf, size_t size, const upb_ExtensionRegistry* extreg,
|
||||||
|
int options, upb_Arena* arena) {
|
||||||
|
Worm* ret = Worm_new(arena);
|
||||||
|
if (!ret) return NULL;
|
||||||
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Worm_msg_init, extreg,
|
||||||
|
options, arena) != kUpb_DecodeStatus_Ok) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
UPB_INLINE char* Worm_serialize(const Worm* msg,
|
||||||
|
upb_Arena* arena, size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Worm_msg_init, 0, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Worm_msg_init, 0, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Worm_serialize_ex(const Worm* msg, int options,
|
UPB_INLINE char* Worm_serialize_ex(const Worm* msg,
|
||||||
upb_Arena* arena, size_t* len) {
|
int options, upb_Arena* arena,
|
||||||
|
size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Worm_msg_init, options, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Worm_msg_init, options, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
@@ -657,7 +705,8 @@ UPB_INLINE void Worm_clear_targets(Worm* msg) {
|
|||||||
const upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_StringView const* Worm_targets(const Worm* msg, size_t* size) {
|
UPB_INLINE upb_StringView const* Worm_targets(const Worm* msg,
|
||||||
|
size_t* size) {
|
||||||
const upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -668,7 +717,10 @@ UPB_INLINE upb_StringView const* Worm_targets(const Worm* msg, size_t* size) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE const upb_Array* _Worm_targets_upb_array(const Worm* msg, size_t* size) {
|
|
||||||
|
//
|
||||||
|
UPB_INLINE const upb_Array* _Worm_targets_upb_array(
|
||||||
|
const Worm* msg, size_t* size) {
|
||||||
const upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (size) {
|
if (size) {
|
||||||
@@ -676,7 +728,9 @@ UPB_INLINE const upb_Array* _Worm_targets_upb_array(const Worm* msg, size_t* siz
|
|||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_Array* _Worm_targets_mutable_upb_array(Worm* msg, size_t* size, upb_Arena* arena) {
|
|
||||||
|
UPB_INLINE upb_Array* _Worm_targets_mutable_upb_array(
|
||||||
|
Worm* msg, size_t* size, upb_Arena* arena) {
|
||||||
const upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
||||||
&field, arena);
|
&field, arena);
|
||||||
@@ -706,7 +760,8 @@ UPB_INLINE void Worm_set_polymorphic(Worm *msg, bool value) {
|
|||||||
const upb_MiniTableField field = {5, 8, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {5, 8, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_StringView* Worm_mutable_targets(Worm* msg, size_t* size) {
|
UPB_INLINE upb_StringView* Worm_mutable_targets(Worm* msg,
|
||||||
|
size_t* size) {
|
||||||
upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -717,12 +772,16 @@ UPB_INLINE upb_StringView* Worm_mutable_targets(Worm* msg, size_t* size) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_StringView* Worm_resize_targets(Worm* msg, size_t size, upb_Arena* arena) {
|
|
||||||
|
UPB_INLINE upb_StringView* Worm_resize_targets(Worm* msg,
|
||||||
|
size_t size,
|
||||||
|
upb_Arena* arena) {
|
||||||
upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
return (upb_StringView*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg),
|
return (upb_StringView*)upb_Message_ResizeArrayUninitialized(
|
||||||
&field, size, arena);
|
UPB_UPCAST(msg), &field, size, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE bool Worm_add_targets(Worm* msg, upb_StringView val, upb_Arena* arena) {
|
UPB_INLINE bool Worm_add_targets(Worm* msg, upb_StringView val,
|
||||||
|
upb_Arena* arena) {
|
||||||
upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
upb_MiniTableField field = {6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
||||||
UPB_UPCAST(msg), &field, arena);
|
UPB_UPCAST(msg), &field, arena);
|
||||||
@@ -736,37 +795,39 @@ UPB_INLINE bool Worm_add_targets(Worm* msg, upb_StringView val, upb_Arena* arena
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Operation */
|
/* Operation */
|
||||||
|
|
||||||
UPB_INLINE Operation* Operation_new(upb_Arena* arena) {
|
UPB_INLINE Operation* Operation_new(upb_Arena* arena) {
|
||||||
return (Operation*)_upb_Message_New(&Operation_msg_init, arena);
|
return (Operation*)_upb_Message_New(&Operation_msg_init, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE Operation* Operation_parse(const char* buf, size_t size, upb_Arena* arena) {
|
UPB_INLINE Operation* Operation_parse(const char* buf, size_t size,
|
||||||
|
upb_Arena* arena) {
|
||||||
Operation* ret = Operation_new(arena);
|
Operation* ret = Operation_new(arena);
|
||||||
if (!ret) return NULL;
|
if (!ret) return NULL;
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Operation_msg_init, NULL, 0, arena) !=
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Operation_msg_init, NULL, 0,
|
||||||
kUpb_DecodeStatus_Ok) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
UPB_INLINE Operation* Operation_parse_ex(const char* buf, size_t size,
|
|
||||||
const upb_ExtensionRegistry* extreg,
|
|
||||||
int options, upb_Arena* arena) {
|
|
||||||
Operation* ret = Operation_new(arena);
|
|
||||||
if (!ret) return NULL;
|
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Operation_msg_init, extreg, options,
|
|
||||||
arena) != kUpb_DecodeStatus_Ok) {
|
arena) != kUpb_DecodeStatus_Ok) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Operation_serialize(const Operation* msg, upb_Arena* arena, size_t* len) {
|
UPB_INLINE Operation* Operation_parse_ex(
|
||||||
|
const char* buf, size_t size, const upb_ExtensionRegistry* extreg,
|
||||||
|
int options, upb_Arena* arena) {
|
||||||
|
Operation* ret = Operation_new(arena);
|
||||||
|
if (!ret) return NULL;
|
||||||
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Operation_msg_init, extreg,
|
||||||
|
options, arena) != kUpb_DecodeStatus_Ok) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
UPB_INLINE char* Operation_serialize(const Operation* msg,
|
||||||
|
upb_Arena* arena, size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Operation_msg_init, 0, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Operation_msg_init, 0, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Operation_serialize_ex(const Operation* msg, int options,
|
UPB_INLINE char* Operation_serialize_ex(const Operation* msg,
|
||||||
upb_Arena* arena, size_t* len) {
|
int options, upb_Arena* arena,
|
||||||
|
size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Operation_msg_init, options, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Operation_msg_init, options, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
@@ -832,11 +893,12 @@ UPB_INLINE upb_StringView Operation_stolen_data(const Operation* msg) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
UPB_INLINE void Operation_clear_crew(Operation* msg) {
|
UPB_INLINE void Operation_clear_crew(Operation* msg) {
|
||||||
const upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, UPB_SIZE(12, 13), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
||||||
}
|
}
|
||||||
UPB_INLINE const Hacker* const* Operation_crew(const Operation* msg, size_t* size) {
|
UPB_INLINE const Hacker* const* Operation_crew(const Operation* msg,
|
||||||
const upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
size_t* size) {
|
||||||
|
const upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, UPB_SIZE(12, 13), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Hacker_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Hacker_msg_init);
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -847,8 +909,11 @@ UPB_INLINE const Hacker* const* Operation_crew(const Operation* msg, size_t* siz
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE const upb_Array* _Operation_crew_upb_array(const Operation* msg, size_t* size) {
|
|
||||||
const upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
//
|
||||||
|
UPB_INLINE const upb_Array* _Operation_crew_upb_array(
|
||||||
|
const Operation* msg, size_t* size) {
|
||||||
|
const upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, UPB_SIZE(12, 13), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Hacker_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Hacker_msg_init);
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (size) {
|
if (size) {
|
||||||
@@ -856,8 +921,10 @@ UPB_INLINE const upb_Array* _Operation_crew_upb_array(const Operation* msg, size
|
|||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_Array* _Operation_crew_mutable_upb_array(Operation* msg, size_t* size, upb_Arena* arena) {
|
|
||||||
const upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
UPB_INLINE upb_Array* _Operation_crew_mutable_upb_array(
|
||||||
|
Operation* msg, size_t* size, upb_Arena* arena) {
|
||||||
|
const upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, UPB_SIZE(12, 13), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Hacker_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Hacker_msg_init);
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
||||||
&field, arena);
|
&field, arena);
|
||||||
@@ -867,27 +934,28 @@ UPB_INLINE upb_Array* _Operation_crew_mutable_upb_array(Operation* msg, size_t*
|
|||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
UPB_INLINE void Operation_clear_worm(Operation* msg) {
|
UPB_INLINE void Operation_clear_worm(Operation* msg) {
|
||||||
const upb_MiniTableField field = {7, UPB_SIZE(16, 80), 64, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {7, UPB_SIZE(16, 80), 64, UPB_SIZE(10, 12), 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
||||||
}
|
}
|
||||||
UPB_INLINE const Worm* Operation_worm(const Operation* msg) {
|
UPB_INLINE const Worm* Operation_worm(const Operation* msg) {
|
||||||
const Worm* default_val = NULL;
|
const Worm* default_val = NULL;
|
||||||
const Worm* ret;
|
const Worm* ret;
|
||||||
const upb_MiniTableField field = {7, UPB_SIZE(16, 80), 64, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {7, UPB_SIZE(16, 80), 64, UPB_SIZE(10, 12), 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Worm_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Worm_msg_init);
|
||||||
_upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
|
_upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
|
||||||
&default_val, &ret);
|
&default_val, &ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
UPB_INLINE bool Operation_has_worm(const Operation* msg) {
|
UPB_INLINE bool Operation_has_worm(const Operation* msg) {
|
||||||
const upb_MiniTableField field = {7, UPB_SIZE(16, 80), 64, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {7, UPB_SIZE(16, 80), 64, UPB_SIZE(10, 12), 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
return upb_Message_HasBaseField(UPB_UPCAST(msg), &field);
|
return upb_Message_HasBaseField(UPB_UPCAST(msg), &field);
|
||||||
}
|
}
|
||||||
UPB_INLINE void Operation_clear_log_entries(Operation* msg) {
|
UPB_INLINE void Operation_clear_log_entries(Operation* msg) {
|
||||||
const upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_StringView const* Operation_log_entries(const Operation* msg, size_t* size) {
|
UPB_INLINE upb_StringView const* Operation_log_entries(const Operation* msg,
|
||||||
|
size_t* size) {
|
||||||
const upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -898,7 +966,10 @@ UPB_INLINE upb_StringView const* Operation_log_entries(const Operation* msg, siz
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE const upb_Array* _Operation_log_entries_upb_array(const Operation* msg, size_t* size) {
|
|
||||||
|
//
|
||||||
|
UPB_INLINE const upb_Array* _Operation_log_entries_upb_array(
|
||||||
|
const Operation* msg, size_t* size) {
|
||||||
const upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (size) {
|
if (size) {
|
||||||
@@ -906,7 +977,9 @@ UPB_INLINE const upb_Array* _Operation_log_entries_upb_array(const Operation* ms
|
|||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_Array* _Operation_log_entries_mutable_upb_array(Operation* msg, size_t* size, upb_Arena* arena) {
|
|
||||||
|
UPB_INLINE upb_Array* _Operation_log_entries_mutable_upb_array(
|
||||||
|
Operation* msg, size_t* size, upb_Arena* arena) {
|
||||||
const upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
||||||
&field, arena);
|
&field, arena);
|
||||||
@@ -948,8 +1021,9 @@ UPB_INLINE void Operation_set_stolen_data(Operation *msg, upb_StringView value)
|
|||||||
const upb_MiniTableField field = {5, UPB_SIZE(44, 48), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {5, UPB_SIZE(44, 48), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
||||||
}
|
}
|
||||||
UPB_INLINE Hacker** Operation_mutable_crew(Operation* msg, size_t* size) {
|
UPB_INLINE Hacker** Operation_mutable_crew(Operation* msg,
|
||||||
upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
size_t* size) {
|
||||||
|
upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, UPB_SIZE(12, 13), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Hacker_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Hacker_msg_init);
|
||||||
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -960,13 +1034,18 @@ UPB_INLINE Hacker** Operation_mutable_crew(Operation* msg, size_t* size) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE Hacker** Operation_resize_crew(Operation* msg, size_t size, upb_Arena* arena) {
|
|
||||||
upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
UPB_INLINE Hacker** Operation_resize_crew(Operation* msg,
|
||||||
return (Hacker**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg),
|
size_t size,
|
||||||
&field, size, arena);
|
upb_Arena* arena) {
|
||||||
|
upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, UPB_SIZE(12, 13), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Hacker_msg_init);
|
||||||
|
return (Hacker**)upb_Message_ResizeArrayUninitialized(
|
||||||
|
UPB_UPCAST(msg), &field, size, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE struct Hacker* Operation_add_crew(Operation* msg, upb_Arena* arena) {
|
UPB_INLINE struct Hacker* Operation_add_crew(
|
||||||
upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
Operation* msg, upb_Arena* arena) {
|
||||||
|
upb_MiniTableField field = {6, UPB_SIZE(12, 72), 0, UPB_SIZE(12, 13), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Hacker_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Hacker_msg_init);
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
||||||
UPB_UPCAST(msg), &field, arena);
|
UPB_UPCAST(msg), &field, arena);
|
||||||
@@ -974,18 +1053,20 @@ UPB_INLINE struct Hacker* Operation_add_crew(Operation* msg, upb_Arena* arena) {
|
|||||||
arr, arr->UPB_PRIVATE(size) + 1, arena)) {
|
arr, arr->UPB_PRIVATE(size) + 1, arena)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
struct Hacker* sub = (struct Hacker*)_upb_Message_New(&Hacker_msg_init, arena);
|
struct Hacker* sub =
|
||||||
|
(struct Hacker*)_upb_Message_New(&Hacker_msg_init, arena);
|
||||||
if (!arr || !sub) return NULL;
|
if (!arr || !sub) return NULL;
|
||||||
UPB_PRIVATE(_upb_Array_Set)
|
UPB_PRIVATE(_upb_Array_Set)
|
||||||
(arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub));
|
(arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub));
|
||||||
return sub;
|
return sub;
|
||||||
}
|
}
|
||||||
UPB_INLINE void Operation_set_worm(Operation* msg, Worm* value) {
|
UPB_INLINE void Operation_set_worm(Operation* msg, Worm* value) {
|
||||||
const upb_MiniTableField field = {7, UPB_SIZE(16, 80), 64, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {7, UPB_SIZE(16, 80), 64, UPB_SIZE(10, 12), 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Worm_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Worm_msg_init);
|
||||||
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
||||||
}
|
}
|
||||||
UPB_INLINE struct Worm* Operation_mutable_worm(Operation* msg, upb_Arena* arena) {
|
UPB_INLINE struct Worm* Operation_mutable_worm(
|
||||||
|
Operation* msg, upb_Arena* arena) {
|
||||||
struct Worm* sub = (struct Worm*)Operation_worm(msg);
|
struct Worm* sub = (struct Worm*)Operation_worm(msg);
|
||||||
if (sub == NULL) {
|
if (sub == NULL) {
|
||||||
sub = (struct Worm*)_upb_Message_New(&Worm_msg_init, arena);
|
sub = (struct Worm*)_upb_Message_New(&Worm_msg_init, arena);
|
||||||
@@ -993,7 +1074,8 @@ UPB_INLINE struct Worm* Operation_mutable_worm(Operation* msg, upb_Arena* arena)
|
|||||||
}
|
}
|
||||||
return sub;
|
return sub;
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_StringView* Operation_mutable_log_entries(Operation* msg, size_t* size) {
|
UPB_INLINE upb_StringView* Operation_mutable_log_entries(Operation* msg,
|
||||||
|
size_t* size) {
|
||||||
upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -1004,12 +1086,16 @@ UPB_INLINE upb_StringView* Operation_mutable_log_entries(Operation* msg, size_t*
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_StringView* Operation_resize_log_entries(Operation* msg, size_t size, upb_Arena* arena) {
|
|
||||||
|
UPB_INLINE upb_StringView* Operation_resize_log_entries(Operation* msg,
|
||||||
|
size_t size,
|
||||||
|
upb_Arena* arena) {
|
||||||
upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
return (upb_StringView*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg),
|
return (upb_StringView*)upb_Message_ResizeArrayUninitialized(
|
||||||
&field, size, arena);
|
UPB_UPCAST(msg), &field, size, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE bool Operation_add_log_entries(Operation* msg, upb_StringView val, upb_Arena* arena) {
|
UPB_INLINE bool Operation_add_log_entries(Operation* msg, upb_StringView val,
|
||||||
|
upb_Arena* arena) {
|
||||||
upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
upb_MiniTableField field = {8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
||||||
UPB_UPCAST(msg), &field, arena);
|
UPB_UPCAST(msg), &field, arena);
|
||||||
@@ -1027,37 +1113,39 @@ UPB_INLINE void Operation_set_severity(Operation *msg, int32_t value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Campaign */
|
/* Campaign */
|
||||||
|
|
||||||
UPB_INLINE Campaign* Campaign_new(upb_Arena* arena) {
|
UPB_INLINE Campaign* Campaign_new(upb_Arena* arena) {
|
||||||
return (Campaign*)_upb_Message_New(&Campaign_msg_init, arena);
|
return (Campaign*)_upb_Message_New(&Campaign_msg_init, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE Campaign* Campaign_parse(const char* buf, size_t size, upb_Arena* arena) {
|
UPB_INLINE Campaign* Campaign_parse(const char* buf, size_t size,
|
||||||
|
upb_Arena* arena) {
|
||||||
Campaign* ret = Campaign_new(arena);
|
Campaign* ret = Campaign_new(arena);
|
||||||
if (!ret) return NULL;
|
if (!ret) return NULL;
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Campaign_msg_init, NULL, 0, arena) !=
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Campaign_msg_init, NULL, 0,
|
||||||
kUpb_DecodeStatus_Ok) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
UPB_INLINE Campaign* Campaign_parse_ex(const char* buf, size_t size,
|
|
||||||
const upb_ExtensionRegistry* extreg,
|
|
||||||
int options, upb_Arena* arena) {
|
|
||||||
Campaign* ret = Campaign_new(arena);
|
|
||||||
if (!ret) return NULL;
|
|
||||||
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Campaign_msg_init, extreg, options,
|
|
||||||
arena) != kUpb_DecodeStatus_Ok) {
|
arena) != kUpb_DecodeStatus_Ok) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Campaign_serialize(const Campaign* msg, upb_Arena* arena, size_t* len) {
|
UPB_INLINE Campaign* Campaign_parse_ex(
|
||||||
|
const char* buf, size_t size, const upb_ExtensionRegistry* extreg,
|
||||||
|
int options, upb_Arena* arena) {
|
||||||
|
Campaign* ret = Campaign_new(arena);
|
||||||
|
if (!ret) return NULL;
|
||||||
|
if (upb_Decode(buf, size, UPB_UPCAST(ret), &Campaign_msg_init, extreg,
|
||||||
|
options, arena) != kUpb_DecodeStatus_Ok) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
UPB_INLINE char* Campaign_serialize(const Campaign* msg,
|
||||||
|
upb_Arena* arena, size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Campaign_msg_init, 0, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Campaign_msg_init, 0, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
UPB_INLINE char* Campaign_serialize_ex(const Campaign* msg, int options,
|
UPB_INLINE char* Campaign_serialize_ex(const Campaign* msg,
|
||||||
upb_Arena* arena, size_t* len) {
|
int options, upb_Arena* arena,
|
||||||
|
size_t* len) {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
(void)upb_Encode(UPB_UPCAST(msg), &Campaign_msg_init, options, arena, &ptr, len);
|
(void)upb_Encode(UPB_UPCAST(msg), &Campaign_msg_init, options, arena, &ptr, len);
|
||||||
return ptr;
|
return ptr;
|
||||||
@@ -1075,11 +1163,12 @@ UPB_INLINE upb_StringView Campaign_name(const Campaign* msg) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
UPB_INLINE void Campaign_clear_operations(Campaign* msg) {
|
UPB_INLINE void Campaign_clear_operations(Campaign* msg) {
|
||||||
const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
|
||||||
}
|
}
|
||||||
UPB_INLINE const Operation* const* Campaign_operations(const Campaign* msg, size_t* size) {
|
UPB_INLINE const Operation* const* Campaign_operations(const Campaign* msg,
|
||||||
const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
size_t* size) {
|
||||||
|
const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Operation_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Operation_msg_init);
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -1090,8 +1179,11 @@ UPB_INLINE const Operation* const* Campaign_operations(const Campaign* msg, size
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE const upb_Array* _Campaign_operations_upb_array(const Campaign* msg, size_t* size) {
|
|
||||||
const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
//
|
||||||
|
UPB_INLINE const upb_Array* _Campaign_operations_upb_array(
|
||||||
|
const Campaign* msg, size_t* size) {
|
||||||
|
const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Operation_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Operation_msg_init);
|
||||||
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field);
|
||||||
if (size) {
|
if (size) {
|
||||||
@@ -1099,8 +1191,10 @@ UPB_INLINE const upb_Array* _Campaign_operations_upb_array(const Campaign* msg,
|
|||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
UPB_INLINE upb_Array* _Campaign_operations_mutable_upb_array(Campaign* msg, size_t* size, upb_Arena* arena) {
|
|
||||||
const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
UPB_INLINE upb_Array* _Campaign_operations_mutable_upb_array(
|
||||||
|
Campaign* msg, size_t* size, upb_Arena* arena) {
|
||||||
|
const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Operation_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Operation_msg_init);
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg),
|
||||||
&field, arena);
|
&field, arena);
|
||||||
@@ -1126,8 +1220,9 @@ UPB_INLINE void Campaign_set_name(Campaign *msg, upb_StringView value) {
|
|||||||
const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
|
const upb_MiniTableField field = {1, UPB_SIZE(12, 8), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
|
||||||
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
upb_Message_SetBaseField((upb_Message*)msg, &field, &value);
|
||||||
}
|
}
|
||||||
UPB_INLINE Operation** Campaign_mutable_operations(Campaign* msg, size_t* size) {
|
UPB_INLINE Operation** Campaign_mutable_operations(Campaign* msg,
|
||||||
upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
size_t* size) {
|
||||||
|
upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Operation_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Operation_msg_init);
|
||||||
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field);
|
||||||
if (arr) {
|
if (arr) {
|
||||||
@@ -1138,13 +1233,18 @@ UPB_INLINE Operation** Campaign_mutable_operations(Campaign* msg, size_t* size)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPB_INLINE Operation** Campaign_resize_operations(Campaign* msg, size_t size, upb_Arena* arena) {
|
|
||||||
upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
UPB_INLINE Operation** Campaign_resize_operations(Campaign* msg,
|
||||||
return (Operation**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg),
|
size_t size,
|
||||||
&field, size, arena);
|
upb_Arena* arena) {
|
||||||
|
upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Operation_msg_init);
|
||||||
|
return (Operation**)upb_Message_ResizeArrayUninitialized(
|
||||||
|
UPB_UPCAST(msg), &field, size, arena);
|
||||||
}
|
}
|
||||||
UPB_INLINE struct Operation* Campaign_add_operations(Campaign* msg, upb_Arena* arena) {
|
UPB_INLINE struct Operation* Campaign_add_operations(
|
||||||
upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
Campaign* msg, upb_Arena* arena) {
|
||||||
|
upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
|
||||||
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Operation_msg_init);
|
UPB_PRIVATE(_upb_MiniTable_StrongReference)(&Operation_msg_init);
|
||||||
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
upb_Array* arr = upb_Message_GetOrCreateMutableArray(
|
||||||
UPB_UPCAST(msg), &field, arena);
|
UPB_UPCAST(msg), &field, arena);
|
||||||
@@ -1152,7 +1252,8 @@ UPB_INLINE struct Operation* Campaign_add_operations(Campaign* msg, upb_Arena* a
|
|||||||
arr, arr->UPB_PRIVATE(size) + 1, arena)) {
|
arr, arr->UPB_PRIVATE(size) + 1, arena)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
struct Operation* sub = (struct Operation*)_upb_Message_New(&Operation_msg_init, arena);
|
struct Operation* sub =
|
||||||
|
(struct Operation*)_upb_Message_New(&Operation_msg_init, arena);
|
||||||
if (!arr || !sub) return NULL;
|
if (!arr || !sub) return NULL;
|
||||||
UPB_PRIVATE(_upb_Array_Set)
|
UPB_PRIVATE(_upb_Array_Set)
|
||||||
(arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub));
|
(arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub));
|
||||||
|
|||||||
@@ -13,49 +13,73 @@
|
|||||||
// Must be last.
|
// Must be last.
|
||||||
#include "upb/port/def.inc"
|
#include "upb/port/def.inc"
|
||||||
|
|
||||||
extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_StaticallyTreeShaken);
|
extern const UPB_PRIVATE(upb_GeneratedExtensionListEntry)* UPB_PRIVATE(upb_generated_extension_list);
|
||||||
static const upb_MiniTableField Tool__fields[5] = {
|
typedef struct {
|
||||||
|
upb_MiniTableField fields[5];
|
||||||
|
} Tool_msg_init_Fields;
|
||||||
|
|
||||||
|
static const Tool_msg_init_Fields Tool__fields = {{
|
||||||
{1, 16, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{1, 16, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{2, UPB_SIZE(24, 32), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{2, UPB_SIZE(24, 32), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{3, UPB_SIZE(32, 48), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{3, UPB_SIZE(32, 48), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{4, 8, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)},
|
{4, 8, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)},
|
||||||
{5, 12, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)},
|
{5, 12, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)},
|
||||||
};
|
}};
|
||||||
|
|
||||||
const upb_MiniTable Tool_msg_init = {
|
const upb_MiniTable Tool_msg_init = {
|
||||||
NULL,
|
&Tool__fields.fields[0],
|
||||||
&Tool__fields[0],
|
UPB_SIZE(40, 64), 5, kUpb_ExtMode_NonExtendable, 5, UPB_FASTTABLE_MASK(56), 0,
|
||||||
UPB_SIZE(40, 64), 5, kUpb_ExtMode_NonExtendable, 5, UPB_FASTTABLE_MASK(255), 0,
|
|
||||||
#ifdef UPB_TRACING_ENABLED
|
#ifdef UPB_TRACING_ENABLED
|
||||||
"Tool",
|
"Tool",
|
||||||
#endif
|
#endif
|
||||||
|
UPB_FASTTABLE_INIT({
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x001000003f00000a, &upb_DecodeFast_String_Scalar_Tag1Byte},
|
||||||
|
{0x002000003f000012, &upb_DecodeFast_String_Scalar_Tag1Byte},
|
||||||
|
{0x003000003f00001a, &upb_DecodeFast_Bytes_Scalar_Tag1Byte},
|
||||||
|
{0x000800003f000020, &upb_DecodeFast_Bool_Scalar_Tag1Byte},
|
||||||
|
{0x000c00003f000028, &upb_DecodeFast_Varint32_Scalar_Tag1Byte},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
const upb_MiniTable* Tool_msg_init_ptr = &Tool_msg_init;
|
typedef struct {
|
||||||
static const upb_MiniTableField Connection__fields[5] = {
|
upb_MiniTableField fields[5];
|
||||||
|
} Connection_msg_init_Fields;
|
||||||
|
|
||||||
|
static const Connection_msg_init_Fields Connection__fields = {{
|
||||||
{1, 16, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{1, 16, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{2, 12, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)},
|
{2, 12, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)},
|
||||||
{3, 8, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)},
|
{3, 8, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)},
|
||||||
{4, UPB_SIZE(32, 48), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)},
|
{4, UPB_SIZE(32, 48), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)},
|
||||||
{5, UPB_SIZE(24, 32), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{5, UPB_SIZE(24, 32), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
};
|
}};
|
||||||
|
|
||||||
const upb_MiniTable Connection_msg_init = {
|
const upb_MiniTable Connection_msg_init = {
|
||||||
NULL,
|
&Connection__fields.fields[0],
|
||||||
&Connection__fields[0],
|
UPB_SIZE(40, 56), 5, kUpb_ExtMode_NonExtendable, 5, UPB_FASTTABLE_MASK(56), 0,
|
||||||
UPB_SIZE(40, 56), 5, kUpb_ExtMode_NonExtendable, 5, UPB_FASTTABLE_MASK(255), 0,
|
|
||||||
#ifdef UPB_TRACING_ENABLED
|
#ifdef UPB_TRACING_ENABLED
|
||||||
"Connection",
|
"Connection",
|
||||||
#endif
|
#endif
|
||||||
|
UPB_FASTTABLE_INIT({
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x001000003f00000a, &upb_DecodeFast_String_Scalar_Tag1Byte},
|
||||||
|
{0x000c00003f000010, &upb_DecodeFast_Varint32_Scalar_Tag1Byte},
|
||||||
|
{0x000800003f000018, &upb_DecodeFast_Bool_Scalar_Tag1Byte},
|
||||||
|
{0x003000003f000020, &upb_DecodeFast_Varint64_Scalar_Tag1Byte},
|
||||||
|
{0x002000003f00002a, &upb_DecodeFast_Bytes_Scalar_Tag1Byte},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
const upb_MiniTable* Connection_msg_init_ptr = &Connection_msg_init;
|
typedef struct {
|
||||||
static const upb_MiniTableSubInternal Hacker__submsgs[2] = {
|
upb_MiniTableField fields[9];
|
||||||
{.UPB_PRIVATE(submsg) = &Tool_msg_init_ptr},
|
upb_MiniTableSubInternal subs[2];
|
||||||
{.UPB_PRIVATE(submsg) = &Connection_msg_init_ptr},
|
} Hacker_msg_init_Fields;
|
||||||
};
|
|
||||||
|
|
||||||
static const upb_MiniTableField Hacker__fields[9] = {
|
static const Hacker_msg_init_Fields Hacker__fields = {{
|
||||||
{1, UPB_SIZE(32, 24), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{1, UPB_SIZE(32, 24), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{2, 40, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{2, 40, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{3, 12, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)},
|
{3, 12, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)},
|
||||||
@@ -63,96 +87,138 @@ static const upb_MiniTableField Hacker__fields[9] = {
|
|||||||
{5, 9, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)},
|
{5, 9, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)},
|
||||||
{6, UPB_SIZE(48, 56), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)},
|
{6, UPB_SIZE(48, 56), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)},
|
||||||
{7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
{7, UPB_SIZE(20, 64), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
||||||
{8, UPB_SIZE(24, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
{8, UPB_SIZE(24, 72), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
||||||
{9, UPB_SIZE(28, 80), 64, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
{9, UPB_SIZE(28, 80), 64, UPB_SIZE(4, 6), 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
||||||
};
|
},
|
||||||
|
{
|
||||||
|
{.UPB_PRIVATE(submsg) = &Tool_msg_init},
|
||||||
|
{.UPB_PRIVATE(submsg) = &Connection_msg_init},
|
||||||
|
}};
|
||||||
|
|
||||||
const upb_MiniTable Hacker_msg_init = {
|
const upb_MiniTable Hacker_msg_init = {
|
||||||
&Hacker__submsgs[0],
|
&Hacker__fields.fields[0],
|
||||||
&Hacker__fields[0],
|
|
||||||
UPB_SIZE(56, 88), 9, kUpb_ExtMode_NonExtendable, 9, UPB_FASTTABLE_MASK(56), 0,
|
UPB_SIZE(56, 88), 9, kUpb_ExtMode_NonExtendable, 9, UPB_FASTTABLE_MASK(56), 0,
|
||||||
#ifdef UPB_TRACING_ENABLED
|
#ifdef UPB_TRACING_ENABLED
|
||||||
"Hacker",
|
"Hacker",
|
||||||
#endif
|
#endif
|
||||||
UPB_FASTTABLE_INIT({
|
UPB_FASTTABLE_INIT({
|
||||||
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
{0x001800003f00000a, &upb_DecodeFast_String_Scalar_Tag1Byte},
|
||||||
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
{0x002800003f000012, &upb_DecodeFast_String_Scalar_Tag1Byte},
|
||||||
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
{0x000c00003f000018, &upb_DecodeFast_Varint32_Scalar_Tag1Byte},
|
||||||
{0x001000003f000025, &upb_DecodeFast_Fixed32_Scalar_Tag1Byte},
|
{0x001000003f000025, &upb_DecodeFast_Fixed32_Scalar_Tag1Byte},
|
||||||
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
{0x000900003f000028, &upb_DecodeFast_Bool_Scalar_Tag1Byte},
|
||||||
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
{0x003800003f000030, &upb_DecodeFast_Varint64_Scalar_Tag1Byte},
|
||||||
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
{0x004000003f00003a, &upb_DecodeFast_String_Repeated_Tag1Byte},
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
const upb_MiniTable* Hacker_msg_init_ptr = &Hacker_msg_init;
|
typedef struct {
|
||||||
static const upb_MiniTableField Worm__fields[6] = {
|
upb_MiniTableField fields[6];
|
||||||
|
} Worm_msg_init_Fields;
|
||||||
|
|
||||||
|
static const Worm_msg_init_Fields Worm__fields = {{
|
||||||
{1, UPB_SIZE(20, 16), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{1, UPB_SIZE(20, 16), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{2, 12, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)},
|
{2, 12, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)},
|
||||||
{3, UPB_SIZE(40, 48), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)},
|
{3, UPB_SIZE(40, 48), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)},
|
||||||
{4, UPB_SIZE(28, 32), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{4, UPB_SIZE(28, 32), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{5, 8, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)},
|
{5, 8, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)},
|
||||||
{6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
{6, UPB_SIZE(16, 56), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
||||||
};
|
}};
|
||||||
|
|
||||||
const upb_MiniTable Worm_msg_init = {
|
const upb_MiniTable Worm_msg_init = {
|
||||||
NULL,
|
&Worm__fields.fields[0],
|
||||||
&Worm__fields[0],
|
UPB_SIZE(48, 64), 6, kUpb_ExtMode_NonExtendable, 6, UPB_FASTTABLE_MASK(56), 0,
|
||||||
UPB_SIZE(48, 64), 6, kUpb_ExtMode_NonExtendable, 6, UPB_FASTTABLE_MASK(255), 0,
|
|
||||||
#ifdef UPB_TRACING_ENABLED
|
#ifdef UPB_TRACING_ENABLED
|
||||||
"Worm",
|
"Worm",
|
||||||
#endif
|
#endif
|
||||||
|
UPB_FASTTABLE_INIT({
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x001000003f00000a, &upb_DecodeFast_String_Scalar_Tag1Byte},
|
||||||
|
{0x000c00003f000010, &upb_DecodeFast_Varint32_Scalar_Tag1Byte},
|
||||||
|
{0x003000003f000018, &upb_DecodeFast_Varint64_Scalar_Tag1Byte},
|
||||||
|
{0x002000003f000022, &upb_DecodeFast_Bytes_Scalar_Tag1Byte},
|
||||||
|
{0x000800003f000028, &upb_DecodeFast_Bool_Scalar_Tag1Byte},
|
||||||
|
{0x003800003f000032, &upb_DecodeFast_String_Repeated_Tag1Byte},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
const upb_MiniTable* Worm_msg_init_ptr = &Worm_msg_init;
|
typedef struct {
|
||||||
static const upb_MiniTableSubInternal Operation__submsgs[2] = {
|
upb_MiniTableField fields[9];
|
||||||
{.UPB_PRIVATE(submsg) = &Hacker_msg_init_ptr},
|
upb_MiniTableSubInternal subs[2];
|
||||||
{.UPB_PRIVATE(submsg) = &Worm_msg_init_ptr},
|
} Operation_msg_init_Fields;
|
||||||
};
|
|
||||||
|
|
||||||
static const upb_MiniTableField Operation__fields[9] = {
|
static const Operation_msg_init_Fields Operation__fields = {{
|
||||||
{1, UPB_SIZE(28, 16), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{1, UPB_SIZE(28, 16), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{2, UPB_SIZE(36, 32), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{2, UPB_SIZE(36, 32), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{3, UPB_SIZE(56, 64), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)},
|
{3, UPB_SIZE(56, 64), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)},
|
||||||
{4, 9, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)},
|
{4, 9, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)},
|
||||||
{5, UPB_SIZE(44, 48), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{5, UPB_SIZE(44, 48), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{6, UPB_SIZE(12, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
{6, UPB_SIZE(12, 72), 0, UPB_SIZE(12, 13), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
||||||
{7, UPB_SIZE(16, 80), 64, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
{7, UPB_SIZE(16, 80), 64, UPB_SIZE(10, 12), 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
||||||
{8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
{8, UPB_SIZE(20, 88), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
||||||
{9, UPB_SIZE(24, 12), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)},
|
{9, UPB_SIZE(24, 12), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)},
|
||||||
};
|
},
|
||||||
|
{
|
||||||
|
{.UPB_PRIVATE(submsg) = &Hacker_msg_init},
|
||||||
|
{.UPB_PRIVATE(submsg) = &Worm_msg_init},
|
||||||
|
}};
|
||||||
|
|
||||||
const upb_MiniTable Operation_msg_init = {
|
const upb_MiniTable Operation_msg_init = {
|
||||||
&Operation__submsgs[0],
|
&Operation__fields.fields[0],
|
||||||
&Operation__fields[0],
|
UPB_SIZE(64, 96), 9, kUpb_ExtMode_NonExtendable, 9, UPB_FASTTABLE_MASK(120), 0,
|
||||||
UPB_SIZE(64, 96), 9, kUpb_ExtMode_NonExtendable, 9, UPB_FASTTABLE_MASK(255), 0,
|
|
||||||
#ifdef UPB_TRACING_ENABLED
|
#ifdef UPB_TRACING_ENABLED
|
||||||
"Operation",
|
"Operation",
|
||||||
#endif
|
#endif
|
||||||
|
UPB_FASTTABLE_INIT({
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x001000003f00000a, &upb_DecodeFast_String_Scalar_Tag1Byte},
|
||||||
|
{0x002000003f000012, &upb_DecodeFast_String_Scalar_Tag1Byte},
|
||||||
|
{0x004000003f000018, &upb_DecodeFast_Varint64_Scalar_Tag1Byte},
|
||||||
|
{0x000900003f000020, &upb_DecodeFast_Bool_Scalar_Tag1Byte},
|
||||||
|
{0x003000003f00002a, &upb_DecodeFast_Bytes_Scalar_Tag1Byte},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x005800003f000042, &upb_DecodeFast_String_Repeated_Tag1Byte},
|
||||||
|
{0x000c00003f000048, &upb_DecodeFast_Varint32_Scalar_Tag1Byte},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
const upb_MiniTable* Operation_msg_init_ptr = &Operation_msg_init;
|
typedef struct {
|
||||||
static const upb_MiniTableSubInternal Campaign__submsgs[1] = {
|
upb_MiniTableField fields[3];
|
||||||
{.UPB_PRIVATE(submsg) = &Operation_msg_init_ptr},
|
upb_MiniTableSubInternal subs[1];
|
||||||
};
|
} Campaign_msg_init_Fields;
|
||||||
|
|
||||||
static const upb_MiniTableField Campaign__fields[3] = {
|
static const Campaign_msg_init_Fields Campaign__fields = {{
|
||||||
{1, UPB_SIZE(12, 8), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
{1, UPB_SIZE(12, 8), 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)},
|
||||||
{2, UPB_SIZE(8, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
{2, UPB_SIZE(8, 24), 0, UPB_SIZE(6, 7), 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)},
|
||||||
{3, UPB_SIZE(24, 32), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)},
|
{3, UPB_SIZE(24, 32), 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)},
|
||||||
};
|
},
|
||||||
|
{
|
||||||
|
{.UPB_PRIVATE(submsg) = &Operation_msg_init},
|
||||||
|
}};
|
||||||
|
|
||||||
const upb_MiniTable Campaign_msg_init = {
|
const upb_MiniTable Campaign_msg_init = {
|
||||||
&Campaign__submsgs[0],
|
&Campaign__fields.fields[0],
|
||||||
&Campaign__fields[0],
|
UPB_SIZE(32, 40), 3, kUpb_ExtMode_NonExtendable, 3, UPB_FASTTABLE_MASK(24), 0,
|
||||||
UPB_SIZE(32, 40), 3, kUpb_ExtMode_NonExtendable, 3, UPB_FASTTABLE_MASK(255), 0,
|
|
||||||
#ifdef UPB_TRACING_ENABLED
|
#ifdef UPB_TRACING_ENABLED
|
||||||
"Campaign",
|
"Campaign",
|
||||||
#endif
|
#endif
|
||||||
|
UPB_FASTTABLE_INIT({
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x000800003f00000a, &upb_DecodeFast_String_Scalar_Tag1Byte},
|
||||||
|
{0x0000000000000000, &_upb_FastDecoder_DecodeGeneric},
|
||||||
|
{0x002000003f000018, &upb_DecodeFast_Varint64_Scalar_Tag1Byte},
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
const upb_MiniTable* Campaign_msg_init_ptr = &Campaign_msg_init;
|
|
||||||
static const upb_MiniTable *messages_layout[6] = {
|
static const upb_MiniTable *messages_layout[6] = {
|
||||||
&Tool_msg_init,
|
&Tool_msg_init,
|
||||||
&Connection_msg_init,
|
&Connection_msg_init,
|
||||||
|
|||||||
@@ -19,17 +19,11 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const upb_MiniTable Tool_msg_init;
|
extern const upb_MiniTable Tool_msg_init;
|
||||||
extern const upb_MiniTable* Tool_msg_init_ptr;
|
|
||||||
extern const upb_MiniTable Connection_msg_init;
|
extern const upb_MiniTable Connection_msg_init;
|
||||||
extern const upb_MiniTable* Connection_msg_init_ptr;
|
|
||||||
extern const upb_MiniTable Hacker_msg_init;
|
extern const upb_MiniTable Hacker_msg_init;
|
||||||
extern const upb_MiniTable* Hacker_msg_init_ptr;
|
|
||||||
extern const upb_MiniTable Worm_msg_init;
|
extern const upb_MiniTable Worm_msg_init;
|
||||||
extern const upb_MiniTable* Worm_msg_init_ptr;
|
|
||||||
extern const upb_MiniTable Operation_msg_init;
|
extern const upb_MiniTable Operation_msg_init;
|
||||||
extern const upb_MiniTable* Operation_msg_init_ptr;
|
|
||||||
extern const upb_MiniTable Campaign_msg_init;
|
extern const upb_MiniTable Campaign_msg_init;
|
||||||
extern const upb_MiniTable* Campaign_msg_init_ptr;
|
|
||||||
|
|
||||||
extern const upb_MiniTableFile hackers_proto_upb_file_layout;
|
extern const upb_MiniTableFile hackers_proto_upb_file_layout;
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ typedef struct {
|
|||||||
} BenchData;
|
} BenchData;
|
||||||
|
|
||||||
static bool load_bench_data(BenchData *out, const char *name) {
|
static bool load_bench_data(BenchData *out, const char *name) {
|
||||||
snprintf(out->path, sizeof(out->path), "../data/bench/%s.pb", name);
|
snprintf(out->path, sizeof(out->path), "data/bench/%s.pb", name);
|
||||||
FILE *f = fopen(out->path, "rb");
|
FILE *f = fopen(out->path, "rb");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
printf("[skip] %s not found — "
|
printf("[skip] %s not found — "
|
||||||
|
|||||||
Reference in New Issue
Block a user