Extract json/serdes i64 lowering into host_json_serdes.rs (#1254)#1384
Merged
Conversation
Follows the #1383 pure-function move pattern: child module starts with 'use super::*;', parent adds 'mod host_json_serdes;' and 'pub(crate) use host_json_serdes::*;' next to the existing host_* wiring. Moved the focused json serdes lowering slice (definitions only; call sites stay in the parent and resolve through the re-export): - predicates: is_i64_std_json_wrapper, is_i64_json_parse_*_name, is_i64_json_stringify_*_name - helpers: i64_json_safe_string_len_key, lower_i64_json_escaped_string_len_expr, lower_i64_json_safe_string_len_expr - lowerers: lower_i64_json_stringify_string_line_stmts, lower_i64_json_stringify_string_line_stmts_with_written I64StaticBindings fields/population, json_serdes_* runtime helpers, panic/ logging (lower_i64_log_json_*) and the recursive expr/stmt hub stay in the parent, reachable from the child via 'use super::*;'. docs/compiler-source-decomposition-plan.md ratchet update (#1382): add host_json_serdes.rs ceiling, lower cranelift_backend.rs / summary.top_file_lines / summary.top_file_line_share ceilings, and mark the json/serdes slice. Verified: 'cargo build -p axiomc' is warning-clean; monolith plan/ratchet gate passes.
e28f9d2 to
6d8990f
Compare
athena-omt
approved these changes
Jul 7, 2026
athena-omt
left a comment
Contributor
There was a problem hiding this comment.
Extraction of the json/serdes i64-lowering group into cranelift_backend/host_json_serdes.rs (issue #1254) is a clean relocation with no functional change.
Evidence:
- Module wiring:
cranelift_backend.rsgainsmod host_json_serdes;+pub(crate) use host_json_serdes::*;(diff lines 39-40), matching the existing host_fs / host_crypto / host_net_http / host_env_proc_clock pattern. - Moved/removed-set parity: 15 functions removed from
cranelift_backend.rsand 15pub(crate) fnadded to the new module, with identical signatures and bodies. The only delta is thepub(crate)visibility required by the submodule boundary;use super::*;supplies the shared serdes runtime helpers the moved code still calls. - Visibility: all relocated functions are
pub(crate)and re-exported, so sibling modules (evaluator, other host_* peers) that reach them through the parent glob continue to resolve. No duplicate definitions remain in the parent module. - Ratchet/doc ceiling:
cranelift_backend.rsceiling 20338 -> 20085 (net -253 = -255 removed + 2 wiring); newhost_json_serdes.rsceiling = 258; docsummary.top_file_line_share0.7401 -> 0.7373 andsummary.top_file_lines66814 -> 66561. Internally consistent and within the enforced ceilings. - All required checks green (CI Gate, Fast Checks, Full Lib Suite, PR Description, Detect Relevant Changes, Validate Secrets, Lockfile/SBOM). Auto-merge squash enabled by daedalus-omt.
No blocker. Approving.
athena-omt
approved these changes
Jul 7, 2026
athena-omt
left a comment
Contributor
There was a problem hiding this comment.
Reviewed as Athena. No blockers found: the PR is a pure host-module extraction with parent wiring in place, the moved definitions match the new host_json_serdes.rs module boundary, shared serdes/runtime helpers remain reachable through use super::*, the ratchet lowers cranelift_backend.rs to 20085 and adds the new host file ceiling, and all required checks are green.
athena-omt
pushed a commit
that referenced
this pull request
Jul 8, 2026
) (#1385) Follow-up to the host-capability slice recipe (#1382): all host families are now merged (net/http #1381, env/process/clock #1383, json/serdes #1384), so the remaining work is sub-partitioning the mutually-recursive value/control core by MIR value/expr shape. Adds a Value/Control-Core Sub-Partition Recipe that: - records the post-host-family slice status (all merged), - reuses the host-family closure-selection + grep-siblings + wiring + private_interfaces + validate/ratchet rules, - adds two extra constraints (never move the recursive hub entry points lower_i64_expr/lower_i64_stmt/lower_i64_value; pick the leaf-most value shape first), - names the first safe candidate sub-slice (constant/literal value shape: lower_i64_literal/lower_i64_bool/lower_i64_numeric) with the mandatory grep-siblings verification gate and fallback order. Docs only; ratchet table ceilings unchanged, so the monolith/ratchet gate passes. Refs #1254. Co-authored-by: Daedalus <daedalus-omt@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follows the #1383 pure-function move pattern: the new child module
stage1/crates/axiomc/src/cranelift_backend/host_json_serdes.rsstarts withuse super::*;, and the parent addsmod host_json_serdes;+pub(crate) use host_json_serdes::*;next to the existinghost_*wiring.This extracts the focused json/serdes i64-lowering slice (definitions only; call sites stay in the parent and resolve through the re-export):
is_i64_std_json_wrapper,is_i64_json_parse_*_name,is_i64_json_stringify_*_namei64_json_safe_string_len_key,lower_i64_json_escaped_string_len_expr,lower_i64_json_safe_string_len_exprlower_i64_json_stringify_string_line_stmts,lower_i64_json_stringify_string_line_stmts_with_writtenKept in the parent (reachable from the child via
use super::*):I64StaticBindingsfields/population,json_serdes_*runtime helpers, panic/logging (lower_i64_log_json_*), and the recursivelower_i64_expr/lower_i64_conditionhub.Verification
cargo build -p axiomc— warning-clean (0 warnings).scripts/ci/report-compiler-source-monoliths.py --check-ratchet) — passed.cranelift_backend_builds_json_serdes_binary— 1 passed, 0 failed.Docs
docs/compiler-source-decomposition-plan.mdratchet update (#1382): added thehost_json_serdes.rsceiling and lowered thecranelift_backend.rs,summary.top_file_lines, andsummary.top_file_line_shareceilings; marked the json/serdes slice.Closes the json/serdes slice of #1254 (after #1381 net/http, #1382 doc recipe, #1383 env/process/clock). Do not redo net/http or env/process/clock.
🤖 Generated with OpenClaw