Repository navigation
fix(unity-build): re-sort fl/stl/_build.cpp.hpp includes alphabetically - #3243
Conversation
…ks (#3235 Tier 2E Phase 1) Removes `SizeVisitor` and `IsArrayVisitor` -- two `data.visit(visitor)` patterns that each forced the variant to emit per-(T × Visitor) `visit_fn` thunks for all 10 `json_value::variant_t` alternatives (`nullptr_t`, `bool`, `i64`, `float`, `fl::string`, `json_array`, `json_object`, `vector<i16>`, `vector<u8>`, `vector<float>`). `json::is_array()` now inlines as 4 `data.is<T>()` tag checks; `json:: size()` inlines as 5 `data.ptr<T>()` tag-and-extract checks. Behavior preserved; the visitor structs themselves and their per-T thunk instantiations are gone. This is Phase 1 of the Tier 2E plan (validates the tag-table-lookup approach for visitors with simple result extraction). Phase 2 -- the `json_convert_to_<int/bool/float/string>_core` non-template helpers that collapse the heavier conversion visitors -- remains as a follow- on once the codebase has a sketch big enough to exercise the conversion path leverage. ## Verification (LPC845 / AutoResearch) flash 47,544 B -> 47,128 B (-416 B saved) RAM 9,984 B -> 9,984 B (unchanged) Predicted ~250 B; actual -416 B. The extra savings come from downstream DCE -- with no `visit_fn<T, SizeVisitor>` / `visit_fn<T, IsArrayVisitor>` references, the variant doesn't anchor the corresponding alternative-T copies into the thunk tables for those visitor types. Refs #3235 Tier 2E (Phase 1)
PR #3240 (Tier 1C) added `unordered_map_basic.cpp.hpp` between `fstream` and `ieee754_string`, which the UnityBuildChecker flagged as out of alphabetical order ('u' > 'i'). Move it to its correct slot after `type_traits.cpp.hpp`. No behavior change.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesJSON visitor removal and build order fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Follow-up to PR #3240 (#3235 Tier 1C). UnityBuildChecker flagged
unordered_map_basic.cpp.hppas out of alphabetical order. Moved to correct slot aftertype_traits.cpp.hpp. No behavior change.Refs #3235
Summary by CodeRabbit
Note: This release contains no user-visible changes or new features.