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,32 @@
// vm_kernel_box.nyash — NYABI Kernel (skeleton, dev-only; not wired)
// Scope: Provide policy/decision helpers behind an explicit OFF toggle.
// Notes: This box is not referenced by the VM by default.
static box VmKernelBox {
// Report version and supported features.
caps() {
// v0 draft: features are informative only.
return "{\"version\":0,\"features\":[\"policy\"]}"
}
// Decide stringify strategy for a given type.
// Returns: "direct" | "rewrite_stringify" | "fallback"
stringify_policy(typeName) {
if typeName == "VoidBox" { return "rewrite_stringify" }
return "fallback"
}
// Decide equals strategy for two types.
// Returns: "object" | "value" | "fallback"
equals_policy(lhsType, rhsType) {
if lhsType == rhsType { return "value" }
return "fallback"
}
// Batch resolve method dispatch plans.
// Input/Output via tiny JSON strings (draft). Returns "{\"plans\":[]}" for now.
resolve_method_batch(reqs_json) {
return "{\"plans\":[]}"
}
}