Skip to content

Commit

Permalink
now checks for and panics on safepoint instructions, removed std dep
Browse files Browse the repository at this point in the history
  • Loading branch information
d-sonuga committed Aug 13, 2024
1 parent 5813060 commit feb1067
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/fastalloc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,9 @@ impl<'a, F: Function> Env<'a, F> {

fn alloc_inst(&mut self, block: Block, inst: Inst) -> Result<(), RegAllocError> {
trace!("Allocating instruction {:?}", inst);
if self.func.requires_refs_on_stack(inst) {
panic!("Safepoint instructions aren't supported");
}
if self.func.is_branch(inst) {
self.process_branch(block, inst);
}
Expand Down
2 changes: 1 addition & 1 deletion src/fastalloc/vregset.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use alloc::vec::Vec;
use alloc::vec;
use core::fmt;
use std::convert::{TryFrom, TryInto};
use core::convert::{TryFrom, TryInto};
use crate::{RegClass, VReg};

struct RegClassNum;
Expand Down

0 comments on commit feb1067

Please sign in to comment.