Skip to content

Unwrap compat and parsed legacy list/map wrappers in FromLegacyList and FromLegacyMap, and avoid per-call scratch arenas in legacy map Has. - #2363

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_996898134
Oct 13, 2026
Merged

copybara-service[bot] merged 1 commit into
masterfrom
test_996898134

Conversation

@copybara-service

Copy link
Copy Markdown

Unwrap compat and parsed legacy list/map wrappers in FromLegacyList and FromLegacyMap, and avoid per-call scratch arenas in legacy map Has.

  1. Add FromLegacyList and FromLegacyMap (used by ModernValue and FromLegacyValue) to unwrap LegacyParsedRepeatedFieldListValue, LegacyParsedJsonListValue, CompatListValue, and MutableCompatListValue (and their map counterparts LegacyParsedMapFieldMapValue, LegacyParsedJsonMapValue, CompatMapValue, and MutableCompatMapValue) back into CustomListValue / CustomMapValue using their owning arena instead of re-wrapping them in LegacyListValue / LegacyMapValue.
  2. In LegacyParsedMapFieldMapValue::Has(const CelValue&) and LegacyParsedJsonMapValue::Has(const CelValue&), use arena_ instead of constructing a per-call proto2::Arena scratch_arena.

… and `FromLegacyMap`, and avoid per-call scratch arenas in legacy map `Has`.

1. Add `FromLegacyList` and `FromLegacyMap` (used by `ModernValue` and `FromLegacyValue`) to unwrap `LegacyParsedRepeatedFieldListValue`, `LegacyParsedJsonListValue`, `CompatListValue`, and `MutableCompatListValue` (and their map counterparts `LegacyParsedMapFieldMapValue`, `LegacyParsedJsonMapValue`, `CompatMapValue`, and `MutableCompatMapValue`) back into `CustomListValue` / `CustomMapValue` using their owning arena instead of re-wrapping them in `LegacyListValue` / `LegacyMapValue`.
2. In `LegacyParsedMapFieldMapValue::Has(const CelValue&)` and `LegacyParsedJsonMapValue::Has(const CelValue&)`, use `arena_` instead of constructing a per-call `proto2::Arena scratch_arena`.

PiperOrigin-RevId: 998661512
@copybara-service
copybara-service Bot merged commit 21a5734 into master Oct 13, 2026
4 of 5 checks passed
@copybara-service
copybara-service Bot deleted the test_996898134 branch October 13, 2026 15:43
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.

0 participants