diff --git a/src/fastalloc/mod.rs b/src/fastalloc/mod.rs index 17699db2..60e19f89 100644 --- a/src/fastalloc/mod.rs +++ b/src/fastalloc/mod.rs @@ -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); } diff --git a/src/fastalloc/vregset.rs b/src/fastalloc/vregset.rs index 0eaa2d79..8f261eb0 100644 --- a/src/fastalloc/vregset.rs +++ b/src/fastalloc/vregset.rs @@ -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;