Skip to content

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented May 15, 2025

hpb: Introduce canonical hpb::Arena

During our migration, we merely aliased hpb::Arena to upb::Arena (upb's C++ RAII wrapper for upb_Arena).

The alias has served us well, but it's now time to transition to a class that'll support our multibackend goals. Henceforth, hpb::Arena shall contain an arena based on the SELECTED backend (upb, cpp).

If the underlying upb arena needs to be accessed, arena.ptr() will no longer work; one must go through hpb::interop::upb::UnwrapArena.

If the backend is upb, the arena also has support for .Fuse and .IsFused.

@copybara-service copybara-service bot force-pushed the test_757918262 branch 6 times, most recently from 07a7097 to 1bb7c41 Compare June 17, 2025 21:27
During our migration, we merely aliased `hpb::Arena` to `upb::Arena` (upb's C++ RAII wrapper for `upb_Arena`).

The alias has served us well, but it's now time to transition to a class that'll support our multibackend goals. Henceforth, `hpb::Arena` shall contain an arena based on the SELECTED backend (upb, cpp).

If the underlying upb arena needs to be accessed, `arena.ptr()` will no longer work; one must go through `hpb::interop::upb::UnwrapArena`.

If the backend is upb, the arena also has support for `.Fuse` and `.IsFused`.

PiperOrigin-RevId: 774808755
@copybara-service copybara-service bot merged commit dd96fcd into main Jun 23, 2025
@copybara-service copybara-service bot deleted the test_757918262 branch June 23, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant