Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
third_party
upb
upb
decode_fast.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009-2021, Google LLC
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
* * Redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer.
9
* * Redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution.
12
* * Neither the name of Google LLC nor the
13
* names of its contributors may be used to endorse or promote products
14
* derived from this software without specific prior written permission.
15
*
16
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
* ARE DISCLAIMED. IN NO EVENT SHALL Google LLC BE LIABLE FOR ANY DIRECT,
20
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
// These are the specialized field parser functions for the fast parser.
29
// Generated tables will refer to these by name.
30
//
31
// The function names are encoded with names like:
32
//
33
// // 123 4
34
// upb_pss_1bt(); // Parse singular string, 1 byte tag.
35
//
36
// In position 1:
37
// - 'p' for parse, most function use this
38
// - 'c' for copy, for when we are copying strings instead of aliasing
39
//
40
// In position 2 (cardinality):
41
// - 's' for singular, with or without hasbit
42
// - 'o' for oneof
43
// - 'r' for non-packed repeated
44
// - 'p' for packed repeated
45
//
46
// In position 3 (type):
47
// - 'b1' for bool
48
// - 'v4' for 4-byte varint
49
// - 'v8' for 8-byte varint
50
// - 'z4' for zig-zag-encoded 4-byte varint
51
// - 'z8' for zig-zag-encoded 8-byte varint
52
// - 'f4' for 4-byte fixed
53
// - 'f8' for 8-byte fixed
54
// - 'm' for sub-message
55
// - 's' for string (validate UTF-8)
56
// - 'b' for bytes
57
//
58
// In position 4 (tag length):
59
// - '1' for one-byte tags (field numbers 1-15)
60
// - '2' for two-byte tags (field numbers 16-2048)
61
62
#ifndef UPB_DECODE_FAST_H_
63
#define UPB_DECODE_FAST_H_
64
65
#include "
upb/msg.h
"
66
67
struct
upb_Decoder
;
68
69
// The fallback, generic parsing function that can handle any field type.
70
// This just uses the regular (non-fast) parser to parse a single field.
71
const
char
*
fastdecode_generic
(
struct
upb_Decoder
*
d
,
const
char
*
ptr
,
72
upb_Message
*
msg
,
intptr_t
table
,
73
uint64_t
hasbits,
uint64_t
data
);
74
75
#define UPB_PARSE_PARAMS \
76
struct upb_Decoder *d, const char *ptr, upb_Message *msg, intptr_t table, \
77
uint64_t hasbits, uint64_t data
78
79
/* primitive fields ***********************************************************/
80
81
#define F(card, type, valbytes, tagbytes) \
82
const char* upb_p##card##type##valbytes##_##tagbytes##bt(UPB_PARSE_PARAMS);
83
84
#define TYPES(card, tagbytes) \
85
F(card, b, 1, tagbytes) \
86
F(card, v, 4, tagbytes) \
87
F(card, v, 8, tagbytes) \
88
F(card, z, 4, tagbytes) \
89
F(card, z, 8, tagbytes) \
90
F(card, f, 4, tagbytes) \
91
F(card, f, 8, tagbytes)
92
93
#define TAGBYTES(card) \
94
TYPES(card, 1) \
95
TYPES(card, 2)
96
97
TAGBYTES
(s)
98
TAGBYTES
(
o
)
99
TAGBYTES
(
r
)
100
TAGBYTES
(
p
)
101
102
#undef F
103
#undef TYPES
104
#undef TAGBYTES
105
106
/* string fields **************************************************************/
107
108
#define F(card, tagbytes, type) \
109
const char* upb_p##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS); \
110
const char* upb_c##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS);
111
112
#define UTF8(card, tagbytes) \
113
F(card, tagbytes, s) \
114
F(card, tagbytes, b)
115
116
#define TAGBYTES(card) \
117
UTF8(card, 1) \
118
UTF8(card, 2)
119
120
TAGBYTES
(s)
121
TAGBYTES
(
o
)
122
TAGBYTES
(
r
)
123
124
#undef F
125
#undef TAGBYTES
126
127
/* sub-message fields *********************************************************/
128
129
#define F(card, tagbytes, size_ceil, ceil_arg) \
130
const char* upb_p##card##m_##tagbytes##bt_max##size_ceil##b(UPB_PARSE_PARAMS);
131
132
#define SIZES(card, tagbytes) \
133
F(card, tagbytes, 64, 64) \
134
F(card, tagbytes, 128, 128) \
135
F(card, tagbytes, 192, 192) \
136
F(card, tagbytes, 256, 256) \
137
F(card, tagbytes, max, -1)
138
139
#define TAGBYTES(card) \
140
SIZES(card, 1) \
141
SIZES(card, 2)
142
143
TAGBYTES
(s)
144
TAGBYTES
(
o
)
145
TAGBYTES
(
r
)
146
147
#undef TAGBYTES
148
#undef SIZES
149
#undef F
150
151
#undef UPB_PARSE_PARAMS
152
153
#endif
/* UPB_DECODE_FAST_H_ */
ptr
char * ptr
Definition:
abseil-cpp/absl/base/internal/low_level_alloc_test.cc:45
upb_Decoder
Definition:
decode_internal.h:48
xds_manager.p
p
Definition:
xds_manager.py:60
TAGBYTES
#define TAGBYTES(card)
Definition:
decode_fast.h:139
msg.h
fastdecode_generic
const char * fastdecode_generic(struct upb_Decoder *d, const char *ptr, upb_Message *msg, intptr_t table, uint64_t hasbits, uint64_t data)
Definition:
decode.c:1058
o
UnboundConversion o
Definition:
third_party/abseil-cpp/absl/strings/internal/str_format/parser_test.cc:97
uint64_t
unsigned __int64 uint64_t
Definition:
stdint-msvc2008.h:90
intptr_t
_W64 signed int intptr_t
Definition:
stdint-msvc2008.h:118
data
char data[kBufferLength]
Definition:
abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
d
static const fe d
Definition:
curve25519_tables.h:19
upb_Message
void upb_Message
Definition:
msg.h:49
msg
std::string msg
Definition:
client_interceptors_end2end_test.cc:372
fix_build_deps.r
r
Definition:
fix_build_deps.py:491
table
uint8_t table[256]
Definition:
hpack_parser.cc:456
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:02