<commit_before># depends on: class.rb array.rb

class InstructionSet
  # List of Rubinius machine opcodes
  # Each opcode consists of a hash identifying:
  #   - the opcode symbol,
  #   - an array of the arguments required by the opcode, which may be of types
  #     :int, :literal, :local, :block_local, :field, :primitive, :ip,
  #     :depth, or :cache
  # IMPORTANT: Do not change the order of opcodes! The position in this array
  # is the opcode's instuction bytecode.
  OpCodes = [
    {:opcode => :noop, :args => [], :stack => [0,0]},
    {:opcode => :push_nil, :args => [], :stack => [0,1]},
    {:opcode => :push_true, :args => [], :stack => [0,1]},
    {:opcode => :push_false, :args => [], :stack => [0,1]},
    {:opcode => :allocate, :args => [], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :set_class, :args => [], :stack => [2,1]},
    {:opcode => :store_field, :args => [], :stack => [3,1]},
    {:opcode => :push_int, :args => [:int], :stack => [0,1]},
    {:opcode => :fetch_field, :args => [], :stack => [2,1]},
    {:opcode => :send_primitive, :args => [:primitive, :int], :stack => [-121,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :push_context, :args => [], :stack => [0,1]},
    {:opcode => :push_literal, :args => [:literal], :stack => [0,1]},
    {:opcode => :push_self, :args => [], :stack => [0,1]},
    {:opcode => :goto, :args => [:ip], :stack => [0,0], :flow => :goto},
    {:opcode => :goto_if_false, :args => [:ip], :stack => [1,0], :flow => :goto},
    {:opcode => :goto_if_true, :args => [:ip], :stack => [1,0], :flow => :goto},
    {:opcode => :swap_stack, :args => [], :stack => [1,1]},
    {:opcode => :set_local, :args => [:local], :stack => [1,1]},
    {:opcode => :push_local, :args => [:local], :stack => [0,1]},
    {:opcode => :push_exception, :args => [], :stack => [0,1]},
    {:opcode => :make_array, :args => [:int], :stack => [-110,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :set_ivar, :args => [:literal], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :push_ivar, :args => [:literal], :stack => [0,1]},
    {:opcode => :goto_if_defined, :args => [:ip], :stack => [1,0],
      :flow => :goto},
    {:opcode => :push_const, :args => [:literal], :stack => [0,1]},
    {:opcode => :set_const, :args => [:literal], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :set_const_at, :args => [:literal], :stack => [2,0],
      :vm_flags => [:check_interrupts]},
    {:opcode => :find_const, :args => [:literal], :stack => [1,1]},
    {:opcode => :attach_method, :args => [:literal], :stack => [2,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :add_method, :args => [:literal], :stack => [2,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :open_class, :args => [:literal], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :open_class_under, :args => [:literal], :stack => [2,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :open_module, :args => [:literal], :stack => [0,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :open_module_under, :args => [:literal], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :unshift_tuple, :args => [], :stack => [1,2],
      :vm_flags => [:check_interrupts]},
    {:opcode => :cast_tuple, :args => [], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :make_rest, :args => [:int], :stack => [-110,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :dup_top, :args => [], :stack => [0,1]},
    {:opcode => :pop, :args => [], :stack => [1,0]},
    {:opcode => :ret, :args => [], :stack => [1,0], :flow => :return,
      :vm_flags => [:terminator]},
    {:opcode => :send_method, :args => [:literal], :stack => [1,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :send_stack, :args => [:literal, :int], :stack => [-121,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :send_stack_with_block, :args => [:literal, :int],
      :stack => [-122,1], :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :push_block, :args => [], :stack => [0,1]},
    {:opcode => :clear_exception, :args => [], :stack => [0,0]},
    {:opcode => :soft_return, :args => [], :stack => [1,0], :flow => :return,
      :vm_flags => [:terminator]},
    {:opcode => :caller_return, :args => [], :stack => [1,0], :flow => :return,
      :vm_flags => [:terminator]},
    {:opcode => :push_array, :args => [], :stack => [1,-999]},
    {:opcode => :cast_array, :args => [], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :make_hash, :args => [:int], :stack => [-210,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :raise_exc, :args => [], :stack => [1,0], :flow => :raise,
      :vm_flags => [:terminator]},
    {:opcode => :set_encloser, :args => [], :stack => [1,0]},
    {:opcode => :push_encloser, :args => [], :stack => [0,0]},
    {:opcode => :activate_method, :args => [:int], :stack => [-115,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :push_cpath_top, :args => [], :stack => [0,1]},
    {:opcode => :check_argcount, :args => [:int, :int], :stack => [0,0],
      :vm_flags => [:terminator]},
    {:opcode => :passed_arg, :args => [:int], :stack => [0,1]},
    {:opcode => :string_append, :args => [], :stack => [2,1],
     :vm_flags => [:check_interrupts]},
    {:opcode => :string_dup, :args => [], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :set_args, :args => [], :stack => [1,0]},
    {:opcode => :get_args, :args => [], :stack => [0,1]},
    {:opcode => :send_with_arg_register, :args => [:literal], :stack => [-132,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :cast_array_for_args, :args => [:int], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :send_super_stack_with_block,  :args => [:literal, :int],
      :stack => [-121,1], :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :push_my_field, :args => [:field], :stack => [0,1]},
    {:opcode => :store_my_field, :args => [:field], :stack => [1,1]},
    {:opcode => :open_metaclass, :args => [], :stack => [1,1]},
    {:opcode => :set_cache_index, :args => [:cache], :stack => [0,0]},
    {:opcode => :block_break, :args => [], :stack => [0,0], :flow => :return,
      :vm_flags => [:terminator]},
    {:opcode => :send_super_with_arg_register, :args => [:literal],
      :stack => [-131,1], :flow => :send},
    {:opcode => :meta_push_neg_1, :args => [], :stack => [0,1]},
    {:opcode => :meta_push_0, :args => [], :stack => [0,1]},
    {:opcode => :meta_push_1, :args => [], :stack => [0,1]},
    {:opcode => :meta_push_2, :args => [], :stack => [0,1]},
    {:opcode => :meta_send_stack_1, :args => [:literal], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_stack_2, :args => [:literal], :stack => [3,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_stack_3, :args => [:literal], :stack => [4,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_stack_4, :args => [:literal], :stack => [5,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_plus, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_minus, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_equal, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_lt, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_gt, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_tequal, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_nequal, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :push_local_depth, :args => [:depth, :block_local],
      :stack => [0,1]},
    {:opcode => :set_local_depth, :args => [:depth, :block_local],
      :stack => [1,1], :vm_flags => [:check_interrupts]},
    {:opcode => :create_block, :args => [:int], :stack => [3,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :send_off_stack, :args => [], :stack => [-133,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :locate_method, :args => [], :stack => [3,1]},
    {:opcode => :kind_of, :args => [], :stack => [2,1]},
    {:opcode => :instance_of, :args => [], :stack => [2,1]},
    {:opcode => :set_call_flags, :args => [:int], :stack => [0,0]},
    {:opcode => :yield_debugger, :args => [], :stack => [0,0],
      :vm_flags => [:check_interrupts]},
    {:opcode => :from_fp, :args => [:int], :stack => [0,1]},
    {:opcode => :set_local_from_fp, :args => [:local, :int], :stack => [0,0]},
    {:opcode => :make_rest_fp, :args => [:int], :stack => [0,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :allocate_stack, :args => [:int], :stack => [0,-110]},
    {:opcode => :deallocate_stack, :args => [:int], :stack => [-110,0]},
    {:opcode => :set_local_fp, :args => [:int], :stack => [1,1]},
    {:opcode => :get_local_fp, :args => [:int], :stack => [0,1]},
    {:opcode => :is_fixnum, :args => [], :stack => [1,1]},
    {:opcode => :is_symbol, :args => [], :stack => [1,1]},
    {:opcode => :is_nil, :args => [], :stack => [1,1]},
    {:opcode => :class, :args => [], :stack => [1,1]},
    {:opcode => :equal, :args => [], :stack => [2,1]},
    {:opcode => :sret, :args => [], :stack => [1,0], :flow => :return,
      :vm_flags => [:terminator]},
    {:opcode => :set_literal, :args => [:literal], :stack => [0,0]},
    {:opcode => :passed_blockarg, :args => [:int], :stack => [0,1]},
    {:opcode => :create_block2, :args => [], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :cast_for_single_block_arg, :args => [], :stack => [1,1]},
    {:opcode => :cast_for_multi_block_arg, :args => [], :stack => [1,1]},
    {:opcode => :set_call_info, :args => [:int, :cache], :stack => [0,0]},
    {:opcode => :check_serial, :args => [:literal, :int], :stack => [1,1]},
    {:opcode => :meta_send_call, :args => [:int], :stack => [1,1]}
  ]

  InstructionSize = 4

  class OpCode
    def initialize(opcode_info)
      @opcode_info = opcode_info
    end

    def opcode
      @opcode_info[:opcode]
    end

    def bytecode<commit_msg>Fix InstructionSet info for new opcode :meta_send_call<commit_after># depends on: class.rb array.rb

class InstructionSet
  # List of Rubinius machine opcodes
  # Each opcode consists of a hash identifying:
  #   - the opcode symbol,
  #   - an array of the arguments required by the opcode, which may be of types
  #     :int, :literal, :local, :block_local, :field, :primitive, :ip,
  #     :depth, or :cache
  #  - a 2 element array of codes indicating what changes the opcode makes to
  #    the stack. The first code identifies the number of operands popped from
  #    the stack, and the second the number of operands pushed back onto the
  #    stack. If the code is zero or a positive value, it is the exact number of
  #    operands pushed or popped. If the code is a negative value, it means the
  #    number of operands consumed/produced is calculated based on another
  #    value, and cannot be determined just from the opcode. Negative codes
  #    consist of 3-digits, where:
  #     - the first digit is a multiplier (normally 1, but make_hash has a value
  #       of 2);
  #     - the second digit is the where the arg to be multiplied comes from;
  #       1 = first opcode arg, 2 = second opcode arg, 3 = arg register;
  #     - the final digit is a constant number to be added to the result.
  #    The value -999 is a special value, indicating that the result cannot be
  #    calculated from the bytecode, since it is dependent on the number of
  #    items in an array that will be on the stack when the opcode is
  #    encountered.
  #  - if the opcode can change the flow of execution, it will have a :flow key,
  #    followed by a value indicating whether the opcode performs a :send, a
  #    :goto, or a :return.
  #  - an optional :vm_flags key whose value is an array of the vm_flags set
  #    by the opcode. These flags are used when generating the opcode logic in
  #    instructions.rb into C include files.
  #
  # IMPORTANT: Do not change the order of opcodes! The position in this array
  # is the opcode's instuction bytecode.
  OpCodes = [
    {:opcode => :noop, :args => [], :stack => [0,0]},
    {:opcode => :push_nil, :args => [], :stack => [0,1]},
    {:opcode => :push_true, :args => [], :stack => [0,1]},
    {:opcode => :push_false, :args => [], :stack => [0,1]},
    {:opcode => :allocate, :args => [], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :set_class, :args => [], :stack => [2,1]},
    {:opcode => :store_field, :args => [], :stack => [3,1]},
    {:opcode => :push_int, :args => [:int], :stack => [0,1]},
    {:opcode => :fetch_field, :args => [], :stack => [2,1]},
    {:opcode => :send_primitive, :args => [:primitive, :int], :stack => [-121,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :push_context, :args => [], :stack => [0,1]},
    {:opcode => :push_literal, :args => [:literal], :stack => [0,1]},
    {:opcode => :push_self, :args => [], :stack => [0,1]},
    {:opcode => :goto, :args => [:ip], :stack => [0,0], :flow => :goto},
    {:opcode => :goto_if_false, :args => [:ip], :stack => [1,0], :flow => :goto},
    {:opcode => :goto_if_true, :args => [:ip], :stack => [1,0], :flow => :goto},
    {:opcode => :swap_stack, :args => [], :stack => [1,1]},
    {:opcode => :set_local, :args => [:local], :stack => [1,1]},
    {:opcode => :push_local, :args => [:local], :stack => [0,1]},
    {:opcode => :push_exception, :args => [], :stack => [0,1]},
    {:opcode => :make_array, :args => [:int], :stack => [-110,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :set_ivar, :args => [:literal], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :push_ivar, :args => [:literal], :stack => [0,1]},
    {:opcode => :goto_if_defined, :args => [:ip], :stack => [1,0],
      :flow => :goto},
    {:opcode => :push_const, :args => [:literal], :stack => [0,1]},
    {:opcode => :set_const, :args => [:literal], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :set_const_at, :args => [:literal], :stack => [2,0],
      :vm_flags => [:check_interrupts]},
    {:opcode => :find_const, :args => [:literal], :stack => [1,1]},
    {:opcode => :attach_method, :args => [:literal], :stack => [2,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :add_method, :args => [:literal], :stack => [2,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :open_class, :args => [:literal], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :open_class_under, :args => [:literal], :stack => [2,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :open_module, :args => [:literal], :stack => [0,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :open_module_under, :args => [:literal], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :unshift_tuple, :args => [], :stack => [1,2],
      :vm_flags => [:check_interrupts]},
    {:opcode => :cast_tuple, :args => [], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :make_rest, :args => [:int], :stack => [-110,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :dup_top, :args => [], :stack => [0,1]},
    {:opcode => :pop, :args => [], :stack => [1,0]},
    {:opcode => :ret, :args => [], :stack => [1,0], :flow => :return,
      :vm_flags => [:terminator]},
    {:opcode => :send_method, :args => [:literal], :stack => [1,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :send_stack, :args => [:literal, :int], :stack => [-121,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :send_stack_with_block, :args => [:literal, :int],
      :stack => [-122,1], :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :push_block, :args => [], :stack => [0,1]},
    {:opcode => :clear_exception, :args => [], :stack => [0,0]},
    {:opcode => :soft_return, :args => [], :stack => [1,0], :flow => :return,
      :vm_flags => [:terminator]},
    {:opcode => :caller_return, :args => [], :stack => [1,0], :flow => :return,
      :vm_flags => [:terminator]},
    {:opcode => :push_array, :args => [], :stack => [1,-999]},
    {:opcode => :cast_array, :args => [], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :make_hash, :args => [:int], :stack => [-210,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :raise_exc, :args => [], :stack => [1,0], :flow => :raise,
      :vm_flags => [:terminator]},
    {:opcode => :set_encloser, :args => [], :stack => [1,0]},
    {:opcode => :push_encloser, :args => [], :stack => [0,0]},
    {:opcode => :activate_method, :args => [:int], :stack => [-115,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :push_cpath_top, :args => [], :stack => [0,1]},
    {:opcode => :check_argcount, :args => [:int, :int], :stack => [0,0],
      :vm_flags => [:terminator]},
    {:opcode => :passed_arg, :args => [:int], :stack => [0,1]},
    {:opcode => :string_append, :args => [], :stack => [2,1],
     :vm_flags => [:check_interrupts]},
    {:opcode => :string_dup, :args => [], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :set_args, :args => [], :stack => [1,0]},
    {:opcode => :get_args, :args => [], :stack => [0,1]},
    {:opcode => :send_with_arg_register, :args => [:literal], :stack => [-132,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :cast_array_for_args, :args => [:int], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :send_super_stack_with_block,  :args => [:literal, :int],
      :stack => [-121,1], :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :push_my_field, :args => [:field], :stack => [0,1]},
    {:opcode => :store_my_field, :args => [:field], :stack => [1,1]},
    {:opcode => :open_metaclass, :args => [], :stack => [1,1]},
    {:opcode => :set_cache_index, :args => [:cache], :stack => [0,0]},
    {:opcode => :block_break, :args => [], :stack => [0,0], :flow => :return,
      :vm_flags => [:terminator]},
    {:opcode => :send_super_with_arg_register, :args => [:literal],
      :stack => [-131,1], :flow => :send},
    {:opcode => :meta_push_neg_1, :args => [], :stack => [0,1]},
    {:opcode => :meta_push_0, :args => [], :stack => [0,1]},
    {:opcode => :meta_push_1, :args => [], :stack => [0,1]},
    {:opcode => :meta_push_2, :args => [], :stack => [0,1]},
    {:opcode => :meta_send_stack_1, :args => [:literal], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_stack_2, :args => [:literal], :stack => [3,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_stack_3, :args => [:literal], :stack => [4,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_stack_4, :args => [:literal], :stack => [5,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_plus, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_minus, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_equal, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_lt, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_gt, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_tequal, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :meta_send_op_nequal, :args => [], :stack => [2,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :push_local_depth, :args => [:depth, :block_local],
      :stack => [0,1]},
    {:opcode => :set_local_depth, :args => [:depth, :block_local],
      :stack => [1,1], :vm_flags => [:check_interrupts]},
    {:opcode => :create_block, :args => [:int], :stack => [3,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :send_off_stack, :args => [], :stack => [-133,1],
      :flow => :send, :vm_flags => [:check_interrupts]},
    {:opcode => :locate_method, :args => [], :stack => [3,1]},
    {:opcode => :kind_of, :args => [], :stack => [2,1]},
    {:opcode => :instance_of, :args => [], :stack => [2,1]},
    {:opcode => :set_call_flags, :args => [:int], :stack => [0,0]},
    {:opcode => :yield_debugger, :args => [], :stack => [0,0],
      :vm_flags => [:check_interrupts]},
    {:opcode => :from_fp, :args => [:int], :stack => [0,1]},
    {:opcode => :set_local_from_fp, :args => [:local, :int], :stack => [0,0]},
    {:opcode => :make_rest_fp, :args => [:int], :stack => [0,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :allocate_stack, :args => [:int], :stack => [0,-110]},
    {:opcode => :deallocate_stack, :args => [:int], :stack => [-110,0]},
    {:opcode => :set_local_fp, :args => [:int], :stack => [1,1]},
    {:opcode => :get_local_fp, :args => [:int], :stack => [0,1]},
    {:opcode => :is_fixnum, :args => [], :stack => [1,1]},
    {:opcode => :is_symbol, :args => [], :stack => [1,1]},
    {:opcode => :is_nil, :args => [], :stack => [1,1]},
    {:opcode => :class, :args => [], :stack => [1,1]},
    {:opcode => :equal, :args => [], :stack => [2,1]},
    {:opcode => :sret, :args => [], :stack => [1,0], :flow => :return,
      :vm_flags => [:terminator]},
    {:opcode => :set_literal, :args => [:literal], :stack => [0,0]},
    {:opcode => :passed_blockarg, :args => [:int], :stack => [0,1]},
    {:opcode => :create_block2, :args => [], :stack => [1,1],
      :vm_flags => [:check_interrupts]},
    {:opcode => :cast_for_single_block_arg, :args => [], :stack => [1,1]},
    {:opcode => :cast_for_multi_block_arg, :args => [], :stack => [1,1]},
    {:opcode => :set_call_info, :args => [:int, :cache], :stack => [0,0]},
    {:opcode => :check_serial, :args => [:literal, :int], :stack => [1,1]},
    {:opcode => :meta_send_call, :args => [:int], :stack => [-111,1],
      :flow => :send}
  ]

  InstructionSize = 4

  class OpCode
    def initialize(opcode_info)
      @opcode_info = opcode_info
    end

    def opcode
      @opcode_info[:opcode]
    end

    def bytecode
{'fraction_non_alphanumeric': 0.25725747314842773, 'fraction_numerical': 0.023638010611223743, 'mean_word_length': 3.6997770119602675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 854, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5352951', 'n_tokens_mistral': 8906, 'n_tokens_neox': 9050, 'n_words': 2019}