@@ -252,19 +252,23 @@ def to_a
252252 dumped_options = argument_options . dup
253253 dumped_options [ :opt ] . map! ( &:name ) if dumped_options [ :opt ]
254254
255+ metadata = {
256+ arg_size : argument_size ,
257+ local_size : local_table . size ,
258+ stack_max : stack . maximum_size ,
259+ node_id : -1 ,
260+ node_ids : [ -1 ] * insns . length
261+ }
262+
263+ metadata [ :parser ] = :prism if RUBY_VERSION >= "3.3"
264+
255265 # Next, return the instruction sequence as an array.
256266 [
257267 MAGIC ,
258268 versions [ 0 ] ,
259269 versions [ 1 ] ,
260270 1 ,
261- {
262- arg_size : argument_size ,
263- local_size : local_table . size ,
264- stack_max : stack . maximum_size ,
265- node_id : -1 ,
266- node_ids : [ -1 ] * insns . length
267- } ,
271+ metadata ,
268272 name ,
269273 file ,
270274 "<compiled>" ,
@@ -689,6 +693,10 @@ def concatstrings(number)
689693 push ( ConcatStrings . new ( number ) )
690694 end
691695
696+ def concattoarray ( object )
697+ push ( ConcatToArray . new ( object ) )
698+ end
699+
692700 def defineclass ( name , class_iseq , flags )
693701 push ( DefineClass . new ( name , class_iseq , flags ) )
694702 end
@@ -897,6 +905,14 @@ def pop
897905 push ( Pop . new )
898906 end
899907
908+ def pushtoarraykwsplat
909+ push ( PushToArrayKwSplat . new )
910+ end
911+
912+ def putchilledstring ( object )
913+ push ( PutChilledString . new ( object ) )
914+ end
915+
900916 def putnil
901917 push ( PutNil . new )
902918 end
@@ -1079,6 +1095,8 @@ def self.from(source, options = Compiler::Options.new, parent_iseq = nil)
10791095 iseq . concatarray
10801096 when :concatstrings
10811097 iseq . concatstrings ( opnds [ 0 ] )
1098+ when :concattoarray
1099+ iseq . concattoarray ( opnds [ 0 ] )
10821100 when :defineclass
10831101 iseq . defineclass ( opnds [ 0 ] , from ( opnds [ 1 ] , options , iseq ) , opnds [ 2 ] )
10841102 when :defined
@@ -1191,8 +1209,13 @@ def self.from(source, options = Compiler::Options.new, parent_iseq = nil)
11911209 iseq . newarray ( opnds [ 0 ] )
11921210 iseq . send ( YARV . calldata ( :min ) )
11931211 when :opt_newarray_send
1212+ mid = opnds [ 1 ]
1213+ if RUBY_VERSION >= "3.4"
1214+ mid = %i[ max min hash pack pack_buffer include? ] [ mid - 1 ]
1215+ end
1216+
11941217 iseq . newarray ( opnds [ 0 ] )
1195- iseq . send ( CallData . new ( opnds [ 1 ] ) )
1218+ iseq . send ( CallData . new ( mid ) )
11961219 when :opt_neq
11971220 iseq . push (
11981221 OptNEq . new ( CallData . from ( opnds [ 0 ] ) , CallData . from ( opnds [ 1 ] ) )
@@ -1207,6 +1230,10 @@ def self.from(source, options = Compiler::Options.new, parent_iseq = nil)
12071230 iseq . send ( YARV . calldata ( :-@ ) )
12081231 when :pop
12091232 iseq . pop
1233+ when :pushtoarraykwsplat
1234+ iseq . pushtoarraykwsplat
1235+ when :putchilledstring
1236+ iseq . putchilledstring ( opnds [ 0 ] )
12101237 when :putnil
12111238 iseq . putnil
12121239 when :putobject
0 commit comments