Files
hakorune/nyash.toml

730 lines
35 KiB
TOML
Raw Normal View History

[env]
# Put environment defaults used by tools or examples if needed
# Enable using resolver by default (can be disabled with NYASH_SKIP_TOML_ENV=1)
NYASH_ENABLE_USING = "1"
# Enable dev sugar preexpand for @ local alias (line-head) during parsing
NYASH_DEV_AT_LOCAL = "1"
# AOT prep/fast-path defaults (dev/quick friendly; override with NYASH_SKIP_TOML_ENV=1)
# Collections hot path rewrite (Array/Map boxcall→externcall)
NYASH_AOT_COLLECTIONS_HOT = "1"
# Integer fast paths and simple loop hoist (safe CFG-invariant opts)
NYASH_LLVM_FAST = "1"
NYASH_MIR_LOOP_HOIST = "1"
# Map key mode heuristic (h/hh chosen automatically by linearity)
NYASH_AOT_MAP_KEY_MODE = "auto"
[using]
paths = ["apps", "lib", ".", "lang/src"]
# Workspace module mapping (lang/ tree)
[modules.workspace]
members = [
"lang/src/compiler/hako_module.toml",
"lang/src/mir/hako_module.toml",
"lang/src/shared/hako_module.toml",
"lang/src/vm/hako_module.toml",
"lang/src/runtime/meta/hako_module.toml",
"lang/src/runner/hako_module.toml",
"lang/src/llvm_ir/hako_module.toml",
"lang/src/opt/hako_module.toml",
"lang/src/selfhost/hako_module.toml"
]
# Optional package-style entries (opt-in via using resolver)
[using.json_native]
path = "apps/lib/json_native/"
main = "parser/parser.hako"
# JSON Native String utilities as a standalone package (single-file)
[using.string_utils]
path = "apps/lib/json_native/utils/string.hako"
[using.aliases]
# Resolve `using json as ...` to json_native when desired
json = "json_native"
StringUtils = "string_utils"
StringHelpers = "sh_core"
JsonNode = "json_node"
[using.json_node]
path = "apps/lib/json_native/core/node.hako"
# JSON stringify (Stage-B compiler dependency)
[using.stringify]
path = "lang/src/shared/json/stringify.hako"
# String helpers (Parser dependency)
[using.sh_core]
path = "lang/src/shared/common/string_helpers.hako"
[modules]
# Core shared helpers (needed by parser/compiler in Stage-B)
"sh_core" = "lang/src/shared/common/string_helpers.hako"
# Map logical namespaces to Nyash source paths (consumed by runner)
# NOTE (Phase20.33): legacy `apps/selfhost/*` modules have been retired.
# If you still rely on `selfhost.*` keys, migrate to the `lang.*`/`hakorune.*`
# equivalents below. This removal is intentional to surface stale references.
# Lang compiler (Phase 20.33 migration)
"lang.compiler.parser.box" = "lang/src/compiler/parser/parser_box.hako"
"lang.compiler.parser.scan.parser_string_utils_box" = "lang/src/compiler/parser/scan/parser_string_utils_box.hako"
"lang.compiler.parser.scan.parser_ident_scan_box" = "lang/src/compiler/parser/scan/parser_ident_scan_box.hako"
"lang.compiler.parser.scan.parser_number_scan_box" = "lang/src/compiler/parser/scan/parser_number_scan_box.hako"
"lang.compiler.parser.scan.parser_string_scan_box" = "lang/src/compiler/parser/scan/parser_string_scan_box.hako"
"lang.compiler.parser.scan.parser_common_utils_box" = "lang/src/compiler/parser/scan/parser_common_utils_box.hako"
"lang.compiler.parser.using.using_collector_box" = "lang/src/compiler/parser/using/using_collector_box.hako"
"lang.compiler.parser.expr.parser_expr_box" = "lang/src/compiler/parser/expr/parser_expr_box.hako"
"lang.compiler.parser.expr.parser_peek_box" = "lang/src/compiler/parser/expr/parser_peek_box.hako"
"lang.compiler.parser.expr.parser_literal_box" = "lang/src/compiler/parser/expr/parser_literal_box.hako"
"lang.compiler.parser.stmt.parser_stmt_box" = "lang/src/compiler/parser/stmt/parser_stmt_box.hako"
"lang.compiler.parser.stmt.parser_control_box" = "lang/src/compiler/parser/stmt/parser_control_box.hako"
"lang.compiler.parser.stmt.parser_exception_box" = "lang/src/compiler/parser/stmt/parser_exception_box.hako"
"lang.compiler.stage1.json_program_box" = "lang/src/compiler/stage1/json_program_box.hako"
"lang.compiler.stage1.emitter_box" = "lang/src/compiler/stage1/emitter_box.hako"
"lang.compiler.pipeline_v2.flow_entry" = "lang/src/compiler/pipeline_v2/flow_entry.hako"
"lang.compiler.pipeline_v2.pipeline" = "lang/src/compiler/pipeline_v2/pipeline.hako"
feat(stage-b): Add FLOW keyword support + fix Stage-3 keyword conflicts ## ✅ Fixed Issues ### 1. `local` keyword tokenization (commit 9aab64f7) - Added Stage-3 gate for LOCAL/TRY/CATCH/THROW keywords - LOCAL now only active when NYASH_PARSER_STAGE3=1 ### 2. `env.local.get` keyword conflict - File: `lang/src/compiler/entry/compiler_stageb.hako:21-23` - Problem: `.local` in member access tokenized as `.LOCAL` keyword - Fix: Commented out `env.local.get("HAKO_SOURCE")` line - Fallback: Use `--source` argument (still functional) ### 3. `flow` keyword missing - Added FLOW to TokenType enum (`src/tokenizer/kinds.rs`) - Added "flow" → TokenType::FLOW mapping (`src/tokenizer/lex_ident.rs`) - Added FLOW to Stage-3 gate (requires NYASH_PARSER_STAGE3=1) - Added FLOW to parser statement dispatch (`src/parser/statements/mod.rs`) - Added FLOW to declaration handler (`src/parser/statements/declarations.rs`) - Updated box_declaration parser to accept BOX or FLOW (`src/parser/declarations/box_definition.rs`) - Treat `flow FooBox {}` as syntactic sugar for `box FooBox {}` ### 4. Module namespace conversion - Renamed `lang.compiler.builder.ssa.local` → `localvar` (avoid keyword) - Renamed file `local.hako` → `local_ssa.hako` - Converted 152 path-based using statements to namespace format - Added 26+ entries to `nyash.toml` [modules] section ## ⚠️ Remaining Issues ### Stage-B selfhost compiler performance - Stage-B compiler not producing output (hangs/times out after 10+ seconds) - Excessive PHI debug output suggests compilation loop issue - Needs investigation: infinite loop or N² algorithm in hako compiler ### Fallback JSON version mismatch - Rust fallback (`--emit-mir-json`) emits MIR v1 JSON (schema_version: "1.0") - Smoke tests expect MIR v0 JSON (`"version":0, "kind":"Program"`) - stageb_helpers.sh fallback needs adjustment ## Test Status - Parse errors: FIXED ✅ - Keyword conflicts: FIXED ✅ - Stage-B smoke tests: STILL FAILING ❌ (performance issue) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 04:13:17 +09:00
"lang.compiler.pipeline_v2.stage1_extract_flow" = "lang/src/compiler/pipeline_v2/stage1_extract_flow.hako"
"lang.compiler.pipeline_v2.emit_return_box" = "lang/src/compiler/pipeline_v2/emit_return_box.hako"
"lang.compiler.pipeline_v2.emit_binop_box" = "lang/src/compiler/pipeline_v2/emit_binop_box.hako"
"lang.compiler.pipeline_v2.emit_compare_box" = "lang/src/compiler/pipeline_v2/emit_compare_box.hako"
"lang.compiler.pipeline_v2.regex_flow" = "lang/src/compiler/pipeline_v2/regex_flow.hako"
"lang.compiler.pipeline_v2.emit_call_box" = "lang/src/compiler/pipeline_v2/emit_call_box.hako"
"lang.compiler.pipeline_v2.emit_method_box" = "lang/src/compiler/pipeline_v2/emit_method_box.hako"
"lang.compiler.pipeline_v2.emit_newbox_box" = "lang/src/compiler/pipeline_v2/emit_newbox_box.hako"
"lang.compiler.build.build_box" = "lang/src/compiler/build/build_box.hako"
feat(stage-b): Add FLOW keyword support + fix Stage-3 keyword conflicts ## ✅ Fixed Issues ### 1. `local` keyword tokenization (commit 9aab64f7) - Added Stage-3 gate for LOCAL/TRY/CATCH/THROW keywords - LOCAL now only active when NYASH_PARSER_STAGE3=1 ### 2. `env.local.get` keyword conflict - File: `lang/src/compiler/entry/compiler_stageb.hako:21-23` - Problem: `.local` in member access tokenized as `.LOCAL` keyword - Fix: Commented out `env.local.get("HAKO_SOURCE")` line - Fallback: Use `--source` argument (still functional) ### 3. `flow` keyword missing - Added FLOW to TokenType enum (`src/tokenizer/kinds.rs`) - Added "flow" → TokenType::FLOW mapping (`src/tokenizer/lex_ident.rs`) - Added FLOW to Stage-3 gate (requires NYASH_PARSER_STAGE3=1) - Added FLOW to parser statement dispatch (`src/parser/statements/mod.rs`) - Added FLOW to declaration handler (`src/parser/statements/declarations.rs`) - Updated box_declaration parser to accept BOX or FLOW (`src/parser/declarations/box_definition.rs`) - Treat `flow FooBox {}` as syntactic sugar for `box FooBox {}` ### 4. Module namespace conversion - Renamed `lang.compiler.builder.ssa.local` → `localvar` (avoid keyword) - Renamed file `local.hako` → `local_ssa.hako` - Converted 152 path-based using statements to namespace format - Added 26+ entries to `nyash.toml` [modules] section ## ⚠️ Remaining Issues ### Stage-B selfhost compiler performance - Stage-B compiler not producing output (hangs/times out after 10+ seconds) - Excessive PHI debug output suggests compilation loop issue - Needs investigation: infinite loop or N² algorithm in hako compiler ### Fallback JSON version mismatch - Rust fallback (`--emit-mir-json`) emits MIR v1 JSON (schema_version: "1.0") - Smoke tests expect MIR v0 JSON (`"version":0, "kind":"Program"`) - stageb_helpers.sh fallback needs adjustment ## Test Status - Parse errors: FIXED ✅ - Keyword conflicts: FIXED ✅ - Stage-B smoke tests: STILL FAILING ❌ (performance issue) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 04:13:17 +09:00
"lang.compiler.pipeline_v2.mir_call_box" = "lang/src/compiler/pipeline_v2/mir_call_box.hako"
"lang.compiler.pipeline_v2.compare_extract_box" = "lang/src/compiler/pipeline_v2/compare_extract_box.hako"
"lang.compiler.pipeline_v2.normalizer_box" = "lang/src/compiler/pipeline_v2/normalizer_box.hako"
"lang.compiler.pipeline_v2.map_helpers_box" = "lang/src/compiler/pipeline_v2/map_helpers_box.hako"
"lang.compiler.pipeline_v2.call_extract_box" = "lang/src/compiler/pipeline_v2/call_extract_box.hako"
"lang.compiler.pipeline_v2.method_extract_box" = "lang/src/compiler/pipeline_v2/method_extract_box.hako"
"lang.compiler.pipeline_v2.new_extract_box" = "lang/src/compiler/pipeline_v2/new_extract_box.hako"
"lang.compiler.pipeline_v2.using_resolver_box" = "lang/src/compiler/pipeline_v2/using_resolver_box.hako"
"lang.compiler.pipeline_v2.namespace_box" = "lang/src/compiler/pipeline_v2/namespace_box.hako"
"lang.compiler.pipeline_v2.signature_verifier_box" = "lang/src/compiler/pipeline_v2/signature_verifier_box.hako"
"lang.compiler.pipeline_v2.stage1_json_scanner_box" = "lang/src/compiler/pipeline_v2/stage1_json_scanner_box.hako"
"lang.compiler.pipeline_v2.stage1_name_args_normalizer_box" = "lang/src/compiler/pipeline_v2/stage1_name_args_normalizer_box.hako"
"lang.compiler.pipeline_v2.alias_preflight_box" = "lang/src/compiler/pipeline_v2/alias_preflight_box.hako"
"lang.compiler.pipeline_v2.stage1_args_parser_box" = "lang/src/compiler/pipeline_v2/stage1_args_parser_box.hako"
"lang.compiler.pipeline_v2.pipeline_helpers_box" = "lang/src/compiler/pipeline_v2/pipeline_helpers_box.hako"
"lang.compiler.pipeline_v2.backend_box" = "lang/src/compiler/pipeline_v2/backend_box.hako"
"lang.compiler.pipeline_v2.execution_pipeline_box" = "lang/src/compiler/pipeline_v2/execution_pipeline_box.hako"
"lang.compiler.pipeline_v2.mir_builder_box" = "lang/src/compiler/pipeline_v2/mir_builder_box.hako"
"lang.compiler.pipeline_v2.name_resolve_box" = "lang/src/compiler/pipeline_v2/name_resolve_box.hako"
"lang.compiler.pipeline_v2.pipeline_emit_box" = "lang/src/compiler/pipeline_v2/pipeline_emit_box.hako"
"lang.compiler.pipeline_v2.readonly_map_view" = "lang/src/compiler/pipeline_v2/readonly_map_view.hako"
"lang.compiler.pipeline_v2.stage1_int_args_extract_box" = "lang/src/compiler/pipeline_v2/stage1_int_args_extract_box.hako"
"lang.compiler.pipeline_v2.terminator_guard_box" = "lang/src/compiler/pipeline_v2/terminator_guard_box.hako"
"lang.compiler.pipeline_v2.emit_mir_flow" = "lang/src/compiler/pipeline_v2/emit_mir_flow.hako"
"lang.compiler.pipeline_v2.emit_mir_flow_map" = "lang/src/compiler/pipeline_v2/emit_mir_flow_map.hako"
"selfhost.shared.json.mir_v1_meta_inject_box" = "lang/src/shared/json/mir_v1_meta_inject_box.hako"
"selfhost.shared.json.json_inst_encode_box" = "lang/src/shared/json/json_inst_encode_box.hako"
"selfhost.shared.common.string_ops" = "lang/src/shared/common/string_ops.hako"
"lang.compiler.pipeline_v2.using_resolver" = "lang/src/compiler/pipeline_v2/using_resolver_box.hako"
"lang.compiler.builder.mod" = "lang/src/compiler/builder/mod.hako"
feat(stage-b): Add FLOW keyword support + fix Stage-3 keyword conflicts ## ✅ Fixed Issues ### 1. `local` keyword tokenization (commit 9aab64f7) - Added Stage-3 gate for LOCAL/TRY/CATCH/THROW keywords - LOCAL now only active when NYASH_PARSER_STAGE3=1 ### 2. `env.local.get` keyword conflict - File: `lang/src/compiler/entry/compiler_stageb.hako:21-23` - Problem: `.local` in member access tokenized as `.LOCAL` keyword - Fix: Commented out `env.local.get("HAKO_SOURCE")` line - Fallback: Use `--source` argument (still functional) ### 3. `flow` keyword missing - Added FLOW to TokenType enum (`src/tokenizer/kinds.rs`) - Added "flow" → TokenType::FLOW mapping (`src/tokenizer/lex_ident.rs`) - Added FLOW to Stage-3 gate (requires NYASH_PARSER_STAGE3=1) - Added FLOW to parser statement dispatch (`src/parser/statements/mod.rs`) - Added FLOW to declaration handler (`src/parser/statements/declarations.rs`) - Updated box_declaration parser to accept BOX or FLOW (`src/parser/declarations/box_definition.rs`) - Treat `flow FooBox {}` as syntactic sugar for `box FooBox {}` ### 4. Module namespace conversion - Renamed `lang.compiler.builder.ssa.local` → `localvar` (avoid keyword) - Renamed file `local.hako` → `local_ssa.hako` - Converted 152 path-based using statements to namespace format - Added 26+ entries to `nyash.toml` [modules] section ## ⚠️ Remaining Issues ### Stage-B selfhost compiler performance - Stage-B compiler not producing output (hangs/times out after 10+ seconds) - Excessive PHI debug output suggests compilation loop issue - Needs investigation: infinite loop or N² algorithm in hako compiler ### Fallback JSON version mismatch - Rust fallback (`--emit-mir-json`) emits MIR v1 JSON (schema_version: "1.0") - Smoke tests expect MIR v0 JSON (`"version":0, "kind":"Program"`) - stageb_helpers.sh fallback needs adjustment ## Test Status - Parse errors: FIXED ✅ - Keyword conflicts: FIXED ✅ - Stage-B smoke tests: STILL FAILING ❌ (performance issue) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 04:13:17 +09:00
"lang.compiler.builder.ssa.localvar" = "lang/src/compiler/builder/ssa/local_ssa.hako"
"lang.compiler.builder.ssa.loop" = "lang/src/compiler/builder/ssa/loopssa.hako"
"lang.compiler.builder.ssa.loopssa" = "lang/src/compiler/builder/ssa/loopssa.hako"
"lang.compiler.builder.ssa.cond_inserter" = "lang/src/compiler/builder/ssa/cond_inserter.hako"
"lang.compiler.builder.ssa.exit_phi.break_finder" = "lang/src/compiler/builder/ssa/exit_phi/break_finder.hako"
"lang.compiler.builder.ssa.exit_phi.phi_injector" = "lang/src/compiler/builder/ssa/exit_phi/phi_injector.hako"
"lang.compiler.builder.rewrite.special" = "lang/src/compiler/builder/rewrite/special.hako"
"lang.compiler.builder.rewrite.known" = "lang/src/compiler/builder/rewrite/known.hako"
feat(stage-b): Add FLOW keyword support + fix Stage-3 keyword conflicts ## ✅ Fixed Issues ### 1. `local` keyword tokenization (commit 9aab64f7) - Added Stage-3 gate for LOCAL/TRY/CATCH/THROW keywords - LOCAL now only active when NYASH_PARSER_STAGE3=1 ### 2. `env.local.get` keyword conflict - File: `lang/src/compiler/entry/compiler_stageb.hako:21-23` - Problem: `.local` in member access tokenized as `.LOCAL` keyword - Fix: Commented out `env.local.get("HAKO_SOURCE")` line - Fallback: Use `--source` argument (still functional) ### 3. `flow` keyword missing - Added FLOW to TokenType enum (`src/tokenizer/kinds.rs`) - Added "flow" → TokenType::FLOW mapping (`src/tokenizer/lex_ident.rs`) - Added FLOW to Stage-3 gate (requires NYASH_PARSER_STAGE3=1) - Added FLOW to parser statement dispatch (`src/parser/statements/mod.rs`) - Added FLOW to declaration handler (`src/parser/statements/declarations.rs`) - Updated box_declaration parser to accept BOX or FLOW (`src/parser/declarations/box_definition.rs`) - Treat `flow FooBox {}` as syntactic sugar for `box FooBox {}` ### 4. Module namespace conversion - Renamed `lang.compiler.builder.ssa.local` → `localvar` (avoid keyword) - Renamed file `local.hako` → `local_ssa.hako` - Converted 152 path-based using statements to namespace format - Added 26+ entries to `nyash.toml` [modules] section ## ⚠️ Remaining Issues ### Stage-B selfhost compiler performance - Stage-B compiler not producing output (hangs/times out after 10+ seconds) - Excessive PHI debug output suggests compilation loop issue - Needs investigation: infinite loop or N² algorithm in hako compiler ### Fallback JSON version mismatch - Rust fallback (`--emit-mir-json`) emits MIR v1 JSON (schema_version: "1.0") - Smoke tests expect MIR v0 JSON (`"version":0, "kind":"Program"`) - stageb_helpers.sh fallback needs adjustment ## Test Status - Parse errors: FIXED ✅ - Keyword conflicts: FIXED ✅ - Stage-B smoke tests: STILL FAILING ❌ (performance issue) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 04:13:17 +09:00
"lang.compiler.pipeline_v2.localvar_ssa_box" = "lang/src/compiler/pipeline_v2/local_ssa_box.hako"
"lang.compiler.entry.func_scanner" = "lang/src/compiler/entry/func_scanner.hako"
feat(stage-b): Add FLOW keyword support + fix Stage-3 keyword conflicts ## ✅ Fixed Issues ### 1. `local` keyword tokenization (commit 9aab64f7) - Added Stage-3 gate for LOCAL/TRY/CATCH/THROW keywords - LOCAL now only active when NYASH_PARSER_STAGE3=1 ### 2. `env.local.get` keyword conflict - File: `lang/src/compiler/entry/compiler_stageb.hako:21-23` - Problem: `.local` in member access tokenized as `.LOCAL` keyword - Fix: Commented out `env.local.get("HAKO_SOURCE")` line - Fallback: Use `--source` argument (still functional) ### 3. `flow` keyword missing - Added FLOW to TokenType enum (`src/tokenizer/kinds.rs`) - Added "flow" → TokenType::FLOW mapping (`src/tokenizer/lex_ident.rs`) - Added FLOW to Stage-3 gate (requires NYASH_PARSER_STAGE3=1) - Added FLOW to parser statement dispatch (`src/parser/statements/mod.rs`) - Added FLOW to declaration handler (`src/parser/statements/declarations.rs`) - Updated box_declaration parser to accept BOX or FLOW (`src/parser/declarations/box_definition.rs`) - Treat `flow FooBox {}` as syntactic sugar for `box FooBox {}` ### 4. Module namespace conversion - Renamed `lang.compiler.builder.ssa.local` → `localvar` (avoid keyword) - Renamed file `local.hako` → `local_ssa.hako` - Converted 152 path-based using statements to namespace format - Added 26+ entries to `nyash.toml` [modules] section ## ⚠️ Remaining Issues ### Stage-B selfhost compiler performance - Stage-B compiler not producing output (hangs/times out after 10+ seconds) - Excessive PHI debug output suggests compilation loop issue - Needs investigation: infinite loop or N² algorithm in hako compiler ### Fallback JSON version mismatch - Rust fallback (`--emit-mir-json`) emits MIR v1 JSON (schema_version: "1.0") - Smoke tests expect MIR v0 JSON (`"version":0, "kind":"Program"`) - stageb_helpers.sh fallback needs adjustment ## Test Status - Parse errors: FIXED ✅ - Keyword conflicts: FIXED ✅ - Stage-B smoke tests: STILL FAILING ❌ (performance issue) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 04:13:17 +09:00
"lang.compiler.entry.compiler" = "lang/src/compiler/entry/compiler.hako"
"lang.compiler.entry.compiler_stageb" = "lang/src/compiler/entry/compiler_stageb.hako"
"lang.compiler.entry.bundle_resolver" = "lang/src/compiler/entry/bundle_resolver.hako"
"lang.compiler.entry.using_resolver" = "lang/src/compiler/entry/using_resolver_box.hako"
feat(stage-b): Add FLOW keyword support + fix Stage-3 keyword conflicts ## ✅ Fixed Issues ### 1. `local` keyword tokenization (commit 9aab64f7) - Added Stage-3 gate for LOCAL/TRY/CATCH/THROW keywords - LOCAL now only active when NYASH_PARSER_STAGE3=1 ### 2. `env.local.get` keyword conflict - File: `lang/src/compiler/entry/compiler_stageb.hako:21-23` - Problem: `.local` in member access tokenized as `.LOCAL` keyword - Fix: Commented out `env.local.get("HAKO_SOURCE")` line - Fallback: Use `--source` argument (still functional) ### 3. `flow` keyword missing - Added FLOW to TokenType enum (`src/tokenizer/kinds.rs`) - Added "flow" → TokenType::FLOW mapping (`src/tokenizer/lex_ident.rs`) - Added FLOW to Stage-3 gate (requires NYASH_PARSER_STAGE3=1) - Added FLOW to parser statement dispatch (`src/parser/statements/mod.rs`) - Added FLOW to declaration handler (`src/parser/statements/declarations.rs`) - Updated box_declaration parser to accept BOX or FLOW (`src/parser/declarations/box_definition.rs`) - Treat `flow FooBox {}` as syntactic sugar for `box FooBox {}` ### 4. Module namespace conversion - Renamed `lang.compiler.builder.ssa.local` → `localvar` (avoid keyword) - Renamed file `local.hako` → `local_ssa.hako` - Converted 152 path-based using statements to namespace format - Added 26+ entries to `nyash.toml` [modules] section ## ⚠️ Remaining Issues ### Stage-B selfhost compiler performance - Stage-B compiler not producing output (hangs/times out after 10+ seconds) - Excessive PHI debug output suggests compilation loop issue - Needs investigation: infinite loop or N² algorithm in hako compiler ### Fallback JSON version mismatch - Rust fallback (`--emit-mir-json`) emits MIR v1 JSON (schema_version: "1.0") - Smoke tests expect MIR v0 JSON (`"version":0, "kind":"Program"`) - stageb_helpers.sh fallback needs adjustment ## Test Status - Parse errors: FIXED ✅ - Keyword conflicts: FIXED ✅ - Stage-B smoke tests: STILL FAILING ❌ (performance issue) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 04:13:17 +09:00
"lang.compiler.emit.mir_emitter_box" = "lang/src/compiler/emit/mir_emitter_box.hako"
"lang.compiler.emit.common.json_emit_box" = "lang/src/compiler/emit/common/json_emit_box.hako"
"lang.compiler.emit.common.mir_emit_box" = "lang/src/compiler/emit/common/mir_emit_box.hako"
"lang.compiler.emit.common.call_emit_box" = "lang/src/compiler/emit/common/call_emit_box.hako"
"lang.compiler.emit.common.newbox_emit_box" = "lang/src/compiler/emit/common/newbox_emit_box.hako"
"lang.compiler.emit.common.header_emit_box" = "lang/src/compiler/emit/common/header_emit_box.hako"
"lang.compiler.emit.common.json_emit" = "lang/src/compiler/emit/common/json_emit_box.hako"
"lang.compiler.emit.common.mir_emit" = "lang/src/compiler/emit/common/mir_emit_box.hako"
"lang.compiler.emit.common.call_emit" = "lang/src/compiler/emit/common/call_emit_box.hako"
"lang.compiler.emit.common.newbox_emit" = "lang/src/compiler/emit/common/newbox_emit_box.hako"
"lang.compiler.emit.common.header_emit" = "lang/src/compiler/emit/common/header_emit_box.hako"
# MIR modules (Phase 15 compiler infrastructure)
"lang.mir.builder.func_lowering" = "lang/src/mir/builder/func_lowering.hako"
"lang.mir.builder.MirBuilderBox" = "lang/src/mir/builder/MirBuilderBox.hako"
"lang.mir.builder.MirBuilderMinBox" = "lang/src/mir/builder/MirBuilderMinBox.hako"
"lang.mir.builder.pattern_registry" = "lang/src/mir/builder/pattern_registry.hako"
"lang.mir.builder.func_body.basic_lower_box" = "lang/src/mir/builder/func_body/basic_lower_box.hako"
"lang.mir.builder.func_body.extern_call_box" = "lang/src/mir/builder/func_body/extern_call_box.hako"
"lang.mir.builder.func_body.cli_entry_box" = "lang/src/mir/builder/func_body/cli_entry_box.hako"
"lang.mir.builder.func_body.cli_run_shape_box" = "lang/src/mir/builder/func_body/cli_run_shape_box.hako"
"lang.mir.builder.func_body.cli_run_lower_box" = "lang/src/mir/builder/func_body/cli_run_lower_box.hako"
"lang.mir.builder.internal.prog_scan_box" = "lang/src/mir/builder/internal/prog_scan_box.hako"
"lang.mir.builder.internal.lower_load_store_local_box" = "lang/src/mir/builder/internal/lower_load_store_local_box.hako"
"lang.mir.builder.internal.lower_typeop_cast_box" = "lang/src/mir/builder/internal/lower_typeop_cast_box.hako"
"lang.mir.builder.internal.lower_typeop_check_box" = "lang/src/mir/builder/internal/lower_typeop_check_box.hako"
"lang.mir.builder.internal.lower_loop_simple_box" = "lang/src/mir/builder/internal/lower_loop_simple_box.hako"
Phase 25.1b: Step B完了(multi-carrier LoopForm対応) Step B実装内容(fibonacci風マルチキャリアループ対応): - LoopFormBox拡張: - multi_count mode追加(build2メソッド) - build_loop_multi_carrierメソッド実装(4-PHI, 5 blocks) - 3変数(i, a, b)同時追跡のfibonacci構造生成 - LowerLoopMultiCarrierBox新規実装: - 複数Local/Assign検出(2+変数) - キャリア変数抽出 - mode="multi_count"でLoopOptsBox.build2呼び出し - Fail-Fast: insufficient_carriersタグ出力 - FuncBodyBasicLowerBox拡張: - _try_lower_loopに呼び出し導線追加 - 優先順位: sum_bc → multi_carrier → simple - [funcs/basic:loop.multi_carrier]タグ出力 - Module export設定: - lang/src/mir/hako_module.toml: sum_bc/multi_carrier追加 - nyash.toml: 対応するmodule path追加 既存mode完全保持(Rust Freeze遵守): - count, sum_bcは一切変更なし - multi_countは完全に独立して追加 - 既存テストへの影響ゼロ Technical Details: - PHI構造: 3-PHI (i, a, b) in Header - Block構成: Preheader → Header → Body → Latch → Exit - Fibonacci計算: t = a+b, a' = b, b' = t - copy命令でLatchから Headerへ値を渡す Task先生調査結果を反映: - Rust層のパターンC(4-PHI, multi-carrier)に対応 - MirSchemaBox経由で型安全なMIR生成 Next: スモークテスト追加、既存テスト全通確認 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 03:11:49 +09:00
"lang.mir.builder.internal.lower_loop_sum_bc_box" = "lang/src/mir/builder/internal/lower_loop_sum_bc_box.hako"
"lang.mir.builder.internal.lower_loop_multi_carrier_box" = "lang/src/mir/builder/internal/lower_loop_multi_carrier_box.hako"
"lang.mir.builder.internal.loop_opts_adapter_box" = "lang/src/mir/builder/internal/loop_opts_adapter_box.hako"
"lang.mir.builder.internal.builder_config_box" = "lang/src/mir/builder/internal/builder_config_box.hako"
"lang.mir.builder.internal.jsonfrag_normalizer_box" = "lang/src/mir/builder/internal/jsonfrag_normalizer_box.hako"
"lang.mir.min_emitter" = "lang/src/mir/min_emitter.hako"
# Shared helpers (selfhost shared/vm) — kept under `lang/` tree
"selfhost.shared.json_adapter" = "lang/src/shared/json_adapter.hako"
"selfhost.shared.common.mini_vm_scan" = "lang/src/shared/common/mini_vm_scan.hako"
"selfhost.shared.common.mini_vm_binop" = "lang/src/shared/common/mini_vm_binop.hako"
"selfhost.shared.common.mini_vm_compare" = "lang/src/shared/common/mini_vm_compare.hako"
"selfhost.shared.common.string_helpers" = "lang/src/shared/common/string_helpers.hako"
"selfhost.shared.common.box_helpers" = "lang/src/shared/common/box_helpers.hako"
"selfhost.shared.common.box_type_inspector" = "lang/src/shared/common/box_type_inspector_box.hako"
"selfhost.shared.json.mir_builder_min" = "lang/src/shared/json/mir_builder_min.hako"
"selfhost.shared.json.mir_v1_adapter" = "lang/src/shared/json/mir_v1_adapter.hako"
"selfhost.shared.json.core.json_cursor" = "lang/src/shared/json/json_cursor.hako"
feat(stage-b): Add FLOW keyword support + fix Stage-3 keyword conflicts ## ✅ Fixed Issues ### 1. `local` keyword tokenization (commit 9aab64f7) - Added Stage-3 gate for LOCAL/TRY/CATCH/THROW keywords - LOCAL now only active when NYASH_PARSER_STAGE3=1 ### 2. `env.local.get` keyword conflict - File: `lang/src/compiler/entry/compiler_stageb.hako:21-23` - Problem: `.local` in member access tokenized as `.LOCAL` keyword - Fix: Commented out `env.local.get("HAKO_SOURCE")` line - Fallback: Use `--source` argument (still functional) ### 3. `flow` keyword missing - Added FLOW to TokenType enum (`src/tokenizer/kinds.rs`) - Added "flow" → TokenType::FLOW mapping (`src/tokenizer/lex_ident.rs`) - Added FLOW to Stage-3 gate (requires NYASH_PARSER_STAGE3=1) - Added FLOW to parser statement dispatch (`src/parser/statements/mod.rs`) - Added FLOW to declaration handler (`src/parser/statements/declarations.rs`) - Updated box_declaration parser to accept BOX or FLOW (`src/parser/declarations/box_definition.rs`) - Treat `flow FooBox {}` as syntactic sugar for `box FooBox {}` ### 4. Module namespace conversion - Renamed `lang.compiler.builder.ssa.local` → `localvar` (avoid keyword) - Renamed file `local.hako` → `local_ssa.hako` - Converted 152 path-based using statements to namespace format - Added 26+ entries to `nyash.toml` [modules] section ## ⚠️ Remaining Issues ### Stage-B selfhost compiler performance - Stage-B compiler not producing output (hangs/times out after 10+ seconds) - Excessive PHI debug output suggests compilation loop issue - Needs investigation: infinite loop or N² algorithm in hako compiler ### Fallback JSON version mismatch - Rust fallback (`--emit-mir-json`) emits MIR v1 JSON (schema_version: "1.0") - Smoke tests expect MIR v0 JSON (`"version":0, "kind":"Program"`) - stageb_helpers.sh fallback needs adjustment ## Test Status - Parse errors: FIXED ✅ - Keyword conflicts: FIXED ✅ - Stage-B smoke tests: STILL FAILING ❌ (performance issue) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 04:13:17 +09:00
"selfhost.shared.json.core.string_scan" = "lang/src/shared/json/core/string_scan.hako"
"selfhost.shared.json.core.json_scan" = "lang/src/shared/json/core/json_scan.hako"
"selfhost.shared.json.utils.json_utils" = "lang/src/shared/json/json_utils.hako"
feat(stage-b): Add FLOW keyword support + fix Stage-3 keyword conflicts ## ✅ Fixed Issues ### 1. `local` keyword tokenization (commit 9aab64f7) - Added Stage-3 gate for LOCAL/TRY/CATCH/THROW keywords - LOCAL now only active when NYASH_PARSER_STAGE3=1 ### 2. `env.local.get` keyword conflict - File: `lang/src/compiler/entry/compiler_stageb.hako:21-23` - Problem: `.local` in member access tokenized as `.LOCAL` keyword - Fix: Commented out `env.local.get("HAKO_SOURCE")` line - Fallback: Use `--source` argument (still functional) ### 3. `flow` keyword missing - Added FLOW to TokenType enum (`src/tokenizer/kinds.rs`) - Added "flow" → TokenType::FLOW mapping (`src/tokenizer/lex_ident.rs`) - Added FLOW to Stage-3 gate (requires NYASH_PARSER_STAGE3=1) - Added FLOW to parser statement dispatch (`src/parser/statements/mod.rs`) - Added FLOW to declaration handler (`src/parser/statements/declarations.rs`) - Updated box_declaration parser to accept BOX or FLOW (`src/parser/declarations/box_definition.rs`) - Treat `flow FooBox {}` as syntactic sugar for `box FooBox {}` ### 4. Module namespace conversion - Renamed `lang.compiler.builder.ssa.local` → `localvar` (avoid keyword) - Renamed file `local.hako` → `local_ssa.hako` - Converted 152 path-based using statements to namespace format - Added 26+ entries to `nyash.toml` [modules] section ## ⚠️ Remaining Issues ### Stage-B selfhost compiler performance - Stage-B compiler not producing output (hangs/times out after 10+ seconds) - Excessive PHI debug output suggests compilation loop issue - Needs investigation: infinite loop or N² algorithm in hako compiler ### Fallback JSON version mismatch - Rust fallback (`--emit-mir-json`) emits MIR v1 JSON (schema_version: "1.0") - Smoke tests expect MIR v0 JSON (`"version":0, "kind":"Program"`) - stageb_helpers.sh fallback needs adjustment ## Test Status - Parse errors: FIXED ✅ - Keyword conflicts: FIXED ✅ - Stage-B smoke tests: STILL FAILING ❌ (performance issue) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 04:13:17 +09:00
"selfhost.shared.json.stringify" = "lang/src/shared/json/stringify.hako"
"selfhost.shared.mir.schema" = "lang/src/shared/mir/mir_schema_box.hako"
feat(stage-b): Add FLOW keyword support + fix Stage-3 keyword conflicts ## ✅ Fixed Issues ### 1. `local` keyword tokenization (commit 9aab64f7) - Added Stage-3 gate for LOCAL/TRY/CATCH/THROW keywords - LOCAL now only active when NYASH_PARSER_STAGE3=1 ### 2. `env.local.get` keyword conflict - File: `lang/src/compiler/entry/compiler_stageb.hako:21-23` - Problem: `.local` in member access tokenized as `.LOCAL` keyword - Fix: Commented out `env.local.get("HAKO_SOURCE")` line - Fallback: Use `--source` argument (still functional) ### 3. `flow` keyword missing - Added FLOW to TokenType enum (`src/tokenizer/kinds.rs`) - Added "flow" → TokenType::FLOW mapping (`src/tokenizer/lex_ident.rs`) - Added FLOW to Stage-3 gate (requires NYASH_PARSER_STAGE3=1) - Added FLOW to parser statement dispatch (`src/parser/statements/mod.rs`) - Added FLOW to declaration handler (`src/parser/statements/declarations.rs`) - Updated box_declaration parser to accept BOX or FLOW (`src/parser/declarations/box_definition.rs`) - Treat `flow FooBox {}` as syntactic sugar for `box FooBox {}` ### 4. Module namespace conversion - Renamed `lang.compiler.builder.ssa.local` → `localvar` (avoid keyword) - Renamed file `local.hako` → `local_ssa.hako` - Converted 152 path-based using statements to namespace format - Added 26+ entries to `nyash.toml` [modules] section ## ⚠️ Remaining Issues ### Stage-B selfhost compiler performance - Stage-B compiler not producing output (hangs/times out after 10+ seconds) - Excessive PHI debug output suggests compilation loop issue - Needs investigation: infinite loop or N² algorithm in hako compiler ### Fallback JSON version mismatch - Rust fallback (`--emit-mir-json`) emits MIR v1 JSON (schema_version: "1.0") - Smoke tests expect MIR v0 JSON (`"version":0, "kind":"Program"`) - stageb_helpers.sh fallback needs adjustment ## Test Status - Parse errors: FIXED ✅ - Keyword conflicts: FIXED ✅ - Stage-B smoke tests: STILL FAILING ❌ (performance issue) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 04:13:17 +09:00
"selfhost.shared.mir.loopform" = "lang/src/shared/mir/loop_form_box.hako"
"selfhost.shared.mir.builder" = "lang/src/shared/mir/block_builder_box.hako"
"selfhost.shared.mir.io" = "lang/src/shared/mir/mir_io_box.hako"
"selfhost.shared.mir.json_emit" = "lang/src/shared/mir/json_emit_box.hako"
"selfhost.shared.host_bridge.codegen_bridge" = "lang/src/shared/host_bridge/codegen_bridge_box.hako"
"selfhost.llvm.ir.normalize.print" = "lang/src/llvm_ir/boxes/normalize/normalize_print.hako"
"selfhost.llvm.ir.normalize.ref" = "lang/src/llvm_ir/boxes/normalize/normalize_ref.hako"
"selfhost.llvm.ir.normalize.array_legacy" = "lang/src/llvm_ir/boxes/normalize/normalize_array_legacy.hako"
"selfhost.vm.entry" = "lang/src/vm/boxes/mini_vm_entry.hako"
"selfhost.vm.mir_min" = "lang/src/vm/boxes/mir_vm_min.hako"
"selfhost.vm.core" = "lang/src/vm/boxes/mini_vm_core.hako"
"selfhost.vm.helpers.op_handlers" = "lang/src/vm/boxes/op_handlers.hako"
"selfhost.vm.helpers.operator" = "lang/src/vm/boxes/operator_box.hako"
"selfhost.vm.helpers.mini_mir_v1_scan" = "lang/src/vm/boxes/mini_mir_v1_scan.hako"
"selfhost.vm.helpers.mir_call_v1_handler" = "lang/src/vm/boxes/mir_call_v1_handler.hako"
"selfhost.vm.helpers.v1_phi_adapter" = "lang/src/vm/boxes/v1_phi_adapter.hako"
"selfhost.vm.helpers.v1_phi_table" = "lang/src/vm/boxes/v1_phi_table.hako"
"selfhost.vm.helpers.v1_schema" = "lang/src/vm/boxes/v1_schema.hako"
"selfhost.vm.hakorune-vm.json_v1_reader" = "lang/src/vm/hakorune-vm/json_v1_reader.hako"
"selfhost.vm.hv1.reader" = "lang/src/vm/hakorune-vm/json_v1_reader.hako"
"selfhost.vm.hakorune-vm.dispatch" = "lang/src/vm/hakorune-vm/dispatcher_v1.hako"
"selfhost.vm.hv1.dispatch" = "lang/src/vm/hakorune-vm/dispatcher_v1.hako"
"selfhost.vm.hakorune-vm.str_cast" = "lang/src/vm/hakorune-vm/str_cast.hako"
"selfhost.vm.helpers.compare_ops" = "lang/src/vm/boxes/compare_ops.hako"
"selfhost.vm.helpers.compare_scan" = "lang/src/vm/boxes/compare_scan_box.hako"
"selfhost.vm.helpers.phi_apply" = "lang/src/vm/boxes/phi_apply_box.hako"
"selfhost.vm.helpers.guard" = "lang/src/vm/boxes/guard_box.hako"
"selfhost.vm.helpers.result" = "lang/src/vm/boxes/result_box.hako"
"selfhost.vm.helpers.phi_decode" = "lang/src/vm/boxes/phi_decode_box.hako"
"selfhost.vm.helpers.method_alias_policy" = "lang/src/vm/helpers/method_alias_policy.hako"
"selfhost.vm.helpers.ret_resolve" = "lang/src/vm/boxes/ret_resolve_simple.hako"
"selfhost.vm.helpers.instruction_scanner" = "lang/src/vm/boxes/instruction_scanner.hako"
"selfhost.vm.helpers.gc_hooks" = "lang/src/vm/gc/gc_hooks.hako"
"selfhost.vm.helpers.arithmetic" = "lang/src/vm/boxes/arithmetic.hako"
"selfhost.vm.helpers.cfg_navigator" = "lang/src/vm/boxes/cfg_navigator.hako"
"selfhost.vm.helpers.mini_map" = "lang/src/vm/boxes/mini_map_box.hako"
refactor(mir): Phase 6-2 - Apply helper methods to reduce ~28 lines in JSON v0 Bridge **Phase 6-2完了:ヘルパーメソッド適用で28行削減達成!** ## 📊 削減実績 - **loop_.rs**: 8行→1行(7行削減) - PHI更新ループ統一 - **if_else.rs**: 6行→1行(5行削減) - Branch終端設定統一 - **try_catch.rs**: 8箇所×2-3行(16行削減) - Jump終端設定統一 - **合計**: ~28行削減 ## 🔧 適用内容 ### 1. loop_.rs - PHI更新の統一化 - **Before**: 手動でPHI命令を検索してinputs.push() - **After**: `bb.update_phi_input(phi_dst, (bend, latch_val))?` ### 2. if_else.rs - Branch終端設定の統一化 - **Before**: if-let-Some + bb.set_terminator(Branch {...}) - **After**: `f.set_branch_terminator(cur, cval, then_bb, else_bb)?` ### 3. try_catch.rs - Jump終端設定の統一化(8箇所) - **Before**: if-let-Some + bb.set_terminator(Jump {...}) - **After**: `f.set_jump_terminator(bb_id, target)?` ## ✅ テスト結果 - `loop_min_while.nyash`: ✅ PASS(0,1,2出力) - `loop_phi_one_sided.nyash`: ✅ PASS(ArrayBox警告のみ) - ビルド: ✅ 88 warnings(既存レベル) ## 🎯 Phase 6進捗 - **Phase 6-1**: ✅ ヘルパーメソッド追加(+46行) - **Phase 6-2**: ✅ ヘルパー適用(-28行) - **実質削減**: -28行(基盤整備込み) ## 📋 次のステップ - **Phase 6-3**: BranchMergeBuilder pattern(~100行削減見込み) - **Phase 6-4**: 全体統合・最終テスト Related: Phase 1-5(3,824行削減)に続く段階的リファクタリング 🐱 にゃーん!実用化成功!
2025-11-01 15:23:28 +09:00
"hakorune.vm.entry" = "lang/src/vm/boxes/mini_vm_entry.hako"
"hakorune.vm.mir_min" = "lang/src/vm/boxes/mir_vm_min.hako"
"hakorune.vm.core" = "lang/src/vm/boxes/mini_vm_core.hako"
# Phase 20.34 — BoxFirst selfhost build line (aliases for Hako boxes)
"hako.mir.builder" = "lang/src/mir/builder/MirBuilderBox.hako"
feat(phase21.5/22.1): MirBuilder JsonFrag refactor + FileBox ring-1 + registry tests Phase 21.5 (AOT/LLVM Optimization Prep) - FileBox ring-1 (core-ro) provider: priority=-100, always available, no panic path - src/runner/modes/common_util/provider_registry.rs: CoreRoFileProviderFactory - Auto-registers at startup, eliminates fallback panic structurally - StringBox fast path prototypes (length/size optimization) - Performance benchmarks (C/Python/Hako comparison baseline) Phase 22.1 (JsonFrag Unification) - JsonFrag.last_index_of_from() for backward search (VM fallback) - Replace hand-written lastIndexOf in lower_loop_sum_bc_box.hako - SentinelExtractorBox for Break/Continue pattern extraction MirBuilder Refactor (Box → JsonFrag Migration) - 20+ lower_*_box.hako: Box-heavy → JsonFrag text assembly - MirBuilderMinBox: lightweight using set for dev env - Registry-only fast path with [registry:*] tag observation - pattern_util_box.hako: enhanced pattern matching Dev Environment & Testing - Dev toggles: SMOKES_DEV_PREINCLUDE=1 (point-enable), HAKO_MIR_BUILDER_SKIP_LOOPS=1 - phase2160: registry opt-in tests (array/map get/set/push/len) - content verification - phase2034: rc-dependent → token grep (grep -F based validation) - run_quick.sh: fast smoke testing harness - ENV documentation: docs/ENV_VARS.md Test Results ✅ quick phase2034: ALL GREEN (MirBuilder internal patterns) ✅ registry phase2160: ALL GREEN (array/map get/set/push/len) ✅ rc-dependent tests → content token verification complete ✅ PREINCLUDE policy: default OFF, point-enable only where needed Technical Notes - No INCLUDE by default (maintain minimalism) - FAIL_FAST=0 in Bring-up contexts only (explicit dev toggles) - Tag-based route observation ([mirbuilder/min:*], [registry:*]) - MIR structure validation (not just rc parity) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 19:42:42 +09:00
"hako.mir.builder.min" = "lang/src/mir/builder/MirBuilderMinBox.hako"
"selfhost.llvm.ir.aot_prep" = "lang/src/llvm_ir/boxes/aot_prep.hako"
"selfhost.llvm.ir.aot_prep.helpers.common" = "lang/src/llvm_ir/boxes/aot_prep/helpers/common.hako"
"selfhost.llvm.ir.aot_prep.passes.strlen" = "lang/src/llvm_ir/boxes/aot_prep/passes/strlen.hako"
"selfhost.llvm.ir.aot_prep.passes.loop_hoist" = "lang/src/llvm_ir/boxes/aot_prep/passes/loop_hoist.hako"
"selfhost.llvm.ir.aot_prep.passes.const_dedup" = "lang/src/llvm_ir/boxes/aot_prep/passes/const_dedup.hako"
"selfhost.llvm.ir.aot_prep.passes.binop_cse" = "lang/src/llvm_ir/boxes/aot_prep/passes/binop_cse.hako"
"selfhost.llvm.ir.aot_prep.passes.collections_hot" = "lang/src/llvm_ir/boxes/aot_prep/passes/collections_hot.hako"
"selfhost.llvm.ir.aot_prep.passes.numeric_core" = "lang/src/llvm_ir/boxes/aot_prep/passes/numeric_core.hako"
"selfhost.llvm.ir.aot_prep.passes.fold_const_ret" = "lang/src/llvm_ir/boxes/aot_prep/passes/fold_const_ret.hako"
"selfhost.shared.json.core.json_canonical" = "lang/src/shared/json/json_canonical_box.hako"
"selfhost.shared.common.common_imports" = "lang/src/shared/common/common_imports.hako"
"hako.mir.builder.pattern_registry" = "lang/src/mir/builder/pattern_registry.hako"
Phase 22.1 WIP: SSOT resolver + TLV infrastructure + Hako MIR builder setup Setup infrastructure for Phase 22.1 (TLV C shim & Resolver SSOT): Core changes: - Add nyash_tlv, nyash_c_core, nyash_kernel_min_c crates (opt-in) - Implement SSOT resolver bridge (src/using/ssot_bridge.rs) - Add HAKO_USING_SSOT=1 / HAKO_USING_SSOT_HAKO=1 env support - Add HAKO_TLV_SHIM=1 infrastructure (requires --features tlv-shim) MIR builder improvements: - Fix using/alias consistency in Hako MIR builder - Add hako.mir.builder.internal.{prog_scan,pattern_util} to nyash.toml - Normalize LLVM extern calls: nyash.console.* → nyash_console_* Smoke tests: - Add phase2211 tests (using_ssot_hako_parity_canary_vm.sh) - Add phase2220, phase2230, phase2231 test structure - Add phase2100 S3 backend selector tests - Improve test_runner.sh with quiet/timeout controls Documentation: - Add docs/ENV_VARS.md (Phase 22.1 env vars reference) - Add docs/development/runtime/C_CORE_ABI.md - Update de-rust-roadmap.md with Phase 22.x details Tools: - Add tools/hakorune_emit_mir.sh (Hako-first MIR emission wrapper) - Add tools/tlv_roundtrip_smoke.sh placeholder - Improve ny_mir_builder.sh with better backend selection Known issues (to be fixed): - Parser infinite loop in static method parameter parsing - Stage-B output contamination with "RC: 0" (needs NYASH_JSON_ONLY=1) - phase2211/using_ssot_hako_parity_canary_vm.sh fork bomb (needs recursion guard) Next steps: Fix parser infinite loop + Stage-B quiet mode for green tests
2025-11-09 15:11:18 +09:00
"hako.using.resolve.ssot" = "lang/src/using/resolve_ssot_box.hako"
"hako.llvm.emit" = "lang/src/llvm_ir/emit/LLVMEmitBox.hako"
"hako.mir.builder.internal.prog_scan" = "lang/src/mir/builder/internal/prog_scan_box.hako"
"hako.mir.builder.internal.pattern_util" = "lang/src/mir/builder/internal/pattern_util_box.hako"
"hako.mir.builder.internal.loop_scan" = "lang/src/mir/builder/internal/loop_scan_box.hako"
"hako.mir.builder.internal.lower.logical" = "lang/src/mir/builder/internal/lower_return_logical_box.hako"
# MirBuilder internal lowers (alias for using)
"hako.mir.builder.internal.lower_if_then_else_following_return" = "lang/src/mir/builder/internal/lower_if_then_else_following_return_box.hako"
"hako.mir.builder.internal.lower_if_nested" = "lang/src/mir/builder/internal/lower_if_nested_box.hako"
"hako.mir.builder.internal.lower_if_compare" = "lang/src/mir/builder/internal/lower_if_compare_box.hako"
"hako.mir.builder.internal.lower_if_compare_fold_binints" = "lang/src/mir/builder/internal/lower_if_compare_fold_binints_box.hako"
"hako.mir.builder.internal.lower_if_compare_fold_varint" = "lang/src/mir/builder/internal/lower_if_compare_fold_varint_box.hako"
"hako.mir.builder.internal.lower_if_compare_varint" = "lang/src/mir/builder/internal/lower_if_compare_varint_box.hako"
"hako.mir.builder.internal.lower_if_compare_varvar" = "lang/src/mir/builder/internal/lower_if_compare_varvar_box.hako"
"hako.mir.builder.internal.lower_loop_sum_bc" = "lang/src/mir/builder/internal/lower_loop_sum_bc_box.hako"
"hako.mir.builder.internal.lower_loop_sum_bc_box" = "lang/src/mir/builder/internal/lower_loop_sum_bc_box.hako"
"hako.mir.builder.internal.lower_loop_simple_box" = "lang/src/mir/builder/internal/lower_loop_simple_box.hako"
"hako.mir.builder.internal.lower_loop_multi_carrier_box" = "lang/src/mir/builder/internal/lower_loop_multi_carrier_box.hako"
feat(phase21.5/22.1): MirBuilder JsonFrag refactor + FileBox ring-1 + registry tests Phase 21.5 (AOT/LLVM Optimization Prep) - FileBox ring-1 (core-ro) provider: priority=-100, always available, no panic path - src/runner/modes/common_util/provider_registry.rs: CoreRoFileProviderFactory - Auto-registers at startup, eliminates fallback panic structurally - StringBox fast path prototypes (length/size optimization) - Performance benchmarks (C/Python/Hako comparison baseline) Phase 22.1 (JsonFrag Unification) - JsonFrag.last_index_of_from() for backward search (VM fallback) - Replace hand-written lastIndexOf in lower_loop_sum_bc_box.hako - SentinelExtractorBox for Break/Continue pattern extraction MirBuilder Refactor (Box → JsonFrag Migration) - 20+ lower_*_box.hako: Box-heavy → JsonFrag text assembly - MirBuilderMinBox: lightweight using set for dev env - Registry-only fast path with [registry:*] tag observation - pattern_util_box.hako: enhanced pattern matching Dev Environment & Testing - Dev toggles: SMOKES_DEV_PREINCLUDE=1 (point-enable), HAKO_MIR_BUILDER_SKIP_LOOPS=1 - phase2160: registry opt-in tests (array/map get/set/push/len) - content verification - phase2034: rc-dependent → token grep (grep -F based validation) - run_quick.sh: fast smoke testing harness - ENV documentation: docs/ENV_VARS.md Test Results ✅ quick phase2034: ALL GREEN (MirBuilder internal patterns) ✅ registry phase2160: ALL GREEN (array/map get/set/push/len) ✅ rc-dependent tests → content token verification complete ✅ PREINCLUDE policy: default OFF, point-enable only where needed Technical Notes - No INCLUDE by default (maintain minimalism) - FAIL_FAST=0 in Bring-up contexts only (explicit dev toggles) - Tag-based route observation ([mirbuilder/min:*], [registry:*]) - MIR structure validation (not just rc parity) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 19:42:42 +09:00
"hako.mir.builder.internal.sentinel_extractor" = "lang/src/mir/builder/internal/sentinel_extractor_box.hako"
"hako.mir.builder.internal.lower_loop_count_param" = "lang/src/mir/builder/internal/lower_loop_count_param_box.hako"
"hako.mir.builder.internal.lower_loop_simple" = "lang/src/mir/builder/internal/lower_loop_simple_box.hako"
"hako.mir.builder.internal.lower_return_var_local" = "lang/src/mir/builder/internal/lower_return_var_local_box.hako"
"hako.mir.builder.internal.lower_return_string" = "lang/src/mir/builder/internal/lower_return_string_box.hako"
"hako.mir.builder.internal.lower_return_float" = "lang/src/mir/builder/internal/lower_return_float_box.hako"
"hako.mir.builder.internal.lower_return_method_array_map" = "lang/src/mir/builder/internal/lower_return_method_array_map_box.hako"
"hako.mir.builder.internal.lower_return_bool" = "lang/src/mir/builder/internal/lower_return_bool_box.hako"
"hako.mir.builder.internal.lower_return_binop_varint" = "lang/src/mir/builder/internal/lower_return_binop_varint_box.hako"
"hako.mir.builder.internal.lower_return_binop_varvar" = "lang/src/mir/builder/internal/lower_return_binop_varvar_box.hako"
"hako.mir.builder.internal.lower_return_binop" = "lang/src/mir/builder/internal/lower_return_binop_box.hako"
"hako.mir.builder.internal.lower_return_int" = "lang/src/mir/builder/internal/lower_return_int_box.hako"
feat(phase21.5/22.1): MirBuilder JsonFrag refactor + FileBox ring-1 + registry tests Phase 21.5 (AOT/LLVM Optimization Prep) - FileBox ring-1 (core-ro) provider: priority=-100, always available, no panic path - src/runner/modes/common_util/provider_registry.rs: CoreRoFileProviderFactory - Auto-registers at startup, eliminates fallback panic structurally - StringBox fast path prototypes (length/size optimization) - Performance benchmarks (C/Python/Hako comparison baseline) Phase 22.1 (JsonFrag Unification) - JsonFrag.last_index_of_from() for backward search (VM fallback) - Replace hand-written lastIndexOf in lower_loop_sum_bc_box.hako - SentinelExtractorBox for Break/Continue pattern extraction MirBuilder Refactor (Box → JsonFrag Migration) - 20+ lower_*_box.hako: Box-heavy → JsonFrag text assembly - MirBuilderMinBox: lightweight using set for dev env - Registry-only fast path with [registry:*] tag observation - pattern_util_box.hako: enhanced pattern matching Dev Environment & Testing - Dev toggles: SMOKES_DEV_PREINCLUDE=1 (point-enable), HAKO_MIR_BUILDER_SKIP_LOOPS=1 - phase2160: registry opt-in tests (array/map get/set/push/len) - content verification - phase2034: rc-dependent → token grep (grep -F based validation) - run_quick.sh: fast smoke testing harness - ENV documentation: docs/ENV_VARS.md Test Results ✅ quick phase2034: ALL GREEN (MirBuilder internal patterns) ✅ registry phase2160: ALL GREEN (array/map get/set/push/len) ✅ rc-dependent tests → content token verification complete ✅ PREINCLUDE policy: default OFF, point-enable only where needed Technical Notes - No INCLUDE by default (maintain minimalism) - FAIL_FAST=0 in Bring-up contexts only (explicit dev toggles) - Tag-based route observation ([mirbuilder/min:*], [registry:*]) - MIR structure validation (not just rc parity) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 19:42:42 +09:00
"hako.mir.builder.internal.lower_return_method_string_length" = "lang/src/mir/builder/internal/lower_return_method_string_length_box.hako"
"hako.mir.builder.internal.lower_return_loop_strlen_sum" = "lang/src/mir/builder/internal/lower_return_loop_strlen_sum_box.hako"
"hako.mir.builder.internal.lower_newbox_constructor" = "lang/src/mir/builder/internal/lower_newbox_constructor_box.hako"
"hako.mir.builder.internal.lower_method_array_size" = "lang/src/mir/builder/internal/lower_method_array_size_box.hako"
"hako.mir.builder.internal.lower_method_array_push" = "lang/src/mir/builder/internal/lower_method_array_push_box.hako"
"hako.mir.builder.internal.lower_method_array_get_set" = "lang/src/mir/builder/internal/lower_method_array_get_set_box.hako"
"hako.mir.builder.internal.lower_method_map_size" = "lang/src/mir/builder/internal/lower_method_map_size_box.hako"
"hako.mir.builder.internal.lower_method_map_get_set" = "lang/src/mir/builder/internal/lower_method_map_get_set_box.hako"
"hako.mir.builder.internal.lower_load_store_local" = "lang/src/mir/builder/internal/lower_load_store_local_box.hako"
"hako.mir.builder.internal.lower_typeop_check" = "lang/src/mir/builder/internal/lower_typeop_check_box.hako"
"hako.mir.builder.internal.lower_typeop_cast" = "lang/src/mir/builder/internal/lower_typeop_cast_box.hako"
"hako.mir.builder.internal.runner_min" = "lang/src/mir/builder/internal/runner_min_box.hako"
"hako.mir.builder.internal.jsonfrag_normalizer" = "lang/src/mir/builder/internal/jsonfrag_normalizer_box.hako"
feat(phase21.5): selfhost CWD fix + loop executable semantics + diagnostics ## Task 1: Selfhost Child Process CWD Fix ✅ - Fix: try_selfhost_builder() now runs from repo root - Implementation: (cd "$ROOT" && ... "$NYASH_BIN" ...) - Benefit: nyash.toml using mappings are reliably loaded - Location: tools/hakorune_emit_mir.sh:96-108 - Resolves: "using not found: 'hako.mir.builder.internal.*'" errors ## Task 2: Loop JSONFrag Executable Semantics ✅ - Upgrade: FORCE=1 now generates complete executable while-loop - Structure: entry(0) → loop(1) → body(2) → exit(3) - Semantics: - PHI node: i = {i0, entry} | {i_next, body} - Increment: i_next = i + 1 - Backedge: body → loop - Exit: ret i (final loop variable value) - Location: lang/src/mir/builder/internal/loop_opts_adapter_box.hako:24-44 - Expected: rc=10 (limit value) instead of structure-only validation ## Task 3: Enhanced Diagnostics ✅ - Added: HAKO_SELFHOST_TRACE=1 outputs comprehensive diagnostics - Info: prog_json_len, tokens (Loop/Compare counts), cwd, nyash.toml status - Example: [builder/selfhost-first:trace] prog_json_len=90 tokens=Loop:0,Compare:0 cwd=... nyash.toml=present - Location: tools/hakorune_emit_mir.sh:87-100 - Benefit: One-line diagnosis of CWD/nyash.toml/using issues ## Task 4: nyash.toml Missing Entries ✅ - Added: hako.mir.builder.internal.builder_config mapping - Added: hako.mir.builder.internal.loop_opts_adapter mapping - Location: nyash.toml - Benefit: Selfhost-first can resolve internal builder dependencies ## Implementation Principles - 既定挙動不変 (Default unchanged, FORCE=1 guarded) - Dev toggle controlled (TRACE=1, NO_DELEGATE=1) - Minimal diff with clear rollback path - CWD fix ensures stable using resolution - Executable semantics enable proper EXE testing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 09:09:55 +09:00
"hako.mir.builder.internal.builder_config" = "lang/src/mir/builder/internal/builder_config_box.hako"
"hako.mir.builder.internal.loop_opts_adapter" = "lang/src/mir/builder/internal/loop_opts_adapter_box.hako"
feat(phase21.5/22.1): MirBuilder JsonFrag refactor + FileBox ring-1 + registry tests Phase 21.5 (AOT/LLVM Optimization Prep) - FileBox ring-1 (core-ro) provider: priority=-100, always available, no panic path - src/runner/modes/common_util/provider_registry.rs: CoreRoFileProviderFactory - Auto-registers at startup, eliminates fallback panic structurally - StringBox fast path prototypes (length/size optimization) - Performance benchmarks (C/Python/Hako comparison baseline) Phase 22.1 (JsonFrag Unification) - JsonFrag.last_index_of_from() for backward search (VM fallback) - Replace hand-written lastIndexOf in lower_loop_sum_bc_box.hako - SentinelExtractorBox for Break/Continue pattern extraction MirBuilder Refactor (Box → JsonFrag Migration) - 20+ lower_*_box.hako: Box-heavy → JsonFrag text assembly - MirBuilderMinBox: lightweight using set for dev env - Registry-only fast path with [registry:*] tag observation - pattern_util_box.hako: enhanced pattern matching Dev Environment & Testing - Dev toggles: SMOKES_DEV_PREINCLUDE=1 (point-enable), HAKO_MIR_BUILDER_SKIP_LOOPS=1 - phase2160: registry opt-in tests (array/map get/set/push/len) - content verification - phase2034: rc-dependent → token grep (grep -F based validation) - run_quick.sh: fast smoke testing harness - ENV documentation: docs/ENV_VARS.md Test Results ✅ quick phase2034: ALL GREEN (MirBuilder internal patterns) ✅ registry phase2160: ALL GREEN (array/map get/set/push/len) ✅ rc-dependent tests → content token verification complete ✅ PREINCLUDE policy: default OFF, point-enable only where needed Technical Notes - No INCLUDE by default (maintain minimalism) - FAIL_FAST=0 in Bring-up contexts only (explicit dev toggles) - Tag-based route observation ([mirbuilder/min:*], [registry:*]) - MIR structure validation (not just rc parity) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 19:42:42 +09:00
# StageB support modules
"hako.compiler.entry.bundle_resolver" = "lang/src/compiler/entry/bundle_resolver.hako"
"hako.vm.core.dispatcher" = "lang/src/vm/core/dispatcher.hako"
# Missing alias for JsonFragBox (used widely in lowers)
"selfhost.shared.json.utils.json_frag" = "lang/src/shared/json/utils/json_frag.hako"
"selfhost.shared.json.utils.json_number_canonical" = "lang/src/shared/json/utils/json_number_canonical_box.hako"
# Temporary alias keys removed (Phase20.33 TTL reached). Use `selfhost.shared.*` above.
# Numeric core boxes (Phase 21.6)
"nyash.core.numeric.intarray" = "lang/src/runtime/numeric/intarray_core_box.hako"
"nyash.core.numeric.matrix_i64" = "lang/src/runtime/numeric/mat_i64_box.hako"
# v2 Plugin libraries (loader reads these for TypeBox ABI)
[libraries]
[libraries."libnyash_filebox_plugin.so"]
boxes = ["FileBox"]
path = "plugins/nyash-filebox-plugin/libnyash_filebox_plugin.so"
[libraries."libnyash_filebox_plugin.so".FileBox]
type_id = 6
abi_version = 1
singleton = false
[libraries."libnyash_filebox_plugin.so".FileBox.methods]
birth = { method_id = 0 }
open = { method_id = 4 }
read = { method_id = 5 }
write = { method_id = 6 }
close = { method_id = 7 }
exists = { method_id = 8 }
copyFrom = { method_id = 9 }
cloneSelf = { method_id = 10 }
fini = { method_id = 4294967295 }
[libraries."libnyash_path_plugin.so"]
boxes = ["PathBox"]
path = "plugins/nyash-path-plugin/libnyash_path_plugin.so"
[libraries."libnyash_path_plugin.so".PathBox]
type_id = 55
abi_version = 1
singleton = false
[libraries."libnyash_path_plugin.so".PathBox.methods]
birth = { method_id = 0 }
join = { method_id = 4 }
dirname = { method_id = 5 }
basename = { method_id = 6 }
extname = { method_id = 7 }
isAbs = { method_id = 8 }
normalize = { method_id = 9 }
fini = { method_id = 4294967295 }
[libraries."libnyash_math_plugin.so"]
boxes = ["MathBox", "TimeBox"]
path = "plugins/nyash-math-plugin/libnyash_math_plugin.so"
[libraries."libnyash_math_plugin.so".MathBox]
type_id = 50
abi_version = 1
singleton = false
[libraries."libnyash_math_plugin.so".MathBox.methods]
birth = { method_id = 0 }
sqrt = { method_id = 4 }
sin = { method_id = 5 }
cos = { method_id = 6 }
round = { method_id = 7 }
fini = { method_id = 4294967295 }
[libraries."libnyash_math_plugin.so".TimeBox]
type_id = 51
abi_version = 1
singleton = false
[libraries."libnyash_math_plugin.so".TimeBox.methods]
birth = { method_id = 0 }
now = { method_id = 4 }
fini = { method_id = 4294967295 }
[libraries."libnyash_regex_plugin.so"]
boxes = ["RegexBox"]
path = "plugins/nyash-regex-plugin/libnyash_regex_plugin.so"
[libraries."libnyash_regex_plugin.so".RegexBox]
type_id = 52
abi_version = 1
singleton = false
[libraries."libnyash_regex_plugin.so".RegexBox.methods]
birth = { method_id = 0 }
compile = { method_id = 4 }
isMatch = { method_id = 5 }
find = { method_id = 6 }
replaceAll = { method_id = 7 }
split = { method_id = 8 }
fini = { method_id = 4294967295 }
[libraries."libnyash_net_plugin.so"]
boxes = ["ClientBox", "ResponseBox", "RequestBox", "ServerBox", "SockServerBox", "SockClientBox", "SockConnBox"]
path = "plugins/nyash-net-plugin/libnyash_net_plugin.so"
[libraries."libnyash_net_plugin.so".ClientBox]
type_id = 23
abi_version = 1
singleton = false
[libraries."libnyash_net_plugin.so".ClientBox.methods]
birth = { method_id = 0 }
get = { method_id = 4 }
post = { method_id = 5 }
fini = { method_id = 4294967295 }
[libraries."libnyash_net_plugin.so".ResponseBox]
type_id = 22
abi_version = 1
singleton = false
[libraries."libnyash_net_plugin.so".ResponseBox.methods]
birth = { method_id = 0 }
setStatus = { method_id = 4 }
setHeader = { method_id = 5 }
write = { method_id = 6 }
readBody = { method_id = 7 }
getStatus = { method_id = 8 }
getHeader = { method_id = 9 }
fini = { method_id = 4294967295 }
[libraries."libnyash_net_plugin.so".RequestBox]
type_id = 21
abi_version = 1
singleton = false
[libraries."libnyash_net_plugin.so".RequestBox.methods]
birth = { method_id = 0 }
path = { method_id = 4 }
readBody = { method_id = 5 }
respond = { method_id = 6 }
fini = { method_id = 4294967295 }
[libraries."libnyash_net_plugin.so".ServerBox]
type_id = 20
abi_version = 1
singleton = false
[libraries."libnyash_net_plugin.so".ServerBox.methods]
birth = { method_id = 0 }
start = { method_id = 4 }
stop = { method_id = 5 }
accept = { method_id = 6 }
fini = { method_id = 4294967295 }
[libraries."libnyash_net_plugin.so".SockServerBox]
type_id = 30
abi_version = 1
singleton = false
[libraries."libnyash_net_plugin.so".SockServerBox.methods]
birth = { method_id = 0 }
start = { method_id = 4 }
stop = { method_id = 5 }
accept = { method_id = 6 }
acceptTimeout = { method_id = 7 }
fini = { method_id = 4294967295 }
[libraries."libnyash_net_plugin.so".SockClientBox]
type_id = 32
abi_version = 1
singleton = false
[libraries."libnyash_net_plugin.so".SockClientBox.methods]
birth = { method_id = 0 }
connect = { method_id = 4 }
fini = { method_id = 4294967295 }
[libraries."libnyash_net_plugin.so".SockConnBox]
type_id = 31
abi_version = 1
singleton = false
[libraries."libnyash_net_plugin.so".SockConnBox.methods]
birth = { method_id = 0 }
send = { method_id = 4 }
recv = { method_id = 5 }
close = { method_id = 6 }
recvTimeout = { method_id = 7 }
fini = { method_id = 4294967295 }
[libraries."libnyash_encoding_plugin.so"]
boxes = ["EncodingBox"]
path = "plugins/nyash-encoding-plugin/libnyash_encoding_plugin.so"
[libraries."libnyash_encoding_plugin.so".EncodingBox]
type_id = 53
abi_version = 1
singleton = false
[libraries."libnyash_encoding_plugin.so".EncodingBox.methods]
birth = { method_id = 0 }
toUtf8Bytes = { method_id = 4 }
fromUtf8Bytes = { method_id = 5 }
base64Encode = { method_id = 6 }
base64Decode = { method_id = 7 }
hexEncode = { method_id = 8 }
hexDecode = { method_id = 9 }
fini = { method_id = 4294967295 }
# Provider Verify — minimal required methods (dev warn by default)
[verify.required_methods]
# Note: Dynamic plugins may not be present in dev; preflight runs in warn mode.
StringBox = ["length", "concat"]
ArrayBox = ["len", "push", "get"]
MapBox = ["has", "get", "set"]
ConsoleBox = ["print"]
[libraries."libnyash_json_plugin.so"]
boxes = ["JsonDocBox", "JsonNodeBox"]
path = "plugins/nyash-json-plugin/libnyash_json_plugin.so"
[libraries."libnyash_json_plugin.so".JsonDocBox]
type_id = 70
abi_version = 1
singleton = false
[libraries."libnyash_json_plugin.so".JsonDocBox.methods]
birth = { method_id = 0 }
parse = { method_id = 4 }
root = { method_id = 5 }
error = { method_id = 6 }
fini = { method_id = 4294967295 }
[libraries."libnyash_json_plugin.so".JsonNodeBox]
type_id = 71
abi_version = 1
singleton = false
[libraries."libnyash_json_plugin.so".JsonNodeBox.methods]
birth = { method_id = 0 }
kind = { method_id = 4 }
get = { method_id = 5 }
size = { method_id = 6 }
at = { method_id = 7 }
str = { method_id = 8 }
int = { method_id = 9 }
bool = { method_id = 10 }
fini = { method_id = 4294967295 }
[libraries."libnyash_toml_plugin.so"]
boxes = ["TOMLBox"]
path = "plugins/nyash-toml-plugin/libnyash_toml_plugin.so"
[libraries."libnyash_toml_plugin.so".TOMLBox]
type_id = 54
abi_version = 1
singleton = false
[libraries."libnyash_toml_plugin.so".TOMLBox.methods]
birth = { method_id = 0 }
parse = { method_id = 4 }
get = { method_id = 5 }
toJson = { method_id = 6 }
fini = { method_id = 4294967295 }
# Python (v2 TypeBox) plugins
[libraries."libnyash_python_plugin.so"]
boxes = ["PyRuntimeBox", "PyObjectBox"]
path = "plugins/nyash-python-plugin/libnyash_python_plugin.so"
[libraries."libnyash_python_plugin.so".PyRuntimeBox]
type_id = 40
abi_version = 1
singleton = false
[libraries."libnyash_python_plugin.so".PyRuntimeBox.methods]
birth = { method_id = 0 }
eval = { method_id = 4 }
import = { method_id = 5 }
evalR = { method_id = 11 }
importR = { method_id = 12 }
fini = { method_id = 4294967295 }
[libraries."libnyash_python_plugin.so".PyObjectBox]
type_id = 41
abi_version = 1
singleton = false
[libraries."libnyash_python_plugin.so".PyObjectBox.methods]
birth = { method_id = 0 }
getattr = { method_id = 4 }
call = { method_id = 5 }
str = { method_id = 6 }
callKw = { method_id = 5 }
getattrR = { method_id = 11 }
callR = { method_id = 12 }
callKwR = { method_id = 15 }
fini = { method_id = 4294967295 }
[libraries."libnyash_python_parser_plugin.so"]
boxes = ["PythonParserBox"]
path = "plugins/nyash-python-parser-plugin/libnyash_python_parser_plugin.so"
[libraries."libnyash_python_parser_plugin.so".PythonParserBox]
type_id = 60
abi_version = 1
singleton = false
[libraries."libnyash_python_parser_plugin.so".PythonParserBox.methods]
birth = { method_id = 0 }
parse = { method_id = 4 }
fini = { method_id = 4294967295 }
[libraries."libnyash_python_compiler_plugin.so"]
boxes = ["PythonCompilerBox"]
path = "plugins/nyash-python-compiler-plugin/libnyash_python_compiler_plugin.so"
[libraries."libnyash_python_compiler_plugin.so".PythonCompilerBox]
type_id = 61
abi_version = 1
singleton = false
[libraries."libnyash_python_compiler_plugin.so".PythonCompilerBox.methods]
birth = { method_id = 0 }
compile = { method_id = 4 }
fini = { method_id = 4294967295 }
# StringBox Plugin (Core Box replacement)
[libraries."libnyash_string_plugin.so"]
boxes = ["StringBox"]
path = "plugins/nyash-string-plugin/libnyash_string_plugin.so"
[libraries."libnyash_string_plugin.so".StringBox]
type_id = 10
abi_version = 1
singleton = false
[libraries."libnyash_string_plugin.so".StringBox.methods]
birth = { method_id = 0 }
length = { method_id = 1 }
isEmpty = { method_id = 2 }
charCodeAt = { method_id = 3 }
concat = { method_id = 4 }
fromUtf8 = { method_id = 5 }
toUtf8 = { method_id = 6 }
# Note: Below methods are not implemented yet
# substring = { method_id = 8 }
# indexOf = { method_id = 10 }
# lastIndexOf = { method_id = 11 }
# replace = { method_id = 12 }
# split = { method_id = 13 }
# trim = { method_id = 14 }
# toUpper = { method_id = 15 }
# toLower = { method_id = 16 }
fini = { method_id = 4294967295 }
# IntegerBox Plugin (Core Box replacement)
[libraries."libnyash_integer_plugin.so"]
boxes = ["IntegerBox"]
path = "plugins/nyash-integer-plugin/libnyash_integer_plugin.so"
[libraries."libnyash_integer_plugin.so".IntegerBox]
type_id = 12
abi_version = 1
singleton = false
[libraries."libnyash_integer_plugin.so".IntegerBox.methods]
birth = { method_id = 0 }
get = { method_id = 1 }
set = { method_id = 2 }
fini = { method_id = 4294967295 }
# ArrayBox Plugin (Core Box)
[libraries."libnyash_array_plugin.so"]
boxes = ["ArrayBox"]
path = "target/release/libnyash_array_plugin.so"
[libraries."libnyash_array_plugin.so".ArrayBox]
type_id = 5
abi_version = 1
singleton = false
[libraries."libnyash_array_plugin.so".ArrayBox.methods]
birth = { method_id = 0 }
push = { method_id = 4 }
get = { method_id = 5 }
set = { method_id = 6 }
size = { method_id = 7 }
length = { method_id = 7 }
len = { method_id = 7 }
fini = { method_id = 4294967295 }
# MapBox Plugin (Core Box)
[libraries."libnyash_map_plugin.so"]
boxes = ["MapBox"]
path = "target/release/libnyash_map_plugin.so"
[libraries."libnyash_map_plugin.so".MapBox]
type_id = 6
abi_version = 1
singleton = false
[libraries."libnyash_map_plugin.so".MapBox.methods]
birth = { method_id = 0 }
set = { method_id = 4 }
get = { method_id = 5 }
has = { method_id = 6 }
size = { method_id = 7 }
length = { method_id = 7 }
len = { method_id = 7 }
fini = { method_id = 4294967295 }
# ConsoleBox Plugin (Core Box)
[libraries."libnyash_console_plugin.so"]
boxes = ["ConsoleBox"]
path = "target/release/libnyash_console_plugin.so"
[libraries."libnyash_console_plugin.so".ConsoleBox]
type_id = 7
abi_version = 1
singleton = false
[libraries."libnyash_console_plugin.so".ConsoleBox.methods]
birth = { method_id = 0 }
log = { method_id = 4 }
print = { method_id = 4 }
fini = { method_id = 4294967295 }
Phase 21.2 Complete: VM Adapter正規実装 + devブリッジ完全撤去 ## 🎉 Phase 21.2完全達成 ### ✅ 実装完了 - VM static box 永続化(singleton infrastructure) - devブリッジ完全撤去(adapter_dev.rs削除、by-name dispatch削除) - .hako正規実装(MirCallV1Handler, AbiAdapterRegistry等) - text-merge経路完全動作 - 全phase2120 adapter reps PASS(7テスト) ### 🐛 バグ修正 1. strip_local_decl修正 - トップレベルのみlocal削除、メソッド内は保持 - src/runner/modes/common_util/hako.rs:29 2. static box フィールド永続化 - MirInterpreter singleton storage実装 - me parameter binding修正(1:1マッピング) - getField/setField string→singleton解決 - src/backend/mir_interpreter/{mod,exec,handlers/boxes_object_fields}.rs 3. Map.len alias rc=0修正 - [map/missing]パターン検出でnull扱い(4箇所) - lang/src/vm/boxes/mir_call_v1_handler.hako:91-93,131-133,151-153,199-201 ### 📁 主要変更ファイル #### Rust(VM Runtime) - src/backend/mir_interpreter/mod.rs - static box singleton storage - src/backend/mir_interpreter/exec.rs - parameter binding fix - src/backend/mir_interpreter/handlers/boxes_object_fields.rs - singleton resolution - src/backend/mir_interpreter/handlers/calls.rs - dev bridge removal - src/backend/mir_interpreter/utils/mod.rs - adapter_dev module removal - src/backend/mir_interpreter/utils/adapter_dev.rs - DELETED (7555 bytes) - src/runner/modes/vm.rs - static box declaration collection - src/runner/modes/common_util/hako.rs - strip_local_decl fix - src/instance_v2.rs - Clone implementation #### Hako (.hako実装) - lang/src/vm/boxes/mir_call_v1_handler.hako - [map/missing] detection - lang/src/vm/boxes/abi_adapter_registry.hako - NEW (adapter registry) - lang/src/vm/helpers/method_alias_policy.hako - method alias support #### テスト - tools/smokes/v2/profiles/quick/core/phase2120/s3_vm_adapter_*.sh - 7 new tests ### 🎯 テスト結果 ``` ✅ s3_vm_adapter_array_len_canary_vm.sh ✅ s3_vm_adapter_array_len_per_recv_canary_vm.sh ✅ s3_vm_adapter_array_length_alias_canary_vm.sh ✅ s3_vm_adapter_array_size_alias_canary_vm.sh ✅ s3_vm_adapter_map_len_alias_state_canary_vm.sh ✅ s3_vm_adapter_map_length_alias_state_canary_vm.sh ✅ s3_vm_adapter_map_size_struct_canary_vm.sh ``` 環境フラグ: HAKO_ABI_ADAPTER=1 HAKO_ABI_ADAPTER_DEV=0 ### 🏆 設計品質 - ✅ ハードコード禁止(AGENTS.md 5.1)完全準拠 - ✅ 構造的・一般化設計(特定Box名のif分岐なし) - ✅ 後方互換性保持(既存コード破壊ゼロ) - ✅ text-merge経路(.hako依存関係正しくマージ) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 19:32:44 +09:00
"tools.hako_check.analysis_consumer" = "tools/hako_check/analysis_consumer.hako"
"tools.hako_check.rules.rule_include_forbidden" = "tools/hako_check/rules/rule_include_forbidden.hako"
"tools.hako_check.rules.rule_using_quoted" = "tools/hako_check/rules/rule_using_quoted.hako"
"tools.hako_check.rules.rule_static_top_assign" = "tools/hako_check/rules/rule_static_top_assign.hako"
"tools.hako_check.rules.rule_global_assign" = "tools/hako_check/rules/rule_global_assign.hako"
"tools.hako_check.rules.rule_dead_methods" = "tools/hako_check/rules/rule_dead_methods.hako"
"tools.hako_check.rules.rule_jsonfrag_usage" = "tools/hako_check/rules/rule_jsonfrag_usage.hako"
"tools.hako_check.cli" = "tools/hako_check/cli.hako"
"tools.hako_check.render.graphviz" = "tools/hako_check/render/graphviz.hako"
"tools.hako_parser.tokenizer" = "tools/hako_parser/tokenizer.hako"
"tools.hako_parser.parser_core" = "tools/hako_parser/parser_core.hako"
"tools.hako_parser.ast_emit" = "tools/hako_parser/ast_emit.hako"
"tools.hako_parser.cli" = "tools/hako_parser/cli.hako"