feat(joinir): Phase 213-2 Step 2-2 & 2-3 Data structure extensions
Extended PatternPipelineContext and CarrierUpdateInfo for Pattern 3 AST-based generalization. Changes: 1. PatternPipelineContext: - Added loop_condition: Option<ASTNode> - Added loop_body: Option<Vec<ASTNode>> - Added loop_update_summary: Option<LoopUpdateSummary> - Updated build_pattern_context() for Pattern 3 2. CarrierUpdateInfo: - Added then_expr: Option<ASTNode> - Added else_expr: Option<ASTNode> - Updated analyze_loop_updates() with None defaults Status: Phase 213-2 Steps 2-2 & 2-3 complete Next: Create Pattern3IfAnalyzer to extract if statement and populate update summary
This commit is contained in:
@ -54,35 +54,16 @@ impl MirBuilder {
|
||||
trace::trace().routing("router", &func_name, "Structure-only mode enabled, skipping whitelist");
|
||||
} else {
|
||||
// Phase 49-4 + Phase 80: Multi-target routing (legacy whitelist)
|
||||
// - Core ON なら代表2本(print_tokens / ArrayExt.filter)は JoinIR を優先し、失敗したら LoopBuilder へフォールバック
|
||||
// - Core OFF では従来通り dev フラグで opt-in
|
||||
// - JoinIR は常時 ON。legacy LoopBuilder は削除済み。
|
||||
// - 代表2本(print_tokens / ArrayExt.filter)も常に JoinIR で試行する。
|
||||
// Note: Arity does NOT include implicit `me` receiver
|
||||
// Phase 188: Add "main" routing for loop pattern expansion
|
||||
// Phase 170: Add JsonParserBox methods for selfhost validation
|
||||
let core_on = crate::config::env::joinir_core_enabled();
|
||||
let is_target = match func_name.as_str() {
|
||||
"main" => true, // Phase 188-Impl-1: Enable JoinIR for main function (Pattern 1)
|
||||
"JoinIrMin.main/0" => true, // Phase 188-Impl-2: Enable JoinIR for JoinIrMin.main/0 (Pattern 2)
|
||||
"JsonTokenizer.print_tokens/0" => {
|
||||
if core_on {
|
||||
true
|
||||
} else {
|
||||
std::env::var("HAKO_JOINIR_PRINT_TOKENS_MAIN")
|
||||
.ok()
|
||||
.as_deref()
|
||||
== Some("1")
|
||||
}
|
||||
}
|
||||
"ArrayExtBox.filter/2" => {
|
||||
if core_on {
|
||||
true
|
||||
} else {
|
||||
std::env::var("HAKO_JOINIR_ARRAY_FILTER_MAIN")
|
||||
.ok()
|
||||
.as_deref()
|
||||
== Some("1")
|
||||
}
|
||||
}
|
||||
"JsonTokenizer.print_tokens/0" => true,
|
||||
"ArrayExtBox.filter/2" => true,
|
||||
// Phase 170-A-1: Enable JsonParserBox methods for JoinIR routing
|
||||
"JsonParserBox._trim/1" => true,
|
||||
"JsonParserBox._skip_whitespace/2" => true,
|
||||
|
||||
Reference in New Issue
Block a user