bug fixes and getfield implementation beta

This commit is contained in:
2026-07-13 11:49:59 +10:00
parent 6929f055de
commit f2fbeb3a68
11 changed files with 371 additions and 23 deletions

View File

@@ -53,3 +53,22 @@ Under the hood, Ground uses a bytecode format to store things.
`extern` no longer loads a dynamic library from /usr/lib/ground, it is now used to detail a system shared library to open.
Format: `extern "libName" "symbolName" !functionName -returnType -argType...`
### `getfield`, `setfield`, `callmethod`
Due to the new bytecode format, these instructions go from this format
```
getfield $parent &fields... &output
setfield &parent &fields... $input
callmethod &parent &fields... !functionName $args... &output
```
to this format:
```
getfield $parent -type (&field -type)... &output
setfield &parent -type (&field -type)... $input
callmethod &parent -type (&field -type)... !functionName $args... &output
```
so offsets for instructions can be computed before runtime.