Class: WAG::Instruction::Block

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

Instance Method Summary collapse

Methods included from WAG::Instructable

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

Instance Method Details

#result(*types) ⇒ Object



8
9
10
11
12
# File 'lib/wag/instructions/block.rb', line 8

def result(*types)
  return @result if types.empty?

  @result = WAG::Result.new(*types)
end

#to_sexprObject



14
15
16
17
18
# File 'lib/wag/instructions/block.rb', line 14

def to_sexpr
  return [name, @result.to_sexpr] if @result

  name
end