feat(control_tree): Phase 129-C post-if via post_k continuation

This commit is contained in:
nyash-codex
2025-12-18 08:33:56 +09:00
parent b2af9fb297
commit 80df1cccd4
9 changed files with 502 additions and 20 deletions

View File

@ -11,6 +11,7 @@ use crate::mir::control_tree::normalized_shadow::env_layout::{
expected_env_field_count as calc_expected_env_fields, EnvLayout,
};
use crate::mir::control_tree::normalized_shadow::if_as_last_join_k::IfAsLastJoinKLowererBox;
use crate::mir::control_tree::normalized_shadow::post_if_post_k::PostIfPostKBuilderBox; // Phase 129-C
use crate::mir::control_tree::normalized_shadow::legacy::LegacyLowerer;
use crate::mir::control_tree::step_tree::StepTree;
use crate::mir::join_ir::lowering::carrier_info::JoinFragmentMeta;
@ -63,6 +64,11 @@ impl StepTreeNormalizedShadowLowererBox {
// Phase 126: EnvLayout 生成available_inputs を使用)
let env_layout = EnvLayout::from_contract(&step_tree.contract, available_inputs);
// Phase 129-C: Post-if with post_k continuation (dev-only)
if let Some((module, meta)) = PostIfPostKBuilderBox::lower(step_tree, &env_layout)? {
return Ok(Some((module, meta)));
}
// Phase 129-B: If-as-last join_k lowering (dev-only)
if let Some((module, meta)) = IfAsLastJoinKLowererBox::lower(step_tree, &env_layout)? {
return Ok(Some((module, meta)));