Skip to content

Commit

Permalink
slight tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
csgordon committed Mar 16, 2022
1 parent 01d75a5 commit 623d1a8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ir441/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,13 @@ impl <'a> Memory<'a> {
VirtualVal::Data{val:trace_val} => Ok(trace_val)
}?;
if to_trace != 0 {
let moved_to = match self.trace(to_trace) {
Ok(moved_val) => moved_val,
Err(e) => return Err(e)
};
let moved_to = self.trace(to_trace)?;
self.mem_store(new_obj_base + i*8, VirtualVal::Data { val: moved_to })?;
if self.slot_cap.is_logging_gc() {
println!("Rewrote slot {} from {} to {}", i, orig, moved_to);
}
}
// No else for the 0 case is necessary, as slots are initialized to 0
} else {
// blind copy
self.mem_store(new_obj_base + i*8, orig)?;
Expand Down

0 comments on commit 623d1a8

Please sign in to comment.