@@ -685,6 +685,7 @@ pub enum Insn {
685685 ArrayLength { array : InsnId } ,
686686
687687 HashAref { hash : InsnId , key : InsnId , state : InsnId } ,
688+ HashKeyP { hash : InsnId , key : InsnId , state : InsnId } ,
688689 HashDup { val : InsnId , state : InsnId } ,
689690
690691 /// Allocate an instance of the `val` object without calling `#initialize` on it.
@@ -1127,6 +1128,7 @@ impl<'a> std::fmt::Display for InsnPrinter<'a> {
11271128 Insn :: ArrayDup { val, .. } => { write ! ( f, "ArrayDup {val}" ) }
11281129 Insn :: HashDup { val, .. } => { write ! ( f, "HashDup {val}" ) }
11291130 Insn :: HashAref { hash, key, .. } => { write ! ( f, "HashAref {hash}, {key}" ) }
1131+ Insn :: HashKeyP { hash, key, .. } => { write ! ( f, "HashKeyP {hash}, {key}" ) }
11301132 Insn :: ObjectAlloc { val, .. } => { write ! ( f, "ObjectAlloc {val}" ) }
11311133 & Insn :: ObjectAllocClass { class, .. } => {
11321134 let class_name = get_class_name ( class) ;
@@ -1960,6 +1962,7 @@ impl Function {
19601962 & ArrayDup { val, state } => ArrayDup { val : find ! ( val) , state } ,
19611963 & HashDup { val, state } => HashDup { val : find ! ( val) , state } ,
19621964 & HashAref { hash, key, state } => HashAref { hash : find ! ( hash) , key : find ! ( key) , state } ,
1965+ & HashKeyP { hash, key, state } => HashKeyP { hash : find ! ( hash) , key : find ! ( key) , state } ,
19631966 & ObjectAlloc { val, state } => ObjectAlloc { val : find ! ( val) , state } ,
19641967 & ObjectAllocClass { class, state } => ObjectAllocClass { class, state : find ! ( state) } ,
19651968 & CCall { cfunc, recv, ref args, name, return_type, elidable } => CCall { cfunc, recv : find ! ( recv) , args : find_vec ! ( args) , name, return_type, elidable } ,
@@ -2096,6 +2099,7 @@ impl Function {
20962099 Insn :: ArrayPop { .. } => types:: BasicObject ,
20972100 Insn :: ArrayLength { .. } => types:: CInt64 ,
20982101 Insn :: HashAref { .. } => types:: BasicObject ,
2102+ Insn :: HashKeyP { .. } => types:: BoolExact ,
20992103 Insn :: NewHash { .. } => types:: HashExact ,
21002104 Insn :: HashDup { .. } => types:: HashExact ,
21012105 Insn :: NewRange { .. } => types:: RangeExact ,
@@ -3778,7 +3782,7 @@ impl Function {
37783782 & Insn :: ArrayLength { array } => {
37793783 worklist. push_back ( array) ;
37803784 }
3781- & Insn :: HashAref { hash, key, state } => {
3785+ & Insn :: HashAref { hash, key, state } | & Insn :: HashKeyP { hash , key , state } => {
37823786 worklist. push_back ( hash) ;
37833787 worklist. push_back ( key) ;
37843788 worklist. push_back ( state) ;
@@ -4471,6 +4475,7 @@ impl Function {
44714475 }
44724476 // Instructions with Hash operands
44734477 Insn :: HashAref { hash, .. } => self . assert_subtype ( insn_id, hash, types:: Hash ) ,
4478+ Insn :: HashKeyP { hash, .. } => self . assert_subtype ( insn_id, hash, types:: Hash ) ,
44744479 Insn :: HashDup { val, .. } => self . assert_subtype ( insn_id, val, types:: HashExact ) ,
44754480 // Other
44764481 Insn :: ObjectAllocClass { class, .. } => {
0 commit comments