@@ -263,7 +263,8 @@ def to_a
263263 local_size : local_table . size ,
264264 stack_max : stack . maximum_size ,
265265 node_id : -1 ,
266- node_ids : [ -1 ] * insns . length
266+ node_ids : [ -1 ] * insns . length ,
267+ parser : :prism
267268 } ,
268269 name ,
269270 file ,
@@ -689,6 +690,10 @@ def concatstrings(number)
689690 push ( ConcatStrings . new ( number ) )
690691 end
691692
693+ def concattoarray ( object )
694+ push ( ConcatToArray . new ( object ) )
695+ end
696+
692697 def defineclass ( name , class_iseq , flags )
693698 push ( DefineClass . new ( name , class_iseq , flags ) )
694699 end
@@ -897,6 +902,14 @@ def pop
897902 push ( Pop . new )
898903 end
899904
905+ def pushtoarraykwsplat
906+ push ( PushToArrayKwSplat . new )
907+ end
908+
909+ def putchilledstring ( object )
910+ push ( PutChilledString . new ( object ) )
911+ end
912+
900913 def putnil
901914 push ( PutNil . new )
902915 end
@@ -1079,6 +1092,8 @@ def self.from(source, options = Compiler::Options.new, parent_iseq = nil)
10791092 iseq . concatarray
10801093 when :concatstrings
10811094 iseq . concatstrings ( opnds [ 0 ] )
1095+ when :concattoarray
1096+ iseq . concattoarray ( opnds [ 0 ] )
10821097 when :defineclass
10831098 iseq . defineclass ( opnds [ 0 ] , from ( opnds [ 1 ] , options , iseq ) , opnds [ 2 ] )
10841099 when :defined
@@ -1191,8 +1206,13 @@ def self.from(source, options = Compiler::Options.new, parent_iseq = nil)
11911206 iseq . newarray ( opnds [ 0 ] )
11921207 iseq . send ( YARV . calldata ( :min ) )
11931208 when :opt_newarray_send
1209+ mid = opnds [ 1 ]
1210+ if RUBY_VERSION >= "3.4"
1211+ mid = %i[ max min hash pack pack_buffer include? ] [ mid - 1 ]
1212+ end
1213+
11941214 iseq . newarray ( opnds [ 0 ] )
1195- iseq . send ( CallData . new ( opnds [ 1 ] ) )
1215+ iseq . send ( CallData . new ( mid ) )
11961216 when :opt_neq
11971217 iseq . push (
11981218 OptNEq . new ( CallData . from ( opnds [ 0 ] ) , CallData . from ( opnds [ 1 ] ) )
@@ -1207,6 +1227,10 @@ def self.from(source, options = Compiler::Options.new, parent_iseq = nil)
12071227 iseq . send ( YARV . calldata ( :-@ ) )
12081228 when :pop
12091229 iseq . pop
1230+ when :pushtoarraykwsplat
1231+ iseq . pushtoarraykwsplat
1232+ when :putchilledstring
1233+ iseq . putchilledstring ( opnds [ 0 ] )
12101234 when :putnil
12111235 iseq . putnil
12121236 when :putobject
0 commit comments