mir: read plugin method signatures from nyash_box (#134)

* mir: load plugin method signatures

* llvm: read box type ids from nyash_box

* mir: show value types in MIR printer
This commit is contained in:
moe-charm
2025-09-11 03:33:33 +09:00
committed by GitHub
parent e114f9bfe3
commit 4201c63001
7 changed files with 183 additions and 93 deletions

34
nyash_box.toml Normal file
View File

@ -0,0 +1,34 @@
# Central plugin type definitions
[CounterBox]
type_id = 7
[CounterBox.methods.inc]
returns = { type = "i64" }
[CounterBox.methods.get]
returns = { type = "i64" }
[MathBox]
type_id = 50
[MathBox.methods.sqrt]
returns = { type = "f64" }
[MathBox.methods.sin]
returns = { type = "f64" }
[MathBox.methods.cos]
returns = { type = "f64" }
[MathBox.methods.round]
returns = { type = "f64" }
[FileBox]
type_id = 6
[FileBox.methods.read]
returns = { type = "string" }
[FileBox.methods.exists]
returns = { type = "bool" }