Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
feat: implement erlang:garbage_collect/{0,1,2}
Browse files Browse the repository at this point in the history
The /2 variant of this function depends on the implementation of system
tasks and internal RPC. This commit does not yet implement tests for
that infrastructure, which will come later.

Closes #152
  • Loading branch information
bitwalker committed Mar 13, 2023
1 parent 2163583 commit 9cab8a2
Show file tree
Hide file tree
Showing 17 changed files with 824 additions and 171 deletions.
6 changes: 6 additions & 0 deletions compiler/driver/src/compiler/passes/bytecode/lower_ssa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,12 @@ impl<'a> BytecodeBuilder<'a> {
let yielded = builder.build_bool(true, loc);
self.values.insert(result, yielded);
}
Opcode::GarbageCollect => {
builder.build_garbage_collect(loc);
let result = dfg.first_result(inst);
let success = builder.build_bool(true, loc);
self.values.insert(result, success);
}
other => unimplemented!("unrecognized primop: {}", other),
}

Expand Down
Loading

0 comments on commit 9cab8a2

Please sign in to comment.