Small optimization: move TcParser::Error() out of line

PiperOrigin-RevId: 518943474
pull/12331/head
Martijn Vels 2 years ago committed by Copybara-Service
parent ef53613b42
commit dbbe317b4f
  1. 8
      src/google/protobuf/generated_message_tctable_impl.h
  2. 7
      src/google/protobuf/generated_message_tctable_lite.cc

@ -907,14 +907,6 @@ inline PROTOBUF_ALWAYS_INLINE const char* TcParser::ToParseLoop(
return ptr;
}
inline PROTOBUF_ALWAYS_INLINE const char* TcParser::Error(
PROTOBUF_TC_PARAM_NO_DATA_DECL) {
(void)ctx;
(void)ptr;
SyncHasbits(msg, hasbits, table);
return nullptr;
}
} // namespace internal
} // namespace protobuf
} // namespace google

@ -269,6 +269,13 @@ absl::string_view TcParser::FieldName(const TcParseTableBase* table,
field_index + 1);
}
PROTOBUF_NOINLINE const char* TcParser::Error(PROTOBUF_TC_PARAM_NO_DATA_DECL) {
(void)ctx;
(void)ptr;
SyncHasbits(msg, hasbits, table);
return nullptr;
}
template <bool export_called_function>
inline PROTOBUF_ALWAYS_INLINE const char* TcParser::MiniParse(
PROTOBUF_TC_PARAM_DECL) {

Loading…
Cancel
Save