@@ -336,7 +336,8 @@ fn inline_array_aref(fun: &mut hir::Function, block: hir::BlockId, recv: hir::In
336336 let length = fun. push_insn ( block, hir:: Insn :: ArrayLength { array : recv } ) ;
337337 let index = fun. push_insn ( block, hir:: Insn :: GuardLess { left : index, right : length, state } ) ;
338338 let zero = fun. push_insn ( block, hir:: Insn :: Const { val : hir:: Const :: CInt64 ( 0 ) } ) ;
339- let index = fun. push_insn ( block, hir:: Insn :: GuardGreaterEq { left : index, right : zero, state } ) ;
339+ use crate :: hir:: SideExitReason ;
340+ let index = fun. push_insn ( block, hir:: Insn :: GuardGreaterEq { left : index, right : zero, reason : SideExitReason :: GuardGreaterEq , state } ) ;
340341 let result = fun. push_insn ( block, hir:: Insn :: ArrayAref { array : recv, index } ) ;
341342 return Some ( result) ;
342343 }
@@ -359,7 +360,8 @@ fn inline_array_aset(fun: &mut hir::Function, block: hir::BlockId, recv: hir::In
359360 let length = fun. push_insn ( block, hir:: Insn :: ArrayLength { array : recv } ) ;
360361 let index = fun. push_insn ( block, hir:: Insn :: GuardLess { left : index, right : length, state } ) ;
361362 let zero = fun. push_insn ( block, hir:: Insn :: Const { val : hir:: Const :: CInt64 ( 0 ) } ) ;
362- let index = fun. push_insn ( block, hir:: Insn :: GuardGreaterEq { left : index, right : zero, state } ) ;
363+ use crate :: hir:: SideExitReason ;
364+ let index = fun. push_insn ( block, hir:: Insn :: GuardGreaterEq { left : index, right : zero, reason : SideExitReason :: GuardGreaterEq , state } ) ;
363365
364366 let _ = fun. push_insn ( block, hir:: Insn :: ArrayAset { array : recv, index, val } ) ;
365367 fun. push_insn ( block, hir:: Insn :: WriteBarrier { recv, val } ) ;
@@ -451,7 +453,8 @@ fn inline_string_getbyte(fun: &mut hir::Function, block: hir::BlockId, recv: hir
451453 // This is unlike most other guards.
452454 let unboxed_index = fun. push_insn ( block, hir:: Insn :: GuardLess { left : unboxed_index, right : len, state } ) ;
453455 let zero = fun. push_insn ( block, hir:: Insn :: Const { val : hir:: Const :: CInt64 ( 0 ) } ) ;
454- let _ = fun. push_insn ( block, hir:: Insn :: GuardGreaterEq { left : unboxed_index, right : zero, state } ) ;
456+ use crate :: hir:: SideExitReason ;
457+ let _ = fun. push_insn ( block, hir:: Insn :: GuardGreaterEq { left : unboxed_index, right : zero, reason : SideExitReason :: GuardGreaterEq , state } ) ;
455458 let result = fun. push_insn ( block, hir:: Insn :: StringGetbyte { string : recv, index : unboxed_index } ) ;
456459 return Some ( result) ;
457460 }
@@ -473,7 +476,8 @@ fn inline_string_setbyte(fun: &mut hir::Function, block: hir::BlockId, recv: hir
473476 } ) ;
474477 let unboxed_index = fun. push_insn ( block, hir:: Insn :: GuardLess { left : unboxed_index, right : len, state } ) ;
475478 let zero = fun. push_insn ( block, hir:: Insn :: Const { val : hir:: Const :: CInt64 ( 0 ) } ) ;
476- let _ = fun. push_insn ( block, hir:: Insn :: GuardGreaterEq { left : unboxed_index, right : zero, state } ) ;
479+ use crate :: hir:: SideExitReason ;
480+ let _ = fun. push_insn ( block, hir:: Insn :: GuardGreaterEq { left : unboxed_index, right : zero, reason : SideExitReason :: GuardGreaterEq , state } ) ;
477481 // We know that all String are HeapObject, so no need to insert a GuardType(HeapObject).
478482 fun. guard_not_frozen ( block, recv, state) ;
479483 let _ = fun. push_insn ( block, hir:: Insn :: StringSetbyteFixnum { string : recv, index, value } ) ;
0 commit comments