Class: Whitespace::ISA::Dup
- Inherits:
-
Instruction
- Object
- Instruction
- Whitespace::ISA::Dup
- Defined in:
- lib/whitespace/instructions/stack_manipulation/dup.rb
Instance Attribute Summary
Attributes inherited from Instruction
Instance Method Summary collapse
Methods inherited from Instruction
Constructor Details
This class inherits a constructor from Whitespace::ISA::Instruction
Instance Method Details
#execute ⇒ Object
3 4 5 |
# File 'lib/whitespace/instructions/stack_manipulation/dup.rb', line 3 def execute vm.vstack.push vm.vstack.top end |