Class: WAG::Instruction::I64::Const

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WAG::Instructable

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

Constructor Details

#initialize(literal) ⇒ Const

Returns a new instance of Const.



10
11
12
13
# File 'lib/wag/instructions/i64/const.rb', line 10

def initialize(literal)
  @literal = literal.to_i
  super()
end

Instance Attribute Details

#literalObject (readonly)

Returns the value of attribute literal.



8
9
10
# File 'lib/wag/instructions/i64/const.rb', line 8

def literal
  @literal
end

Instance Method Details

#to_sexprObject



15
16
17
# File 'lib/wag/instructions/i64/const.rb', line 15

def to_sexpr
  [name, @literal]
end