File indexing completed on 2025-01-18 10:13:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 #ifndef UPB_WIRE_INTERNAL_DECODE_FAST_H_
0043 #define UPB_WIRE_INTERNAL_DECODE_FAST_H_
0044
0045 #include "upb/message/message.h"
0046
0047
0048 #include "upb/port/def.inc"
0049
0050 #ifdef __cplusplus
0051 extern "C" {
0052 #endif
0053
0054 struct upb_Decoder;
0055
0056
0057
0058 const char* _upb_FastDecoder_DecodeGeneric(struct upb_Decoder* d,
0059 const char* ptr, upb_Message* msg,
0060 intptr_t table, uint64_t hasbits,
0061 uint64_t data);
0062
0063 #define UPB_PARSE_PARAMS \
0064 struct upb_Decoder *d, const char *ptr, upb_Message *msg, intptr_t table, \
0065 uint64_t hasbits, uint64_t data
0066
0067
0068
0069 #define F(card, type, valbytes, tagbytes) \
0070 const char* upb_p##card##type##valbytes##_##tagbytes##bt(UPB_PARSE_PARAMS);
0071
0072 #define TYPES(card, tagbytes) \
0073 F(card, b, 1, tagbytes) \
0074 F(card, v, 4, tagbytes) \
0075 F(card, v, 8, tagbytes) \
0076 F(card, z, 4, tagbytes) \
0077 F(card, z, 8, tagbytes) \
0078 F(card, f, 4, tagbytes) \
0079 F(card, f, 8, tagbytes)
0080
0081 #define TAGBYTES(card) \
0082 TYPES(card, 1) \
0083 TYPES(card, 2)
0084
0085 TAGBYTES(s)
0086 TAGBYTES(o)
0087 TAGBYTES(r)
0088 TAGBYTES(p)
0089
0090 #undef F
0091 #undef TYPES
0092 #undef TAGBYTES
0093
0094
0095
0096 #define F(card, tagbytes, type) \
0097 const char* upb_p##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS); \
0098 const char* upb_c##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS);
0099
0100 #define UTF8(card, tagbytes) \
0101 F(card, tagbytes, s) \
0102 F(card, tagbytes, b)
0103
0104 #define TAGBYTES(card) \
0105 UTF8(card, 1) \
0106 UTF8(card, 2)
0107
0108 TAGBYTES(s)
0109 TAGBYTES(o)
0110 TAGBYTES(r)
0111
0112 #undef F
0113 #undef UTF8
0114 #undef TAGBYTES
0115
0116
0117
0118 #define F(card, tagbytes, size_ceil, ceil_arg) \
0119 const char* upb_p##card##m_##tagbytes##bt_max##size_ceil##b(UPB_PARSE_PARAMS);
0120
0121 #define SIZES(card, tagbytes) \
0122 F(card, tagbytes, 64, 64) \
0123 F(card, tagbytes, 128, 128) \
0124 F(card, tagbytes, 192, 192) \
0125 F(card, tagbytes, 256, 256) \
0126 F(card, tagbytes, max, -1)
0127
0128 #define TAGBYTES(card) \
0129 SIZES(card, 1) \
0130 SIZES(card, 2)
0131
0132 TAGBYTES(s)
0133 TAGBYTES(o)
0134 TAGBYTES(r)
0135
0136 #undef F
0137 #undef SIZES
0138 #undef TAGBYTES
0139
0140 #undef UPB_PARSE_PARAMS
0141
0142 #ifdef __cplusplus
0143 }
0144 #endif
0145
0146 #include "upb/port/undef.inc"
0147
0148 #endif