mir: implement proper short-circuit lowering (&&/||) via branch+phi; vm: add NYASH_VM_TRACE exec/phi logs and reg_load diagnostics; vm-fallback: minimal Void guards (push/get_position/line/column), MapBox.birth no-op; smokes: filter builtin Array/Map plugin notices; docs: CURRENT_TASK updated

This commit is contained in:
Selfhosting Dev
2025-09-26 03:30:59 +09:00
parent 041cef875a
commit fd56b8049a
45 changed files with 3022 additions and 204 deletions

77
json_minimal_test.nyash Normal file
View File

@ -0,0 +1,77 @@
// JSONライブラリの最小機能テスト
static box JsonMinimalTest {
main() {
print("🧪 JSON Minimal Test")
// 基本的なJSONードを手動作成
local null_node = this.create_node("null", null)
print("null node: " + null_node.stringify())
local bool_node = this.create_node("bool", true)
print("bool node: " + bool_node.stringify())
local int_node = this.create_node("int", 42)
print("int node: " + int_node.stringify())
local str_node = this.create_node("string", "hello")
print("string node: " + str_node.stringify())
print("✅ Minimal test complete")
return 0
}
// シンプルなJSONード作成
create_node(kind, value) {
local node = new MinimalJsonNode()
node.set_kind(kind)
node.set_value(value)
return node
}
}
// 最小限のJSONード
box MinimalJsonNode {
kind: StringBox
value: Box
birth() {
me.kind = "null"
me.value = null
}
set_kind(k) {
me.kind = k
}
set_value(v) {
me.value = v
}
get_kind() {
return me.kind
}
stringify() {
if me.kind == "null" {
return "null"
} else {
if me.kind == "bool" {
if me.value {
return "true"
} else {
return "false"
}
} else {
if me.kind == "int" {
return "" + me.value
} else {
if me.kind == "string" {
return "\"" + me.value + "\""
} else {
return "null"
}
}
}
}
}
}