Class: WAG::Instruction::Local::Set

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WAG::Instructable

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

Constructor Details

#initialize(label) ⇒ Set

Returns a new instance of Set.



10
11
12
13
# File 'lib/wag/instructions/local/set.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/set.rb', line 8

def label
  @label
end

Instance Method Details

#to_sexprObject



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

def to_sexpr
  [name, label.to_sexpr]
end