Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up the implementation of InternalSwap in MapField: #19751

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Dec 19, 2024

Clean up the implementation of InternalSwap in MapField:

  • Rename UnsafeShallowSwap. The operation is called InternalSwap in all other types.
  • Remove the dynamic dispatch. It is no longer needed.
  • Make InternalSwap do the whole swap, including the map and the reflection payload.
  • Rename MapFieldBase::SwapImpl to SwapPayload to make it clearer on what it does and to prevent using it directly in the vtable.

 - Rename `UnsafeShallowSwap`. The operation is called `InternalSwap` in all other types.
 - Remove the dynamic dispatch. It is no longer needed.
 - Make `InternalSwap` do the whole swap, including the map and the reflection payload.
 - Rename `MapFieldBase::SwapImpl` to `SwapPayload` to make it clearer on what it does and to prevent using it directly in the vtable.

PiperOrigin-RevId: 708031253
@copybara-service copybara-service bot changed the title Clean up the implementation of InternalSwap in MapField: Clean up the implementation of InternalSwap in MapField: Dec 23, 2024
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