Merge selfhosting-dev into main (Core-13 pure CI/tests + LLVM bridge) (#126)

* WIP: sync before merging origin/main

* fix: unify using/module + build CLI; add missing helper in runner; build passes; core smokes green; jit any.len string now returns 3

* Apply local changes after merging main; keep docs/phase-15 removed per main; add phase-15.1 docs and tests

* Remove legacy docs/phase-15/README.md to align with main

* integration: add Core-13 pure CI, tests, and minimal LLVM execute bridge (no docs) (#125)

Co-authored-by: Tomoaki <tomoaki@example.com>

---------

Co-authored-by: Selfhosting Dev <selfhost@example.invalid>
Co-authored-by: Tomoaki <tomoaki@example.com>
This commit is contained in:
moe-charm
2025-09-07 07:36:15 +09:00
committed by GitHub
parent 07350c5dd9
commit b8bdb867d8
70 changed files with 2010 additions and 57 deletions

View File

@ -1,6 +1,6 @@
// Entry: read stdin, parse with ParserV0, print JSON IR or error JSON
include("./apps/ny-parser-nyash/parser_minimal.nyash")
include "./apps/ny-parser-nyash/parser_minimal.nyash"
static box Main {
main(args) {
@ -26,4 +26,3 @@ static box Main {
return 0
}
}

View File

@ -1,6 +1,6 @@
// Minimal recursive-descent parser for Ny v0 producing JSON IR v0 (MapBox)
include("./apps/ny-parser-nyash/tokenizer.nyash")
include "./apps/ny-parser-nyash/tokenizer.nyash"
static box ParserV0 {
init { tokens, pos }
@ -85,4 +85,3 @@ static box ParserV0 {
return err
}
}

View File

@ -0,0 +1,6 @@
// Expect: JIT-direct read_only policy denies mutating hostcalls (push)
return (fn(){
local a = new ArrayBox()
a.push(1)
return a.length()
})()

View File

@ -0,0 +1,21 @@
{
"version": 0,
"kind": "Program",
"body": [
{
"type": "Return",
"expr": {
"type": "Logical",
"op": "&&",
"lhs": { "type": "Bool", "value": false },
"rhs": {
"type": "Compare",
"op": "==",
"lhs": { "type": "Binary", "op": "/", "lhs": { "type": "Int", "value": 1 }, "rhs": { "type": "Int", "value": 0 } },
"rhs": { "type": "Int", "value": 1 }
}
}
}
]
}

View File

@ -0,0 +1,21 @@
{
"version": 0,
"kind": "Program",
"body": [
{
"type": "Return",
"expr": {
"type": "Logical",
"op": "||",
"lhs": { "type": "Bool", "value": true },
"rhs": {
"type": "Compare",
"op": "==",
"lhs": { "type": "Binary", "op": "/", "lhs": { "type": "Int", "value": 1 }, "rhs": { "type": "Int", "value": 0 } },
"rhs": { "type": "Int", "value": 1 }
}
}
}
]
}