Skip to content

Eliminate Arena::{Copy,Default}Construct<T> per-type instantiations in protoc. - #30766

Draft
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1000887905
Draft

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1000887905

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Eliminate Arena::{Copy,Default}Construct per-type instantiations in protoc.

Every generated message type currently gets two out-of-line functions that
exist only to give copy and default construction a uniform signature:
Arena::CopyConstruct<T> and Arena::DefaultConstruct<T> (explicitly
instantiated in the .pb.cc, extern template in the .pb.h). They are
trampolines: allocate sizeof(T) and call the constructor.

@copybara-service copybara-service Bot changed the title Internal change Eliminate Arena::{Copy,Default}Construct<T> per-type instantiations in protoc. Oct 16, 2026
@copybara-service
copybara-service Bot force-pushed the test_1000887905 branch 3 times, most recently from fcc7d14 to 4e7e360 Compare October 22, 2026 01:02
…n protoc.

Every generated message type currently gets two out-of-line functions that
exist only to give copy and default construction a uniform signature:
`Arena::CopyConstruct<T>` and `Arena::DefaultConstruct<T>` (explicitly
instantiated in the .pb.cc, `extern template` in the .pb.h). They are
trampolines: allocate `sizeof(T)` and call the constructor.
PiperOrigin-RevId: 1000887905

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant