Class: SyntaxTree::YARV::Disassembler::Squished
- Inherits:
-
Object
- Object
- SyntaxTree::YARV::Disassembler::Squished
- Defined in:
- lib/syntax_tree/yarv/disassembler.rb
Overview
This class is another object that handles disassembling a YARV instruction sequence but it renders it without any of the extra spacing or alignment.
Instance Method Summary collapse
- #calldata(value) ⇒ Object
- #enqueue(iseq) ⇒ Object
- #event(name) ⇒ Object
- #inline_storage(cache) ⇒ Object
- #instruction(name, operands = []) ⇒ Object
- #label(value) ⇒ Object
- #local(index) ⇒ Object
- #object(value) ⇒ Object
Instance Method Details
#calldata(value) ⇒ Object
10 11 12 |
# File 'lib/syntax_tree/yarv/disassembler.rb', line 10 def calldata(value) value.inspect end |
#enqueue(iseq) ⇒ Object
14 15 |
# File 'lib/syntax_tree/yarv/disassembler.rb', line 14 def enqueue(iseq) end |
#event(name) ⇒ Object
17 18 |
# File 'lib/syntax_tree/yarv/disassembler.rb', line 17 def event(name) end |
#inline_storage(cache) ⇒ Object
20 21 22 |
# File 'lib/syntax_tree/yarv/disassembler.rb', line 20 def inline_storage(cache) "<is:#{cache}>" end |
#instruction(name, operands = []) ⇒ Object
24 25 26 |
# File 'lib/syntax_tree/yarv/disassembler.rb', line 24 def instruction(name, operands = []) operands.empty? ? name : "#{name} #{operands.join(", ")}" end |
#label(value) ⇒ Object
28 29 30 |
# File 'lib/syntax_tree/yarv/disassembler.rb', line 28 def label(value) "%04d" % value.name["label_".length..] end |
#local(index) ⇒ Object
32 33 34 |
# File 'lib/syntax_tree/yarv/disassembler.rb', line 32 def local(index, **) index.inspect end |
#object(value) ⇒ Object
36 37 38 |
# File 'lib/syntax_tree/yarv/disassembler.rb', line 36 def object(value) value.inspect end |