Class: Rubinius::InstructionSequence
- Defined in:
- lib/rubinius/bridge/iseq.rb
Instance Attribute Summary collapse
-
#opcodes ⇒ Object
readonly
Returns the value of attribute opcodes.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #[](idx) ⇒ Object
- #[]=(idx, val) ⇒ Object
-
#initialize(size) ⇒ InstructionSequence
constructor
A new instance of InstructionSequence.
- #size ⇒ Object
Constructor Details
#initialize(size) ⇒ InstructionSequence
Returns a new instance of InstructionSequence.
5 6 7 8 9 10 11 |
# File 'lib/rubinius/bridge/iseq.rb', line 5 def initialize(size) if size.kind_of? Tuple @opcodes = size else @opcodes = Tuple.new(size) end end |
Instance Attribute Details
#opcodes ⇒ Object (readonly)
Returns the value of attribute opcodes.
13 14 15 |
# File 'lib/rubinius/bridge/iseq.rb', line 13 def opcodes @opcodes end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 |
# File 'lib/rubinius/bridge/iseq.rb', line 15 def ==(other) other.kind_of?(InstructionSequence) and @opcodes == other.opcodes end |
#[](idx) ⇒ Object
23 24 25 |
# File 'lib/rubinius/bridge/iseq.rb', line 23 def [](idx) @opcodes[idx] end |
#[]=(idx, val) ⇒ Object
19 20 21 |
# File 'lib/rubinius/bridge/iseq.rb', line 19 def []=(idx, val) @opcodes[idx] = val end |
#size ⇒ Object
27 28 29 |
# File 'lib/rubinius/bridge/iseq.rb', line 27 def size @opcodes.size end |