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:
nyash-codex
2025-10-31 20:45:46 +09:00
parent dbc285f2b1
commit e5f697eb22
244 changed files with 16915 additions and 47 deletions

View File

@ -0,0 +1,20 @@
// vm_hot_path.hako — VMHotPathBox (v0 skeleton)
// Gate: HAKO_VM_FAST_PATH=1 で将来のホットパス最適化を有効化(現状は no-op
static box VMHotPathBox {
enabled() {
// Accept HAKO_VM_FAST_PATH=1|true|on (case-insensitive)
local v = call("env.local.get/1", "HAKO_VM_FAST_PATH")
if !v { return 0 }
local l = v.toLowerCase()
if l == "1" || l == "true" || l == "on" { return 1 }
return 0
}
// Entry point (reserved): future hook to prebuild maps or inject superinstructions (dev only)
prep() {
if !VMHotPathBox.enabled() { return 0 }
// v0: no-op; keep structure for future expansions
return 0
}
}