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:
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
6
apps/smokes/jit_direct_array_mut.nyash
Normal file
6
apps/smokes/jit_direct_array_mut.nyash
Normal 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()
|
||||
})()
|
||||
21
apps/smokes/json_v0_short_and.json
Normal file
21
apps/smokes/json_v0_short_and.json
Normal 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 }
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
21
apps/smokes/json_v0_short_or.json
Normal file
21
apps/smokes/json_v0_short_or.json
Normal 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 }
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user