cpp_parse_function_generator.cc
Go to the documentation of this file.
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
32 
33 #include <algorithm>
34 #include <limits>
35 #include <string>
36 
37 #include <google/protobuf/compiler/cpp/cpp_helpers.h>
38 #include <google/protobuf/wire_format.h>
39 
40 namespace google {
41 namespace protobuf {
42 namespace compiler {
43 namespace cpp {
44 
45 namespace {
49 
50 std::vector<const FieldDescriptor*> GetOrderedFields(
51  const Descriptor* descriptor, const Options& options) {
52  std::vector<const FieldDescriptor*> ordered_fields;
53  for (auto field : FieldRange(descriptor)) {
54  if (!IsFieldStripped(field, options)) {
55  ordered_fields.push_back(field);
56  }
57  }
58  std::sort(ordered_fields.begin(), ordered_fields.end(),
59  [](const FieldDescriptor* a, const FieldDescriptor* b) {
60  return a->number() < b->number();
61  });
62  return ordered_fields;
63 }
64 
65 bool HasInternalAccessors(const FieldOptions::CType ctype) {
66  return ctype == FieldOptions::STRING || ctype == FieldOptions::CORD;
67 }
68 
69 int TagSize(uint32_t field_number) {
70  if (field_number < 16) return 1;
71  GOOGLE_CHECK_LT(field_number, (1 << 14))
72  << "coded tag for " << field_number << " too big for uint16_t";
73  return 2;
74 }
75 
76 const char* CodedTagType(int tag_size) {
77  return tag_size == 1 ? "uint8_t" : "uint16_t";
78 }
79 
80 const char* TagType(const FieldDescriptor* field) {
81  return CodedTagType(TagSize(field->number()));
82 }
83 
84 std::string TcParserName(const Options& options) {
85  return StrCat("::", ProtobufNamespace(options),
86  "::internal::TcParser::");
87 }
88 
89 std::string MessageTcParseFunctionName(const FieldDescriptor* field,
90  const Options& options) {
91  if (field->message_type()->field_count() == 0 ||
92  !HasGeneratedMethods(field->message_type()->file(), options)) {
93  // For files with `option optimize_for = CODE_SIZE`, or which derive from
94  // `ZeroFieldsBase`, we need to call the `_InternalParse` function, because
95  // there is no generated tailcall function. For tailcall parsing, this is
96  // done by helpers in TcParser.
97  return StrCat(TcParserName(options),
98  (field->is_repeated() ? "Repeated" : "Singular"),
99  "ParseMessage<",
100  QualifiedClassName(field->message_type()), //
101  ", ", TagType(field), ">");
102  }
103  // This matches macros in generated_message_tctable_impl.h:
104  return StrCat("PROTOBUF_TC_PARSE_",
105  (field->is_repeated() ? "REPEATED" : "SINGULAR"),
106  TagSize(field->number()), "(",
107  QualifiedClassName(field->message_type()), ")");
108 }
109 
110 std::string FieldParseFunctionName(const FieldDescriptor* field,
111  const Options& options);
112 
113 } // namespace
114 
116  const Options& options,
117  const std::vector<int>& has_bit_indices,
118  MessageSCCAnalyzer* scc_analyzer) {
119  std::vector<const FieldDescriptor*> ordered_fields =
120  GetOrderedFields(descriptor, options);
121 
122  // The table size is rounded up to the nearest power of 2, clamping at 2^5.
123  // Note that this is a naive approach: a better approach should only consider
124  // table-eligible fields. We may also want to push rarely-encountered fields
125  // into the fallback, to make the table smaller.
126  table_size_log2 = ordered_fields.size() >= 16 ? 5
127  : ordered_fields.size() >= 8 ? 4
128  : ordered_fields.size() >= 4 ? 3
129  : ordered_fields.size() >= 2 ? 2
130  : 1;
131  const unsigned table_size = 1 << table_size_log2;
132 
133  // Construct info for each possible entry. Fields that do not use table-driven
134  // parsing will still have an entry that nominates the fallback function.
135  fast_path_fields.resize(table_size);
136 
137  for (const auto* field : ordered_fields) {
138  // Eagerly assume slow path. If we can handle this field on the fast path,
139  // we will pop its entry from `fallback_fields`.
140  fallback_fields.push_back(field);
141 
142  // Anything difficult slow path:
143  if (field->is_map()) continue;
144  if (field->real_containing_oneof()) continue;
145  if (field->options().weak()) continue;
146  if (IsImplicitWeakField(field, options, scc_analyzer)) continue;
147  if (IsLazy(field, options, scc_analyzer)) continue;
148 
149  // The largest tag that can be read by the tailcall parser is two bytes
150  // when varint-coded. This allows 14 bits for the numeric tag value:
151  // byte 0 byte 1
152  // 1nnnnttt 0nnnnnnn
153  // ^^^^^^^ ^^^^^^^
155  if (tag >= 1 << 14) {
156  continue;
157  } else if (tag >= 1 << 7) {
158  tag = ((tag << 1) & 0x7F00) | 0x80 | (tag & 0x7F);
159  }
160  // The field index is determined by the low bits of the field number, where
161  // the table size determines the width of the mask. The largest table
162  // supported is 32 entries. The parse loop uses these bits directly, so that
163  // the dispatch does not require arithmetic:
164  // byte 0 byte 1
165  // 1nnnnttt 0nnnnnnn
166  // ^^^^^
167  // This means that any field number that does not fit in the lower 4 bits
168  // will always have the top bit of its table index asserted:
169  uint32_t idx = (tag >> 3) & (table_size - 1);
170  // If this entry in the table is already used, then this field will be
171  // handled by the generated fallback function.
172  if (!fast_path_fields[idx].func_name.empty()) continue;
173 
174  // Determine the hasbit mask for this field, if needed. (Note that fields
175  // without hasbits use different parse functions.)
176  int hasbit_idx;
177  if (HasHasbit(field)) {
178  hasbit_idx = has_bit_indices[field->index()];
179  GOOGLE_CHECK_NE(-1, hasbit_idx) << field->DebugString();
180  // The tailcall parser can only update the first 32 hasbits. If this
181  // field's has-bit is beyond that, then it will need to be handled by the
182  // fallback parse function.
183  if (hasbit_idx >= 32) continue;
184  } else {
185  // The tailcall parser only ever syncs 32 has-bits, so if there is no
186  // presence, set a bit that will not be used.
187  hasbit_idx = 63;
188  }
189 
190  // Determine the name of the fastpath parse function to use for this field.
192 
193  switch (field->type()) {
195  name = MessageTcParseFunctionName(field, options);
196  break;
197 
211  name = FieldParseFunctionName(field, options);
212  break;
213 
215  if (field->options().ctype() == FieldOptions::STRING &&
216  field->default_value_string().empty() &&
218  name = FieldParseFunctionName(field, options);
219  }
220  break;
221 
222  default:
223  break;
224  }
225 
226  if (name.empty()) {
227  continue;
228  }
229  // This field made it into the fast path, so remove it from the fallback
230  // fields and fill in the table entry.
231  fallback_fields.pop_back();
232  fast_path_fields[idx].func_name = name;
233  fast_path_fields[idx].bits = TcFieldData(tag, hasbit_idx, 0);
234  fast_path_fields[idx].field = field;
235  }
236 
237  // If there are no fallback fields, and at most one extension range, the
238  // parser can use a generic fallback function. Otherwise, a message-specific
239  // fallback routine is needed.
241  !fallback_fields.empty() || descriptor->extension_range_count() > 1;
242 }
243 
245  const Descriptor* descriptor, int max_has_bit_index,
246  const std::vector<int>& has_bit_indices,
247  const std::vector<int>& inlined_string_indices, const Options& options,
248  MessageSCCAnalyzer* scc_analyzer,
249  const std::map<std::string, std::string>& vars)
251  scc_analyzer_(scc_analyzer),
252  options_(options),
253  variables_(vars),
254  inlined_string_indices_(inlined_string_indices),
255  num_hasbits_(max_has_bit_index) {
256  if (should_generate_tctable()) {
258  has_bit_indices, scc_analyzer));
259  }
262  variables_["classname"] = ClassName(descriptor, false);
263 }
264 
266  Formatter format(printer, variables_);
267  if (should_generate_tctable()) {
268  auto declare_function = [&format](const char* name,
269  const std::string& guard) {
270  if (!guard.empty()) {
271  format.Outdent();
272  format("#if $1$\n", guard);
273  format.Indent();
274  }
275  format("static const char* $1$(PROTOBUF_TC_PARAM_DECL);\n", name);
276  if (!guard.empty()) {
277  format.Outdent();
278  format("#endif // $1$\n", guard);
279  format.Indent();
280  }
281  };
283  format.Outdent();
284  format("#ifdef PROTOBUF_TAIL_CALL_TABLE_PARSER_ENABLED\n");
285  format.Indent();
286  }
287  format("// The Tct_* functions are internal to the protobuf runtime:\n");
288  // These guards are defined in port_def.inc:
289  declare_function("Tct_ParseS1", "PROTOBUF_TC_STATIC_PARSE_SINGULAR1");
290  declare_function("Tct_ParseS2", "PROTOBUF_TC_STATIC_PARSE_SINGULAR2");
291  declare_function("Tct_ParseR1", "PROTOBUF_TC_STATIC_PARSE_REPEATED1");
292  declare_function("Tct_ParseR2", "PROTOBUF_TC_STATIC_PARSE_REPEATED2");
293  if (tc_table_info_->use_generated_fallback) {
294  format.Outdent();
295  format(
296  " private:\n"
297  " ");
298  declare_function("Tct_ParseFallback", "");
299  format(" public:\n");
300  format.Indent();
301  }
303  format.Outdent();
304  format("#endif\n");
305  format.Indent();
306  }
307  }
308  format(
309  "const char* _InternalParse(const char* ptr, "
310  "::$proto_ns$::internal::ParseContext* ctx) final;\n");
311 }
312 
314  Formatter format(printer, variables_);
315  bool need_parse_function = true;
317  // Special-case MessageSet.
318  need_parse_function = false;
319  format(
320  "const char* $classname$::_InternalParse(const char* ptr,\n"
321  " ::$proto_ns$::internal::ParseContext* ctx) {\n"
322  "$annotate_deserialize$"
323  " return _extensions_.ParseMessageSet(ptr, \n"
324  " internal_default_instance(), &_internal_metadata_, ctx);\n"
325  "}\n");
326  }
327  if (!should_generate_tctable()) {
328  if (need_parse_function) {
330  }
331  return;
332  }
334  format("#ifdef PROTOBUF_TAIL_CALL_TABLE_PARSER_ENABLED\n\n");
335  }
336  if (need_parse_function) {
338  }
339  if (tc_table_info_->use_generated_fallback) {
341  }
344  if (need_parse_function) {
345  format("\n#else // PROTOBUF_TAIL_CALL_TABLE_PARSER_ENABLED\n\n");
347  }
348  format("\n#endif // PROTOBUF_TAIL_CALL_TABLE_PARSER_ENABLED\n");
349  }
350 }
351 
354  return false;
355  }
356  return true;
357 }
358 
361 
362  // Generate an `_InternalParse` that starts the tail-calling loop.
363  format(
364  "const char* $classname$::_InternalParse(\n"
365  " const char* ptr, ::$proto_ns$::internal::ParseContext* ctx) {\n"
366  "$annotate_deserialize$"
367  " ptr = ::$proto_ns$::internal::TcParser::ParseLoop(\n"
368  " this, ptr, ctx, &_table_.header);\n");
369  format(
370  " return ptr;\n"
371  "}\n\n");
372 }
373 
375  Formatter& format) {
377  format(
378  "const char* $classname$::Tct_ParseFallback(PROTOBUF_TC_PARAM_DECL) {\n"
379  "#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) return nullptr\n");
380  format.Indent();
381  format("auto* typed_msg = static_cast<$classname$*>(msg);\n");
382 
383  if (num_hasbits_ > 0) {
384  // Sync hasbits
385  format("typed_msg->_has_bits_[0] = hasbits;\n");
386  }
387 
388  format.Set("msg", "typed_msg->");
389  format.Set("this", "typed_msg");
390  format.Set("has_bits", "typed_msg->_has_bits_");
391  format.Set("next_tag", "goto next_tag");
393  tc_table_info_->fallback_fields);
394 
395  format.Outdent();
396  format(
397  "next_tag:\n"
398  "message_done:\n"
399  " return ptr;\n"
400  "#undef CHK_\n"
401  "}\n");
402 }
403 
405  Formatter& format) {
407  // There are four cases where a tailcall target are needed for messages:
408  // {singular, repeated} x {1, 2}-byte tag
409  struct {
410  const char* type;
411  int size;
412  } const kTagLayouts[] = {
413  {"uint8_t", 1},
414  {"uint16_t", 2},
415  };
416  // Singular:
417  for (const auto& layout : kTagLayouts) {
418  // Guard macros are defined in port_def.inc.
419  format(
420  "#if PROTOBUF_TC_STATIC_PARSE_SINGULAR$1$\n"
421  "const char* $classname$::Tct_ParseS$1$(PROTOBUF_TC_PARAM_DECL) {\n"
422  " if (PROTOBUF_PREDICT_FALSE(data.coded_tag<$2$>() != 0))\n"
423  " PROTOBUF_MUSTTAIL "
424  "return table->fallback(PROTOBUF_TC_PARAM_PASS);\n"
425  " ptr += $1$;\n"
426  " hasbits |= (uint64_t{1} << data.hasbit_idx());\n"
427  " ::$proto_ns$::internal::TcParser::SyncHasbits"
428  "(msg, hasbits, table);\n"
429  " auto& field = ::$proto_ns$::internal::TcParser::"
430  "RefAt<$classtype$*>(msg, data.offset());\n"
431  " if (field == nullptr)\n"
432  " field = CreateMaybeMessage<$classtype$>(ctx->data().arena);\n"
433  " return ctx->ParseMessage(field, ptr);\n"
434  "}\n"
435  "#endif // PROTOBUF_TC_STATIC_PARSE_SINGULAR$1$\n",
436  layout.size, layout.type);
437  }
438  // Repeated:
439  for (const auto& layout : kTagLayouts) {
440  // Guard macros are defined in port_def.inc.
441  format(
442  "#if PROTOBUF_TC_STATIC_PARSE_REPEATED$1$\n"
443  "const char* $classname$::Tct_ParseR$1$(PROTOBUF_TC_PARAM_DECL) {\n"
444  " if (PROTOBUF_PREDICT_FALSE(data.coded_tag<$2$>() != 0)) {\n"
445  " PROTOBUF_MUSTTAIL "
446  "return table->fallback(PROTOBUF_TC_PARAM_PASS);\n"
447  " }\n"
448  " ptr += $1$;\n"
449  " auto& field = ::$proto_ns$::internal::TcParser::RefAt<"
450  "::$proto_ns$::RepeatedPtrField<$classname$>>(msg, data.offset());\n"
451  " ::$proto_ns$::internal::TcParser::SyncHasbits"
452  "(msg, hasbits, table);\n"
453  " ptr = ctx->ParseMessage(field.Add(), ptr);\n"
454  " return ptr;\n"
455  "}\n"
456  "#endif // PROTOBUF_TC_STATIC_PARSE_REPEATED$1$\n",
457  layout.size, layout.type);
458  }
459 }
460 
462  if (!should_generate_tctable()) {
463  return;
464  }
465  Formatter format(printer, variables_);
467  format.Outdent();
468  format("#ifdef PROTOBUF_TAIL_CALL_TABLE_PARSER_ENABLED\n");
469  format.Indent();
470  }
471  format(
472  "static const ::$proto_ns$::internal::TcParseTable<$1$>\n"
473  " _table_;\n",
474  tc_table_info_->table_size_log2);
476  format.Outdent();
477  format("#endif // PROTOBUF_TAIL_CALL_TABLE_PARSER_ENABLED\n");
478  format.Indent();
479  }
480 }
481 
483  if (!should_generate_tctable()) {
484  return;
485  }
486  Formatter format(printer, variables_);
488  format("#ifdef PROTOBUF_TAIL_CALL_TABLE_PARSER_ENABLED\n");
489  }
492  format("#endif // PROTOBUF_TAIL_CALL_TABLE_PARSER_ENABLED\n");
493  }
494 }
495 
497  format(
498  "const char* $classname$::_InternalParse(const char* ptr, "
499  "::$proto_ns$::internal::ParseContext* ctx) {\n"
500  "$annotate_deserialize$"
501  "#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure\n");
502  format.Indent();
503  format.Set("msg", "");
504  format.Set("this", "this");
505  int hasbits_size = 0;
506  if (num_hasbits_ > 0) {
507  hasbits_size = (num_hasbits_ + 31) / 32;
508  }
509  // For now only optimize small hasbits.
510  if (hasbits_size != 1) hasbits_size = 0;
511  if (hasbits_size) {
512  format("_Internal::HasBits has_bits{};\n");
513  format.Set("has_bits", "has_bits");
514  } else {
515  format.Set("has_bits", "_has_bits_");
516  }
517  format.Set("next_tag", "continue");
518  format("while (!ctx->Done(&ptr)) {\n");
519  format.Indent();
520 
522  GetOrderedFields(descriptor_, options_));
523 
524  format.Outdent();
525  format("} // while\n");
526 
527  format.Outdent();
528  format("message_done:\n");
529  if (hasbits_size) format(" _has_bits_.Or(has_bits);\n");
530 
531  format(
532  " return ptr;\n"
533  "failure:\n"
534  " ptr = nullptr;\n"
535  " goto message_done;\n"
536  "#undef CHK_\n"
537  "}\n");
538 }
539 
542  // All entries without a fast-path parsing function need a fallback.
543  std::string fallback;
544  if (tc_table_info_->use_generated_fallback) {
545  fallback = ClassName(descriptor_) + "::Tct_ParseFallback";
546  } else {
547  fallback = TcParserName(options_) + "GenericFallback";
550  fallback += "Lite";
551  }
552  }
553 
554  // For simplicity and speed, the table is not covering all proto
555  // configurations. This model uses a fallback to cover all situations that
556  // the table can't accommodate, together with unknown fields or extensions.
557  // These are number of fields over 32, fields with 3 or more tag bytes,
558  // maps, weak fields, lazy, more than 1 extension range. In the cases
559  // the table is sufficient we can use a generic routine, that just handles
560  // unknown fields and potentially an extension range.
561  format(
562  "const ::$proto_ns$::internal::TcParseTable<$1$>\n"
563  " $classname$::_table_ = {\n",
564  tc_table_info_->table_size_log2);
565  {
566  auto table_scope = format.ScopedIndent();
567  format("{\n");
568  {
569  auto header_scope = format.ScopedIndent();
571  format("PROTOBUF_FIELD_OFFSET($classname$, _has_bits_),\n");
572  } else {
573  format("0, // no _has_bits_\n");
574  }
575  if (descriptor_->extension_range_count() == 1) {
576  format(
577  "PROTOBUF_FIELD_OFFSET($classname$, _extensions_),\n"
578  "$1$, $2$, // extension_range_{low,high}\n",
581  } else {
582  format("0, 0, 0, // no _extensions_\n");
583  }
584  format(
585  "$1$, 0, $2$, // fast_idx_mask, reserved, num_fields\n"
586  "&$3$._instance,\n"
587  "$4$ // fallback\n",
588  (((1 << tc_table_info_->table_size_log2) - 1) << 3),
591  }
592  format("}, {\n");
593  {
594  auto fast_scope = format.ScopedIndent();
595  GenerateFastFieldEntries(format, fallback);
596  }
597  format("},\n"); // entries[]
598  }
599  format("};\n\n"); // _table_
600 }
601 
603  Formatter& format, const std::string& fallback) {
604  for (const auto& info : tc_table_info_->fast_path_fields) {
605  if (info.field != nullptr) {
606  PrintFieldComment(format, info.field);
607  }
608  format("{$1$, ", info.func_name.empty() ? fallback : info.func_name);
609  if (info.bits.data) {
610  GOOGLE_DCHECK_NE(nullptr, info.field);
611  format(
612  "{$1$, $2$, "
613  "static_cast<uint16_t>(PROTOBUF_FIELD_OFFSET($classname$, $3$_))}",
614  info.bits.coded_tag(), info.bits.hasbit_idx(), FieldName(info.field));
615  } else {
616  format("{}");
617  }
618  format("},\n");
619  }
620 }
621 
623  const FieldDescriptor* field) {
624  if (HasHasbit(field)) {
625  format("_Internal::set_has_$1$(&$has_bits$);\n", FieldName(field));
626  }
628  field->default_value_string().empty()
629  ? "::" + ProtobufNamespace(options_) +
630  "::internal::GetEmptyStringAlreadyInited()"
631  : QualifiedClassName(field->containing_type(), options_) +
632  "::" + MakeDefaultName(field) + ".get()";
633  format(
634  "if (arena != nullptr) {\n"
635  " ptr = ctx->ReadArenaString(ptr, &$msg$$name$_, arena");
638  int inlined_string_index = inlined_string_indices_[field->index()];
639  GOOGLE_DCHECK_GE(inlined_string_index, 0);
640  format(
641  ", $msg$_internal_$name$_donated()"
642  ", &$msg$_inlined_string_donated_[$1$]"
643  ", ~0x$2$u",
644  inlined_string_index / 32,
645  strings::Hex(1u << (inlined_string_index % 32), strings::ZERO_PAD_8));
646  } else {
647  GOOGLE_DCHECK(field->default_value_string().empty());
648  }
649  format(
650  ");\n"
651  "} else {\n"
652  " ptr = ::$proto_ns$::internal::InlineGreedyStringParser("
653  "$msg$$name$_.MutableNoArenaNoDefault(&$1$), ptr, ctx);\n"
654  "}\n"
655  "const std::string* str = &$msg$$name$_.Get(); (void)str;\n",
657 }
658 
660  const FieldDescriptor* field,
661  bool check_utf8) {
664  // Open source doesn't support other ctypes;
665  ctype = field->options().ctype();
666  }
667  if (!field->is_repeated() && !options_.opensource_runtime &&
669  // For now only use arena string for strings with empty defaults.
670  field->default_value_string().empty() &&
671  !field->real_containing_oneof() && ctype == FieldOptions::STRING) {
673  } else {
674  std::string parser_name;
675  switch (ctype) {
677  parser_name = "GreedyStringParser";
678  break;
679  case FieldOptions::CORD:
680  parser_name = "CordParser";
681  break;
683  parser_name = "StringPieceParser";
684  break;
685  }
686  format(
687  "auto str = $msg$$1$$2$_$name$();\n"
688  "ptr = ::$proto_ns$::internal::Inline$3$(str, ptr, ctx);\n",
689  HasInternalAccessors(ctype) ? "_internal_" : "",
690  field->is_repeated() && !field->is_packable() ? "add" : "mutable",
691  parser_name);
692  }
693  if (!check_utf8) return; // return if this is a bytes field
695  switch (level) {
697  return;
699  format("#ifndef NDEBUG\n");
700  break;
702  format("CHK_(");
703  break;
704  }
705  std::string field_name;
706  field_name = "nullptr";
707  if (HasDescriptorMethods(field->file(), options_)) {
708  field_name = StrCat("\"", field->full_name(), "\"");
709  }
710  format("::$proto_ns$::internal::VerifyUTF8(str, $1$)", field_name);
711  switch (level) {
713  return;
715  format(
716  ";\n"
717  "#endif // !NDEBUG\n");
718  break;
720  format(");\n");
721  break;
722  }
723 }
724 
726  const FieldDescriptor* field) {
727  if (field->is_packable()) {
728  if (field->type() == FieldDescriptor::TYPE_ENUM &&
731  format(
732  "ptr = "
733  "::$proto_ns$::internal::Packed$1$Parser<$unknown_fields_type$>("
734  "$msg$_internal_mutable_$name$(), ptr, ctx, $2$_IsValid, "
735  "&$msg$_internal_metadata_, $3$);\n",
736  DeclaredTypeMethodName(field->type()), enum_type, field->number());
737  } else {
738  format(
739  "ptr = ::$proto_ns$::internal::Packed$1$Parser("
740  "$msg$_internal_mutable_$name$(), ptr, ctx);\n",
741  DeclaredTypeMethodName(field->type()));
742  }
743  } else {
744  auto field_type = field->type();
745  switch (field_type) {
747  GenerateStrings(format, field, true /* utf8 */);
748  break;
750  GenerateStrings(format, field, false /* utf8 */);
751  break;
753  if (field->is_map()) {
754  const FieldDescriptor* val =
755  field->message_type()->FindFieldByName("value");
756  GOOGLE_CHECK(val);
757  if (val->type() == FieldDescriptor::TYPE_ENUM &&
759  format(
760  "auto object = "
761  "::$proto_ns$::internal::InitEnumParseWrapper<"
762  "$unknown_fields_type$>(&$msg$$name$_, $1$_IsValid, "
763  "$2$, &$msg$_internal_metadata_);\n"
764  "ptr = ctx->ParseMessage(&object, ptr);\n",
766  field->number());
767  } else {
768  format("ptr = ctx->ParseMessage(&$msg$$name$_, ptr);\n");
769  }
770  } else if (IsLazy(field, options_, scc_analyzer_)) {
771  if (field->real_containing_oneof()) {
772  format(
773  "if (!$msg$_internal_has_$name$()) {\n"
774  " $msg$clear_$1$();\n"
775  " $msg$$1$_.$name$_ = ::$proto_ns$::Arena::CreateMessage<\n"
776  " ::$proto_ns$::internal::LazyField>("
777  "$msg$GetArenaForAllocation());\n"
778  " $msg$set_has_$name$();\n"
779  "}\n"
780  "auto* lazy_field = $msg$$1$_.$name$_;\n",
781  field->containing_oneof()->name());
782  } else if (HasHasbit(field)) {
783  format(
784  "_Internal::set_has_$name$(&$has_bits$);\n"
785  "auto* lazy_field = &$msg$$name$_;\n");
786  } else {
787  format("auto* lazy_field = &$msg$$name$_;\n");
788  }
789  format(
790  "::$proto_ns$::internal::LazyFieldParseHelper<\n"
791  " ::$proto_ns$::internal::LazyField> parse_helper(\n"
792  " $1$::default_instance(),\n"
793  " $msg$GetArenaForAllocation(), lazy_field);\n"
794  "ptr = ctx->ParseMessage(&parse_helper, ptr);\n",
797  if (!field->is_repeated()) {
798  format(
799  "ptr = ctx->ParseMessage(_Internal::mutable_$name$($this$), "
800  "ptr);\n");
801  } else {
802  format(
803  "ptr = ctx->ParseMessage($msg$$name$_.AddWeak("
804  "reinterpret_cast<const ::$proto_ns$::MessageLite*>($1$ptr_)"
805  "), ptr);\n",
806  QualifiedDefaultInstanceName(field->message_type(), options_));
807  }
808  } else if (IsWeak(field, options_)) {
809  format(
810  "{\n"
811  " auto* default_ = &reinterpret_cast<const Message&>($1$);\n"
812  " ptr = ctx->ParseMessage($msg$_weak_field_map_.MutableMessage("
813  "$2$, default_), ptr);\n"
814  "}\n",
815  QualifiedDefaultInstanceName(field->message_type(), options_),
816  field->number());
817  } else {
818  format(
819  "ptr = ctx->ParseMessage($msg$_internal_$mutable_field$(), "
820  "ptr);\n");
821  }
822  break;
823  }
824  default:
825  GOOGLE_LOG(FATAL) << "Illegal combination for length delimited wiretype "
826  << " filed type is " << field->type();
827  }
828  }
829 }
830 
832  WireFormatLite::WireType wiretype) {
833  constexpr int kMaxTwoByteFieldNumber = 16 * 128;
834  return descriptor->number() < kMaxTwoByteFieldNumber &&
835  descriptor->is_repeated() &&
836  (!descriptor->is_packable() ||
838 }
839 
842  const FieldDescriptor* field) {
843  Formatter::SaveState formatter_state(&format);
844  format.AddMap(
845  {{"name", FieldName(field)},
846  {"primitive_type", PrimitiveTypeName(options_, field->cpp_type())}});
847  if (field->is_repeated()) {
848  format.AddMap({{"put_field", StrCat("add_", FieldName(field))},
849  {"mutable_field", StrCat("add_", FieldName(field))}});
850  } else {
851  format.AddMap(
852  {{"put_field", StrCat("set_", FieldName(field))},
853  {"mutable_field", StrCat("mutable_", FieldName(field))}});
854  }
855  uint32_t tag = WireFormatLite::MakeTag(field->number(), wiretype);
856  switch (wiretype) {
859  if (field->type() == FieldDescriptor::TYPE_ENUM) {
860  format.Set("enum_type",
861  QualifiedClassName(field->enum_type(), options_));
862  format(
863  "$uint64$ val = ::$proto_ns$::internal::ReadVarint64(&ptr);\n"
864  "CHK_(ptr);\n");
866  format("if (PROTOBUF_PREDICT_TRUE($enum_type$_IsValid(val))) {\n");
867  format.Indent();
868  }
869  format("$msg$_internal_$put_field$(static_cast<$enum_type$>(val));\n");
871  format.Outdent();
872  format(
873  "} else {\n"
874  " ::$proto_ns$::internal::WriteVarint("
875  "$1$, val, $msg$mutable_unknown_fields());\n"
876  "}\n",
877  field->number());
878  }
879  } else {
881  field->type() == FieldDescriptor::TYPE_SINT32 ||
883  ? "32"
884  : "64";
885  std::string zigzag;
886  if ((field->type() == FieldDescriptor::TYPE_SINT32 ||
887  field->type() == FieldDescriptor::TYPE_SINT64)) {
888  zigzag = "ZigZag";
889  }
890  if (field->is_repeated() || field->real_containing_oneof()) {
891  format(
892  "$msg$_internal_$put_field$("
893  "::$proto_ns$::internal::ReadVarint$1$$2$(&ptr));\n"
894  "CHK_(ptr);\n",
895  zigzag, size);
896  } else {
897  if (HasHasbit(field)) {
898  format("_Internal::set_has_$name$(&$has_bits$);\n");
899  }
900  format(
901  "$msg$$name$_ = ::$proto_ns$::internal::ReadVarint$1$$2$(&ptr);\n"
902  "CHK_(ptr);\n",
903  zigzag, size);
904  }
905  }
906  break;
907  }
910  if (field->is_repeated() || field->real_containing_oneof()) {
911  format(
912  "$msg$_internal_$put_field$("
913  "::$proto_ns$::internal::UnalignedLoad<$primitive_type$>(ptr));\n"
914  "ptr += sizeof($primitive_type$);\n");
915  } else {
916  if (HasHasbit(field)) {
917  format("_Internal::set_has_$name$(&$has_bits$);\n");
918  }
919  format(
920  "$msg$$name$_ = "
921  "::$proto_ns$::internal::UnalignedLoad<$primitive_type$>(ptr);\n"
922  "ptr += sizeof($primitive_type$);\n");
923  }
924  break;
925  }
928  format("CHK_(ptr);\n");
929  break;
930  }
932  format(
933  "ptr = ctx->ParseGroup($msg$_internal_$mutable_field$(), ptr, $1$);\n"
934  "CHK_(ptr);\n",
935  tag);
936  break;
937  }
939  GOOGLE_LOG(FATAL) << "Can't have end group field\n";
940  break;
941  }
942  } // switch (wire_type)
943 }
944 
945 // Returns the tag for this field and in case of repeated packable fields,
946 // sets a fallback tag in fallback_tag_ptr.
948  uint32_t* fallback_tag_ptr) {
949  uint32_t expected_tag;
950  if (field->is_packable()) {
951  auto expected_wiretype = WireFormat::WireTypeForFieldType(field->type());
952  expected_tag = WireFormatLite::MakeTag(field->number(), expected_wiretype);
954  auto fallback_wiretype = WireFormatLite::WIRETYPE_LENGTH_DELIMITED;
955  uint32_t fallback_tag =
956  WireFormatLite::MakeTag(field->number(), fallback_wiretype);
957 
958  if (field->is_packed()) std::swap(expected_tag, fallback_tag);
959  *fallback_tag_ptr = fallback_tag;
960  } else {
961  auto expected_wiretype = WireFormat::WireTypeForField(field);
962  expected_tag = WireFormatLite::MakeTag(field->number(), expected_wiretype);
963  }
964  return expected_tag;
965 }
966 
967 // These variables are used by the generated parse iteration, and must already
968 // be defined in the generated code:
969 // - `const char* ptr`: the input buffer.
970 // - `ParseContext* ctx`: the associated context for `ptr`.
971 // - implicit `this`: i.e., we must be in a non-static member function.
972 //
973 // The macro `CHK_(x)` must be defined. It should return an error condition if
974 // the macro parameter is false.
975 //
976 // Whenever an END_GROUP tag was read, or tag 0 was read, the generated code
977 // branches to the label `message_done`.
978 //
979 // These formatter variables are used:
980 // - `next_tag`: a single statement to begin parsing the next tag.
981 //
982 // At the end of the generated code, the enclosing function should proceed to
983 // parse the next tag in the stream.
986  const std::vector<const FieldDescriptor*>& ordered_fields) {
987  format(
988  "$uint32$ tag;\n"
989  "ptr = ::$proto_ns$::internal::ReadTag(ptr, &tag);\n");
990 
991  if (!ordered_fields.empty()) {
992  GenerateFieldSwitch(format, ordered_fields);
993  // Each field `case` only considers field number. Field numbers that are
994  // not defined in the message, or tags with an incompatible wire type, are
995  // considered "unusual" cases. They will be handled by the logic below.
996  format.Outdent();
997  format("handle_unusual:\n");
998  format.Indent();
999  }
1000 
1001  // Unusual/extension/unknown case:
1002  format(
1003  "if ((tag == 0) || ((tag & 7) == 4)) {\n"
1004  " CHK_(ptr);\n"
1005  " ctx->SetLastTag(tag);\n"
1006  " goto message_done;\n"
1007  "}\n");
1009  format("$next_tag$;\n");
1010  } else {
1011  if (descriptor->extension_range_count() > 0) {
1012  format("if (");
1013  for (int i = 0; i < descriptor->extension_range_count(); i++) {
1014  const Descriptor::ExtensionRange* range =
1015  descriptor->extension_range(i);
1016  if (i > 0) format(" ||\n ");
1017 
1018  uint32_t start_tag = WireFormatLite::MakeTag(
1019  range->start, static_cast<WireFormatLite::WireType>(0));
1021  range->end, static_cast<WireFormatLite::WireType>(0));
1022 
1023  if (range->end > FieldDescriptor::kMaxNumber) {
1024  format("($1$u <= tag)", start_tag);
1025  } else {
1026  format("($1$u <= tag && tag < $2$u)", start_tag, end_tag);
1027  }
1028  }
1029  format(
1030  ") {\n"
1031  " ptr = $msg$_extensions_.ParseField(tag, ptr, "
1032  "internal_default_instance(), &$msg$_internal_metadata_, ctx);\n"
1033  " CHK_(ptr != nullptr);\n"
1034  " $next_tag$;\n"
1035  "}\n");
1036  }
1037  format(
1038  "ptr = UnknownFieldParse(\n"
1039  " tag,\n"
1040  " $msg$_internal_metadata_.mutable_unknown_fields<"
1041  "$unknown_fields_type$>(),\n"
1042  " ptr, ctx);\n"
1043  "CHK_(ptr != nullptr);\n");
1044  }
1045 }
1046 
1048  Formatter& format,
1049  const std::vector<const FieldDescriptor*>& ordered_fields) {
1050  format("switch (tag >> 3) {\n");
1051  format.Indent();
1052 
1053  for (const auto* field : ordered_fields) {
1055  format("case $1$:\n", field->number());
1056  format.Indent();
1057  uint32_t fallback_tag = 0;
1058  uint32_t expected_tag = ExpectedTag(field, &fallback_tag);
1059  format("if (PROTOBUF_PREDICT_TRUE(static_cast<$uint8$>(tag) == $1$)) {\n",
1060  expected_tag & 0xFF);
1061  format.Indent();
1062  auto wiretype = WireFormatLite::GetTagWireType(expected_tag);
1063  uint32_t tag = WireFormatLite::MakeTag(field->number(), wiretype);
1064  int tag_size = io::CodedOutputStream::VarintSize32(tag);
1065  bool is_repeat = ShouldRepeat(field, wiretype);
1066  if (is_repeat) {
1067  format(
1068  "ptr -= $1$;\n"
1069  "do {\n"
1070  " ptr += $1$;\n",
1071  tag_size);
1072  format.Indent();
1073  }
1074  GenerateFieldBody(format, wiretype, field);
1075  if (is_repeat) {
1076  format.Outdent();
1077  format(
1078  " if (!ctx->DataAvailable(ptr)) break;\n"
1079  "} while (::$proto_ns$::internal::ExpectTag<$1$>(ptr));\n",
1080  tag);
1081  }
1082  format.Outdent();
1083  if (fallback_tag) {
1084  format("} else if (static_cast<$uint8$>(tag) == $1$) {\n",
1085  fallback_tag & 0xFF);
1086  format.Indent();
1088  field);
1089  format.Outdent();
1090  }
1091  format(
1092  "} else\n"
1093  " goto handle_unusual;\n"
1094  "$next_tag$;\n");
1095  format.Outdent();
1096  } // for loop over ordered fields
1097 
1098  format(
1099  "default:\n"
1100  " goto handle_unusual;\n");
1101  format.Outdent();
1102  format("} // switch\n");
1103 }
1104 
1105 namespace {
1106 
1107 std::string FieldParseFunctionName(const FieldDescriptor* field,
1108  const Options& options) {
1109  ParseCardinality card = //
1110  field->is_packed() ? ParseCardinality::kPacked
1111  : field->is_repeated() ? ParseCardinality::kRepeated
1112  : field->real_containing_oneof() ? ParseCardinality::kOneof
1114 
1115  TypeFormat type_format;
1116  switch (field->type()) {
1120  type_format = TypeFormat::kFixed64;
1121  break;
1122 
1126  type_format = TypeFormat::kFixed32;
1127  break;
1128 
1131  type_format = TypeFormat::kVar64;
1132  break;
1133 
1136  type_format = TypeFormat::kVar32;
1137  break;
1138 
1140  type_format = TypeFormat::kSInt64;
1141  break;
1142 
1144  type_format = TypeFormat::kSInt32;
1145  break;
1146 
1148  type_format = TypeFormat::kBool;
1149  break;
1150 
1152  type_format = TypeFormat::kBytes;
1153  break;
1154 
1156  switch (GetUtf8CheckMode(field, options)) {
1157  case Utf8CheckMode::kNone:
1158  type_format = TypeFormat::kBytes;
1159  break;
1161  type_format = TypeFormat::kString;
1162  break;
1164  type_format = TypeFormat::kStringValidateOnly;
1165  break;
1166  default:
1167  GOOGLE_LOG(DFATAL) << "Mode not handled: "
1168  << static_cast<int>(GetUtf8CheckMode(field, options));
1169  return "";
1170  }
1171  break;
1172 
1173  default:
1174  GOOGLE_LOG(DFATAL) << "Type not handled: " << field->DebugString();
1175  return "";
1176  }
1177 
1178  return "::" + ProtobufNamespace(options) + "::internal::TcParser::" +
1179  GetTailCallFieldHandlerName(card, type_format,
1180  TagSize(field->number()), options);
1181 }
1182 
1183 } // namespace
1184 
1186  TypeFormat type_format,
1187  int tag_length_bytes,
1188  const Options& options) {
1189  std::string name;
1190 
1191  // The field implementation functions are prefixed by cardinality:
1192  // `Singular` for optional or implicit fields.
1193  // `Repeated` for non-packed repeated.
1194  // `Packed` for packed repeated.
1195  switch (card) {
1197  name.append("Singular");
1198  break;
1200  name.append("Oneof");
1201  break;
1203  name.append("Repeated");
1204  break;
1206  name.append("Packed");
1207  break;
1208  }
1209 
1210  // Next in the function name is the TypeFormat-specific name.
1211  switch (type_format) {
1212  case TypeFormat::kFixed64:
1213  case TypeFormat::kFixed32:
1214  name.append("Fixed");
1215  break;
1216 
1217  case TypeFormat::kVar64:
1218  case TypeFormat::kVar32:
1219  case TypeFormat::kSInt64:
1220  case TypeFormat::kSInt32:
1221  case TypeFormat::kBool:
1222  name.append("Varint");
1223  break;
1224 
1225  case TypeFormat::kBytes:
1226  case TypeFormat::kString:
1228  name.append("String");
1229  break;
1230 
1231  default:
1232  break;
1233  }
1234 
1235  name.append("<");
1236 
1237  // Determine the numeric layout type for the parser to use, independent of
1238  // the specific parsing logic used.
1239  switch (type_format) {
1240  case TypeFormat::kVar64:
1241  case TypeFormat::kFixed64:
1242  name.append("uint64_t, ");
1243  break;
1244 
1245  case TypeFormat::kSInt64:
1246  name.append("int64_t, ");
1247  break;
1248 
1249  case TypeFormat::kVar32:
1250  case TypeFormat::kFixed32:
1251  name.append("uint32_t, ");
1252  break;
1253 
1254  case TypeFormat::kSInt32:
1255  name.append("int32_t, ");
1256  break;
1257 
1258  case TypeFormat::kBool:
1259  name.append("bool, ");
1260  break;
1261 
1262  default:
1263  break;
1264  }
1265 
1266  name.append(CodedTagType(tag_length_bytes));
1267 
1268  switch (type_format) {
1269  case TypeFormat::kVar64:
1270  case TypeFormat::kVar32:
1271  case TypeFormat::kBool:
1272  StrAppend(&name, ", ", TcParserName(options), "kNoConversion");
1273  break;
1274 
1275  case TypeFormat::kSInt64:
1276  case TypeFormat::kSInt32:
1277  StrAppend(&name, ", ", TcParserName(options), "kZigZag");
1278  break;
1279 
1280  case TypeFormat::kBytes:
1281  StrAppend(&name, ", ", TcParserName(options), "kNoUtf8");
1282  break;
1283 
1284  case TypeFormat::kString:
1285  StrAppend(&name, ", ", TcParserName(options), "kUtf8");
1286  break;
1287 
1289  StrAppend(&name, ", ", TcParserName(options), "kUtf8ValidateOnly");
1290  break;
1291 
1292  default:
1293  break;
1294  }
1295 
1296  name.append(">");
1297  return name;
1298 }
1299 
1300 } // namespace cpp
1301 } // namespace compiler
1302 } // namespace protobuf
1303 } // namespace google
google::protobuf::compiler::cpp::ParseCardinality::kOneof
@ kOneof
descriptor_
string_view descriptor_
Definition: elf.cc:154
MessageLayout::size
size_t size
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:939
GOOGLE_DCHECK_NE
#define GOOGLE_DCHECK_NE
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:197
google::protobuf::compiler::cpp::ParseCardinality
ParseCardinality
Definition: cpp_parse_function_generator.h:158
google::protobuf::compiler::cpp::HasGeneratedMethods
bool HasGeneratedMethods(const FileDescriptor *file, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:362
http2_test_server.format
format
Definition: http2_test_server.py:118
google::protobuf::FieldDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:515
google::protobuf::compiler::cpp::ParseCardinality::kRepeated
@ kRepeated
google::protobuf::compiler::cpp::HasHasbit
bool HasHasbit(const FieldDescriptor *field)
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:443
google::protobuf::FieldDescriptor::TYPE_SFIXED64
@ TYPE_SFIXED64
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:542
google::protobuf::compiler::cpp::FieldName
std::string FieldName(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:416
variables_
std::map< std::string, std::string > variables_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:518
google::protobuf::compiler::cpp::ParseFunctionGenerator::scc_analyzer_
MessageSCCAnalyzer * scc_analyzer_
Definition: cpp_parse_function_generator.h:150
google::protobuf::compiler::cpp::ProtobufNamespace
std::string ProtobufNamespace(const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:60
capstone.range
range
Definition: third_party/bloaty/third_party/capstone/bindings/python/capstone/__init__.py:6
GOOGLE_DCHECK
#define GOOGLE_DCHECK
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:194
google::protobuf::compiler::cpp::Formatter::SaveState
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:662
options
double_dict options[]
Definition: capstone_test.c:55
google::protobuf::compiler::cpp::Options::kTCTableNever
@ kTCTableNever
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_options.h:81
google::protobuf.internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED
@ WIRETYPE_LENGTH_DELIMITED
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.h:104
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateArenaString
void GenerateArenaString(Formatter &format, const FieldDescriptor *field)
Definition: cpp_parse_function_generator.cc:622
google::protobuf::compiler::cpp::TypeFormat::kVar64
@ kVar64
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
google::protobuf::FieldDescriptor::TYPE_BYTES
@ TYPE_BYTES
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:538
GOOGLE_CHECK_LT
#define GOOGLE_CHECK_LT(A, B)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:158
google::protobuf::compiler::cpp::Utf8CheckMode::kVerify
@ kVerify
google::protobuf::FieldDescriptor::TYPE_DOUBLE
@ TYPE_DOUBLE
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:522
u
OPENSSL_EXPORT pem_password_cb void * u
Definition: pem.h:351
google::protobuf
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:12
google::protobuf.internal::TcFieldData
Definition: generated_message_tctable_decl.h:52
google::protobuf::FieldDescriptor::TYPE_BOOL
@ TYPE_BOOL
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:533
google::protobuf::compiler::cpp::QualifiedClassName
std::string QualifiedClassName(const Descriptor *d, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:320
google::protobuf.internal::WireFormat
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format.h:76
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateFieldBody
void GenerateFieldBody(Formatter &format, google::protobuf::internal::WireFormatLite::WireType wiretype, const FieldDescriptor *field)
Definition: cpp_parse_function_generator.cc:840
setup.name
name
Definition: setup.py:542
google::protobuf::compiler::cpp::ParseCardinality::kSingular
@ kSingular
google::protobuf::strings::Hex
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.h:594
google::protobuf::compiler::cpp::IsStringInlined
bool IsStringInlined(const FieldDescriptor *descriptor, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:752
google::protobuf::compiler::cpp::HasPreservingUnknownEnumSemantics
bool HasPreservingUnknownEnumSemantics(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:414
google::protobuf::strings::ZERO_PAD_8
@ ZERO_PAD_8
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.h:583
default_string
static upb_StringView default_string(upb_ToProto_Context *ctx, const upb_FieldDef *f)
Definition: def_to_proto.c:124
google::protobuf::compiler::cpp::ParseFunctionGenerator::inlined_string_indices_
std::vector< int > inlined_string_indices_
Definition: cpp_parse_function_generator.h:154
google::protobuf::compiler::cpp::ParseFunctionGenerator::should_generate_tctable
bool should_generate_tctable() const
Definition: cpp_parse_function_generator.cc:352
google::protobuf::compiler::cpp::MakeDefaultName
std::string MakeDefaultName(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:439
google::protobuf::compiler::cpp::SetUnknownFieldsVariable
void SetUnknownFieldsVariable(const Descriptor *descriptor, const Options &options, std::map< std::string, std::string > *variables)
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:232
google::protobuf::FieldDescriptor::TYPE_INT64
@ TYPE_INT64
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:524
google::protobuf.internal::WireFormatLite::WIRETYPE_FIXED64
@ WIRETYPE_FIXED64
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.h:103
google::protobuf::compiler::cpp::GetOptimizeFor
FileOptions_OptimizeMode GetOptimizeFor(const FileDescriptor *file, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:473
google::protobuf::StrCat
string StrCat(const AlphaNum &a, const AlphaNum &b)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc:1482
google::protobuf::compiler::cpp::TypeFormat::kBytes
@ kBytes
Descriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:121
google::protobuf::compiler::cpp::DeclaredTypeMethodName
const char * DeclaredTypeMethodName(FieldDescriptor::Type type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:551
FieldOptions::CORD
static constexpr CType CORD
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:4723
google::protobuf.internal::WireFormatLite::MakeTag
constexpr static uint32 MakeTag(int field_number, WireType type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.h:783
google::protobuf::compiler::cpp::TypeFormat::kStringValidateOnly
@ kStringValidateOnly
google::protobuf::compiler::cpp::IsWeak
bool IsWeak(const FieldDescriptor *field, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:300
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
google::protobuf::Descriptor::options
const MessageOptions & options() const
google::protobuf::compiler::cpp::TypeFormat
TypeFormat
Definition: cpp_parse_function_generator.h:167
FieldDescriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:133
google::protobuf::FieldDescriptor::TYPE_ENUM
@ TYPE_ENUM
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:540
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateMethodImpls
void GenerateMethodImpls(io::Printer *printer)
Definition: cpp_parse_function_generator.cc:313
google::protobuf::compiler::cpp::ParseFunctionGenerator::options_
const Options & options_
Definition: cpp_parse_function_generator.h:151
google::protobuf::compiler::cpp::TailCallTableInfo::fast_path_fields
std::vector< FieldInfo > fast_path_fields
Definition: cpp_parse_function_generator.h:62
google::protobuf::compiler::cpp::ParseFunctionGenerator::num_hasbits_
int num_hasbits_
Definition: cpp_parse_function_generator.h:155
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateTailcallFallbackFunction
void GenerateTailcallFallbackFunction(Formatter &format)
Definition: cpp_parse_function_generator.cc:374
google::protobuf::compiler::cpp::ShouldRepeat
static bool ShouldRepeat(const FieldDescriptor *descriptor, WireFormatLite::WireType wiretype)
Definition: cpp_parse_function_generator.cc:831
google::protobuf::compiler::cpp::ParseFunctionGenerator::descriptor_
const Descriptor * descriptor_
Definition: cpp_parse_function_generator.h:149
tag
static void * tag(intptr_t t)
Definition: bad_client.cc:318
google::protobuf.internal::WireFormatLite::WIRETYPE_FIXED32
@ WIRETYPE_FIXED32
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.h:107
google::protobuf::compiler::cpp::TailCallTableInfo::use_generated_fallback
bool use_generated_fallback
Definition: cpp_parse_function_generator.h:70
google::protobuf::Descriptor::extension_range
const ExtensionRange * extension_range(int index) const
google::protobuf::FieldDescriptor::TYPE_FIXED32
@ TYPE_FIXED32
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:532
google::protobuf::compiler::cpp::IsLazy
bool IsLazy(const FieldDescriptor *field, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:330
google::protobuf::compiler::cpp::ParseFunctionGenerator::ParseFunctionGenerator
ParseFunctionGenerator(const Descriptor *descriptor, int max_has_bit_index, const std::vector< int > &has_bit_indices, const std::vector< int > &inlined_string_indices, const Options &options, MessageSCCAnalyzer *scc_analyzer, const std::map< std::string, std::string > &vars)
Definition: cpp_parse_function_generator.cc:244
google::protobuf::compiler::cpp::IsImplicitWeakField
bool IsImplicitWeakField(const FieldDescriptor *field, const Options &options, MessageSCCAnalyzer *scc_analyzer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:1130
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateMethodDecls
void GenerateMethodDecls(io::Printer *printer)
Definition: cpp_parse_function_generator.cc:265
google::protobuf::compiler::cpp::IsMapEntryMessage
bool IsMapEntryMessage(const Descriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:398
google::protobuf::compiler::cpp::Options::tctable_mode
enum google::protobuf::compiler::cpp::Options::@466 tctable_mode
google::protobuf::io::CodedOutputStream::VarintSize32
static size_t VarintSize32(uint32 value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/coded_stream.h:1654
GOOGLE_DCHECK_GE
#define GOOGLE_DCHECK_GE
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:201
google::protobuf::compiler::cpp::TypeFormat::kSInt32
@ kSInt32
google::protobuf::compiler::cpp::FieldMessageTypeName
std::string FieldMessageTypeName(const FieldDescriptor *field, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:473
std::swap
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
Definition: third_party/bloaty/third_party/protobuf/conformance/third_party/jsoncpp/json.h:1226
FileOptions::LITE_RUNTIME
static constexpr OptimizeMode LITE_RUNTIME
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:3831
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateTailcallParseFunction
void GenerateTailcallParseFunction(Formatter &format)
Definition: cpp_parse_function_generator.cc:359
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateStrings
void GenerateStrings(Formatter &format, const FieldDescriptor *field, bool check_utf8)
Definition: cpp_parse_function_generator.cc:659
google::protobuf::compiler::cpp::TypeFormat::kBool
@ kBool
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateParseIterationBody
void GenerateParseIterationBody(Formatter &format, const Descriptor *descriptor, const std::vector< const FieldDescriptor * > &ordered_fields)
Definition: cpp_parse_function_generator.cc:984
FieldOptions::STRING_PIECE
static constexpr CType STRING_PIECE
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:4725
google::protobuf.internal::WireFormatLite::WIRETYPE_VARINT
@ WIRETYPE_VARINT
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.h:102
google::protobuf::Descriptor::extension_range_count
int extension_range_count() const
cpp
Definition: third_party/bloaty/third_party/googletest/googlemock/scripts/generator/cpp/__init__.py:1
google::protobuf::compiler::cpp::SetCommonVars
void SetCommonVars(const Options &options, std::map< std::string, std::string > *variables)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:210
google::protobuf::Descriptor::field_count
int field_count() const
google::protobuf::compiler::cpp::Options
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h:52
b
uint64_t b
Definition: abseil-cpp/absl/container/internal/layout_test.cc:53
google::protobuf::compiler::cpp::QualifiedDefaultInstanceName
std::string QualifiedDefaultInstanceName(const Descriptor *descriptor, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:382
google::protobuf.internal::WireFormat::MakeTag
static uint32 MakeTag(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format.h:327
layout
MessageLayout * layout
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:809
cpp_parse_function_generator.h
google::protobuf::compiler::cpp::TailCallTableInfo::fallback_fields
std::vector< const FieldDescriptor * > fallback_fields
Definition: cpp_parse_function_generator.h:64
google::protobuf::compiler::cpp::HasDescriptorMethods
bool HasDescriptorMethods(const FileDescriptor *file, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:368
google::protobuf::compiler::cpp::Utf8CheckMode::kNone
@ kNone
google::protobuf::FieldDescriptor::enum_type
const EnumDescriptor * enum_type
Definition: protobuf/src/google/protobuf/descriptor.h:937
setup.idx
idx
Definition: third_party/bloaty/third_party/capstone/bindings/python/setup.py:197
FieldOptions::STRING
static constexpr CType STRING
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:4721
google::protobuf::io::Printer
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/printer.h:181
google::protobuf::compiler::cpp::TailCallTableInfo
Definition: cpp_parse_function_generator.h:51
google::protobuf::compiler::cpp::FieldRange
FieldRangeImpl< T > FieldRange(const T *desc)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:791
google::protobuf::compiler::cpp::TailCallTableInfo::TailCallTableInfo
TailCallTableInfo(const Descriptor *descriptor, const Options &options, const std::vector< int > &has_bit_indices, MessageSCCAnalyzer *scc_analyzer)
Definition: cpp_parse_function_generator.cc:115
google::protobuf.internal::WireFormat::WireTypeForField
static WireFormatLite::WireType WireTypeForField(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format.h:310
google::protobuf::compiler::cpp::Options::opensource_runtime
bool opensource_runtime
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h:63
google::protobuf::compiler::cpp::PrintFieldComment
void PrintFieldComment(const Formatter &format, const T *field)
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:812
google::protobuf::FieldDescriptor::TYPE_SINT32
@ TYPE_SINT32
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:543
FATAL
#define FATAL(msg)
Definition: task.h:88
google::protobuf.internal::WireFormatLite::GetTagWireType
static WireType GetTagWireType(uint32 tag)
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.h:788
google::protobuf::Descriptor::ExtensionRange::end
int end
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:357
google::protobuf::compiler::cpp::TypeFormat::kSInt64
@ kSInt64
google::protobuf::compiler::cpp::GetTailCallFieldHandlerName
std::string GetTailCallFieldHandlerName(ParseCardinality card, TypeFormat type_format, int tag_length_bytes, const Options &options)
Definition: cpp_parse_function_generator.cc:1185
field
const FieldDescriptor * field
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc:2692
google::protobuf::FieldDescriptor::kMaxNumber
static const int kMaxNumber
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:581
google::protobuf.internal::WireFormatLite::WIRETYPE_START_GROUP
@ WIRETYPE_START_GROUP
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.h:105
google::protobuf::compiler::cpp::ParseCardinality::kPacked
@ kPacked
google::protobuf::FieldDescriptor::type
Type type() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2052
google::protobuf::FieldDescriptor::TYPE_SINT64
@ TYPE_SINT64
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:544
google::protobuf::FieldDescriptor::TYPE_FLOAT
@ TYPE_FLOAT
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:523
options_
DebugStringOptions options_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:2390
FieldOptions_CType
FieldOptions_CType
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:259
google::protobuf::FieldDescriptor::TYPE_SFIXED32
@ TYPE_SFIXED32
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:541
google::protobuf::compiler::cpp::MessageSCCAnalyzer
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:519
google::protobuf::compiler::cpp::DefaultInstanceName
std::string DefaultInstanceName(const Descriptor *descriptor, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:372
google::protobuf::compiler::cpp::IsFieldStripped
bool IsFieldStripped(const FieldDescriptor *, const Options &)
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:371
google::protobuf.internal::WireFormat::WireTypeForFieldType
static WireFormatLite::WireType WireTypeForFieldType(FieldDescriptor::Type type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format.h:319
google::protobuf::compiler::cpp::TypeFormat::kVar32
@ kVar32
google::protobuf::compiler::cpp::TypeFormat::kString
@ kString
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateTailcallFieldParseFunctions
void GenerateTailcallFieldParseFunctions(Formatter &format)
Definition: cpp_parse_function_generator.cc:404
google::protobuf::compiler::cpp::ExpectedTag
static uint32_t ExpectedTag(const FieldDescriptor *field, uint32_t *fallback_tag_ptr)
Definition: cpp_parse_function_generator.cc:947
field_type
zend_class_entry * field_type
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/message.c:2030
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateLoopingParseFunction
void GenerateLoopingParseFunction(Formatter &format)
Definition: cpp_parse_function_generator.cc:496
google::protobuf::Descriptor::file
const FileDescriptor * file() const
google::protobuf::compiler::cpp::ClassName
std::string ClassName(const Descriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:302
GOOGLE_CHECK
#define GOOGLE_CHECK(EXPRESSION)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:153
google::protobuf::Descriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:231
google::protobuf::FieldDescriptor::TYPE_MESSAGE
@ TYPE_MESSAGE
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:536
google::protobuf::FieldDescriptor::TYPE_UINT32
@ TYPE_UINT32
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:539
google::protobuf::compiler::cpp::TypeFormat::kFixed32
@ kFixed32
google::protobuf::compiler::cpp::PrimitiveTypeName
const char * PrimitiveTypeName(FieldDescriptor::CppType type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:488
google::protobuf.internal::WireFormatLite::WireType
WireType
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.h:101
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateDataDefinitions
void GenerateDataDefinitions(io::Printer *printer)
Definition: cpp_parse_function_generator.cc:482
google::protobuf::FieldDescriptor::TYPE_FIXED64
@ TYPE_FIXED64
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:531
google::protobuf::compiler::cpp::GetUtf8CheckMode
static Utf8CheckMode GetUtf8CheckMode(const FieldDescriptor *field, const Options &options)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc:1003
google::protobuf::compiler::cpp::TailCallTableInfo::table_size_log2
int table_size_log2
Definition: cpp_parse_function_generator.h:66
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateDataDecls
void GenerateDataDecls(io::Printer *printer)
Definition: cpp_parse_function_generator.cc:461
google::protobuf.internal::WireFormatLite::WIRETYPE_END_GROUP
@ WIRETYPE_END_GROUP
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.h:106
GOOGLE_CHECK_NE
#define GOOGLE_CHECK_NE(A, B)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:157
google::protobuf::compiler::cpp::ParseFunctionGenerator::should_generate_guarded_tctable
bool should_generate_guarded_tctable() const
Definition: cpp_parse_function_generator.h:102
client.level
level
Definition: examples/python/async_streaming/client.py:118
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
google::protobuf::FieldDescriptor::TYPE_INT32
@ TYPE_INT32
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:528
google::protobuf::compiler::cpp::Utf8CheckMode::kStrict
@ kStrict
google::protobuf::compiler::cpp::TypeFormat::kFixed64
@ kFixed64
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
google::protobuf::compiler::cpp::ParseFunctionGenerator::tc_table_info_
std::unique_ptr< TailCallTableInfo > tc_table_info_
Definition: cpp_parse_function_generator.h:153
google::protobuf.internal::WireFormatLite
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.h:84
google::protobuf::compiler::cpp::ParseFunctionGenerator::variables_
std::map< std::string, std::string > variables_
Definition: cpp_parse_function_generator.h:152
google::protobuf::Descriptor::ExtensionRange::start
int start
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:356
GOOGLE_LOG
#define GOOGLE_LOG(LEVEL)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:146
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateLengthDelim
void GenerateLengthDelim(Formatter &format, const FieldDescriptor *field)
Definition: cpp_parse_function_generator.cc:725
phone_pb2.enum_type
enum_type
Definition: phone_pb2.py:198
descriptor
static const char descriptor[1336]
Definition: certs.upbdefs.c:16
google::protobuf::FieldDescriptor::TYPE_STRING
@ TYPE_STRING
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:534
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateTailCallTable
void GenerateTailCallTable(Formatter &format)
Definition: cpp_parse_function_generator.cc:540
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateFastFieldEntries
void GenerateFastFieldEntries(Formatter &format, const std::string &fallback)
Definition: cpp_parse_function_generator.cc:602
compiler
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc:21
google
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:11
google::protobuf::compiler::cpp::Formatter
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:637
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
google::protobuf::FieldDescriptor::TYPE_UINT64
@ TYPE_UINT64
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:527
MessageOptions::message_set_wire_format
bool message_set_wire_format() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:12061
google::protobuf::StrAppend
void StrAppend(string *result, const AlphaNum &a)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc:1583
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateFieldSwitch
void GenerateFieldSwitch(Formatter &format, const std::vector< const FieldDescriptor * > &ordered_fields)
Definition: cpp_parse_function_generator.cc:1047


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:59