compiler/lib/terror/instructions.rb
# Public: encodes an Instruction into a compact 32-bit format.
#
# Returns a String encoded in hexadecimal format.
encodes an Instruction into a compact 32-bit format.
Returns a String encoded in hexadecimal format.
encodes an Instruction into a compact 32 - bit format . Returns a String encoded in hexadecimal format .
def encode
        val = "#{self.class.value} #{name}"
        [val].tap do |ary|
          ary.push(a) if respond_to?(:a)
          ary.push(b) if respond_to?(:b)
        end
      end
def encode val = "#{self.class.value} #{name}" [ val ] . tap do | ary | ary . push ( a ) if respond_to? ( :a ) ary . push ( b ) if respond_to? ( :b ) end end
Public: encodes an Instruction into a compact 32-bit format.
Public : encodes an Instruction into a compact 32 - bit format .