Compare commits

..

3 commits

Author SHA1 Message Date
6f95381e5e normalize edition to 2024
All checks were successful
per-push tests / build (push) Successful in 38s
per-push tests / test-frontend (push) Successful in 31s
per-push tests / test-utility (push) Successful in 34s
per-push tests / timed-decomposer-parse (push) Successful in 26s
per-push tests / test-backend (push) Successful in 30s
Signed-off-by: Ava Affine <ava@sunnypup.io>
2025-07-24 19:28:25 +00:00
14396895e9 add forgejo CI
Signed-off-by: Ava Affine <ava@sunnypup.io>
2025-07-24 19:28:25 +00:00
4ad319213d HyphaeVM - WIP
This commit is a WORK IN PROGRESS for the base implementation of the
HyphaeVM. This will be squashed into a larger commit eventually when
the work of implementing the HyphaeVM is finished.

Of note, the ISA is mostly finished and much of the VM design is in
place. Yet to be done are a few traps in mycelium, migrating pieces
like the number package and the sexpr package into the VM package,
and of course much testing.

Signed-off-by: Ava Affine <ava@sunnypup.io>
2025-07-24 19:26:31 +00:00
2 changed files with 23 additions and 15 deletions

View file

@ -235,6 +235,18 @@ args = ["src"]
output = ""
description = "mutates a number datum into a char datum"
[[instructions]]
name = "ntoi"
args = ["src"]
output = ""
description = "mutates a number datum into its exact form"
[[instructions]]
name = "ntoe"
args = ["src"]
output = ""
description = "mutates a number datum into its inexact form"
[[instructions]]
name = "mkvec"
args = []
@ -289,14 +301,3 @@ args = ["list"]
output = "returns last element in cons cell"
description = "takes an AST and returns last element in top level cons cell"
[[instructions]]
name = "parse"
args = ["input"]
output = "parses an AST from input string"
description = "calls parse and lex routine on an input string"
[[instructions]]
name = "eval"
args = []
output = "result of compiled instructions"
description = "expects AST in expr. compiles it to instructions and runs them"

View file

@ -437,12 +437,19 @@ impl VM {
e!("illegal argument to CAR instruction");
};
self.expr = (*arg.0).clone();
self.expr = (*arg.1).clone();
},
i::CONS => todo!("implement AST API"),
i::PARSE => todo!("implement AST API"),
i::EVAL => todo!("implement AST API"),
i::CONS => {
/* CONS BEHAVIOR
* L Datum is not list means create a new standard form list
* L Datum is list then append the second element to the first
*/
},
// in order to maintain a language agnostic VM these must be traps
//i::PARSE => todo!("implement AST API"),
//i::EVAL => todo!("implement AST API"),
_ => {
e!("illegal instruction");