Class: Whitespace::ISA::Instruction

Inherits:
Object
  • Object
show all
Defined in:
lib/whitespace/instructions/instruction.rb

Direct Known Subclasses

Binop, Call, Discard, Dup, End, Label, Njmp, Push, Putc, Putn, Readc, Readn, Retrieve, Return, Store, Swap, Ujmp, Zjmp

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vm) ⇒ Instruction

Returns a new instance of Instruction.



5
6
7
# File 'lib/whitespace/instructions/instruction.rb', line 5

def initialize(vm)
  @vm = vm
end

Instance Attribute Details

#vmObject (readonly)

Returns the value of attribute vm.



3
4
5
# File 'lib/whitespace/instructions/instruction.rb', line 3

def vm
  @vm
end

Instance Method Details

#executeObject

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/whitespace/instructions/instruction.rb', line 9

def execute
  raise NotImplementedError
end