Class: WAG::Instruction::Local::Get

Inherits:
Object
  • Object
show all
Includes:
WAG::Instructable
Defined in:
lib/wag/instructions/local/get.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WAG::Instructable

#f32, #f64, #i32, #i64, #local, #memory

Constructor Details

#initialize(label) ⇒ Get

Returns a new instance of Get.



10
11
12
13
# File 'lib/wag/instructions/local/get.rb', line 10

def initialize(label)
  @label = WAG::Label.from(label)
  super()
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



8
9
10
# File 'lib/wag/instructions/local/get.rb', line 8

def label
  @label
end

Instance Method Details

#to_sexprObject



15
16
17
# File 'lib/wag/instructions/local/get.rb', line 15

def to_sexpr
  [name, label.to_sexpr]
end