File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -587,7 +587,7 @@ impl DataFlowGraph {
587
587
/// Panics if the given instruction is not a (non-tail) call instruction.
588
588
pub fn append_user_stack_map_entry ( & mut self , inst : Inst , entry : UserStackMapEntry ) {
589
589
let opcode = self . insts [ inst] . opcode ( ) ;
590
- assert ! ( opcode. is_call ( ) && !opcode . is_return ( ) ) ;
590
+ assert ! ( opcode. is_safepoint ( ) ) ;
591
591
self . user_stack_maps . entry ( inst) . or_default ( ) . push ( entry) ;
592
592
}
593
593
}
Original file line number Diff line number Diff line change @@ -193,6 +193,14 @@ impl Opcode {
193
193
pub fn constraints ( self ) -> OpcodeConstraints {
194
194
OPCODE_CONSTRAINTS [ self as usize - 1 ]
195
195
}
196
+
197
+ /// Is this instruction a GC safepoint?
198
+ ///
199
+ /// Safepoints are all kinds of calls, except for tail calls.
200
+ #[ inline]
201
+ pub fn is_safepoint ( self ) -> bool {
202
+ self . is_call ( ) && !self . is_return ( )
203
+ }
196
204
}
197
205
198
206
// This trait really belongs in cranelift-reader where it is used by the `.clif` file parser, but since
You can’t perform that action at this time.
0 commit comments