restore(lang): full lang tree from ff3ef452 (306 files) — compiler, vm, shared, runner, c-abi, etc.\n\n- Restores lang/ directory (files≈306, dirs≈64) as per historical branch with selfhost sources\n- Keeps our recent parser index changes in compiler/* (merged clean by checkout)\n- Unblocks selfhost development and documentation references
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
// Guard: This box performs no execution. Returns MIR(JSON) as text.
|
||||
|
||||
using "lang/src/compiler/pipeline_v2/pipeline.hako" as PipelineV2
|
||||
using "lang/src/shared/json/mir_v1_adapter.hako" as MirJsonV1Adapter
|
||||
|
||||
static box FlowEntryBox {
|
||||
// Emit legacy v0 JSON(call/boxcall/newbox)。最小入力: Stage‑1 JSON 文字列
|
||||
@ -21,6 +22,18 @@ static box FlowEntryBox {
|
||||
return PipelineV2.lower_stage1_to_mir_v1_compat(ast_json, prefer_cfg)
|
||||
}
|
||||
|
||||
// Emit v1 JSON with metadata.extern_c(externs を v1 の metadata に反映)
|
||||
// externs_json: JSON array text, e.g. [{"func":"Name/Arity","symbol":"c_symbol"}]
|
||||
emit_v1_from_ast_with_meta(ast_json, prefer_cfg, externs_json) {
|
||||
return PipelineV2.lower_stage1_to_mir_v1_with_meta(ast_json, prefer_cfg, externs_json)
|
||||
}
|
||||
|
||||
// Emit v1 JSON + metadata.extern_c を注入し、v0互換に変換
|
||||
emit_v1_compat_from_ast_with_meta(ast_json, prefer_cfg, externs_json) {
|
||||
local j1 = PipelineV2.lower_stage1_to_mir_v1_with_meta(ast_json, prefer_cfg, externs_json)
|
||||
return MirJsonV1Adapter.to_v0(j1)
|
||||
}
|
||||
|
||||
// No-op entry(箱ガード用)
|
||||
main(args) { return 0 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user