Skip to content

Commit

Permalink
fix run_io changing root
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorTaelin committed May 25, 2024
1 parent 5809ad0 commit 50e683c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hvm"
version = "2.0.16"
version = "2.0.17"
edition = "2021"
build = "build.rs"
description = "A massively parallel, optimal functional runtime in Rust."
Expand Down
2 changes: 2 additions & 0 deletions src/hvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1224,12 +1224,14 @@ void normalize(Net* net, Book* book) {

// Util: expands a REF Port.
Port expand(Net* net, Book* book, Port port) {
Port old = vars_load(net, get_val(ROOT));
Port got = peek(net, port);
while (get_tag(got) == REF) {
boot_redex(net, new_pair(new_port(REF,get_val(got)), ROOT));
normalize(net, book);
got = peek(net, vars_load(net, get_val(ROOT)));
}
vars_store(net, get_val(ROOT), old);
return got;
}

Expand Down
2 changes: 1 addition & 1 deletion src/hvm.cu

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/hvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,8 @@ impl TMem {
let x = a; a = b; b = x;
}

//println!("[{:04x}] REDUCE {} ~ {} | {}", self.tid, a.show(), b.show(), rule);

let success = match rule {
LINK => self.interact_link(net, a, b),
CALL => self.interact_call(net, a, b, book),
Expand Down

0 comments on commit 50e683c

Please sign in to comment.