@@ -2968,17 +2968,8 @@ fn compute_bytecode_info(iseq: *const rb_iseq_t) -> BytecodeInfo {
29682968
29692969#[ derive( Debug , PartialEq , Clone , Copy ) ]
29702970pub enum CallType {
2971- Splat ,
29722971 BlockArg ,
2973- Kwarg ,
2974- KwSplat ,
29752972 Tailcall ,
2976- Super ,
2977- Zsuper ,
2978- OptSend ,
2979- KwSplatMut ,
2980- SplatMut ,
2981- Forwarding ,
29822973}
29832974
29842975#[ derive( Clone , Debug , PartialEq ) ]
@@ -2996,17 +2987,8 @@ fn num_locals(iseq: *const rb_iseq_t) -> usize {
29962987
29972988/// If we can't handle the type of send (yet), bail out.
29982989fn unknown_call_type ( flag : u32 ) -> Result < ( ) , CallType > {
2999- if ( flag & VM_CALL_KW_SPLAT_MUT ) != 0 { return Err ( CallType :: KwSplatMut ) ; }
3000- if ( flag & VM_CALL_ARGS_SPLAT_MUT ) != 0 { return Err ( CallType :: SplatMut ) ; }
3001- if ( flag & VM_CALL_ARGS_SPLAT ) != 0 { return Err ( CallType :: Splat ) ; }
3002- if ( flag & VM_CALL_KW_SPLAT ) != 0 { return Err ( CallType :: KwSplat ) ; }
30032990 if ( flag & VM_CALL_ARGS_BLOCKARG ) != 0 { return Err ( CallType :: BlockArg ) ; }
3004- if ( flag & VM_CALL_KWARG ) != 0 { return Err ( CallType :: Kwarg ) ; }
30052991 if ( flag & VM_CALL_TAILCALL ) != 0 { return Err ( CallType :: Tailcall ) ; }
3006- if ( flag & VM_CALL_SUPER ) != 0 { return Err ( CallType :: Super ) ; }
3007- if ( flag & VM_CALL_ZSUPER ) != 0 { return Err ( CallType :: Zsuper ) ; }
3008- if ( flag & VM_CALL_OPT_SEND ) != 0 { return Err ( CallType :: OptSend ) ; }
3009- if ( flag & VM_CALL_FORWARDING ) != 0 { return Err ( CallType :: Forwarding ) ; }
30102992 Ok ( ( ) )
30112993}
30122994
@@ -5126,7 +5108,9 @@ mod tests {
51265108 fn test@<compiled>:2:
51275109 bb0(v0:BasicObject, v1:BasicObject):
51285110 v6:ArrayExact = ToArray v1
5129- SideExit UnhandledCallType(Splat)
5111+ v8:BasicObject = SendWithoutBlock v0, :foo, v6
5112+ CheckInterrupts
5113+ Return v8
51305114 " ) ;
51315115 }
51325116
@@ -5151,7 +5135,9 @@ mod tests {
51515135 fn test@<compiled>:2:
51525136 bb0(v0:BasicObject, v1:BasicObject):
51535137 v5:Fixnum[1] = Const Value(1)
5154- SideExit UnhandledCallType(Kwarg)
5138+ v7:BasicObject = SendWithoutBlock v0, :foo, v5
5139+ CheckInterrupts
5140+ Return v7
51555141 " ) ;
51565142 }
51575143
@@ -5163,7 +5149,9 @@ mod tests {
51635149 assert_snapshot ! ( hir_string( "test" ) , @r"
51645150 fn test@<compiled>:2:
51655151 bb0(v0:BasicObject, v1:BasicObject):
5166- SideExit UnhandledCallType(KwSplat)
5152+ v6:BasicObject = SendWithoutBlock v0, :foo, v1
5153+ CheckInterrupts
5154+ Return v6
51675155 " ) ;
51685156 }
51695157
@@ -5252,7 +5240,9 @@ mod tests {
52525240 v13:StaticSymbol[:b] = Const Value(VALUE(0x1008))
52535241 v14:Fixnum[1] = Const Value(1)
52545242 v16:BasicObject = SendWithoutBlock v12, :core#hash_merge_ptr, v11, v13, v14
5255- SideExit UnhandledCallType(KwSplatMut)
5243+ v18:BasicObject = SendWithoutBlock v0, :foo, v16
5244+ CheckInterrupts
5245+ Return v18
52565246 " ) ;
52575247 }
52585248
@@ -5267,7 +5257,9 @@ mod tests {
52675257 v6:ArrayExact = ToNewArray v1
52685258 v7:Fixnum[1] = Const Value(1)
52695259 ArrayPush v6, v7
5270- SideExit UnhandledCallType(SplatMut)
5260+ v11:BasicObject = SendWithoutBlock v0, :foo, v6
5261+ CheckInterrupts
5262+ Return v11
52715263 " ) ;
52725264 }
52735265
@@ -7863,7 +7855,9 @@ mod opt_tests {
78637855 fn test@<compiled>:3:
78647856 bb0(v0:BasicObject):
78657857 v4:Fixnum[1] = Const Value(1)
7866- SideExit UnhandledCallType(Kwarg)
7858+ v6:BasicObject = SendWithoutBlock v0, :foo, v4
7859+ CheckInterrupts
7860+ Return v6
78677861 " ) ;
78687862 }
78697863
@@ -7879,7 +7873,9 @@ mod opt_tests {
78797873 fn test@<compiled>:3:
78807874 bb0(v0:BasicObject):
78817875 v4:Fixnum[1] = Const Value(1)
7882- SideExit UnhandledCallType(Kwarg)
7876+ v6:BasicObject = SendWithoutBlock v0, :foo, v4
7877+ CheckInterrupts
7878+ Return v6
78837879 " ) ;
78847880 }
78857881
0 commit comments