Class: Crabstone::WASM::Operand

Inherits:
FFI::Struct
  • Object
show all
Includes:
Extension::Operand
Defined in:
lib/crabstone/arch/5/wasm.rb

Instance Method Summary collapse

Methods included from Extension::Operand

#valid?, #value

Instance Method Details

#brtable?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/crabstone/arch/5/wasm.rb', line 67

def brtable?
  self[:type] == OP_BRTABLE
end

#int7?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/crabstone/arch/5/wasm.rb', line 41

def int7?
  self[:type] == OP_INT7
end

#uint32?Boolean

Returns:

  • (Boolean)


53
54
55
56
57
58
# File 'lib/crabstone/arch/5/wasm.rb', line 53

def uint32?
  [
    OP_VARUINT32,
    OP_UINT32
  ].include?(self[:type])
end

#uint64?Boolean

Returns:

  • (Boolean)


60
61
62
63
64
65
# File 'lib/crabstone/arch/5/wasm.rb', line 60

def uint64?
  [
    OP_VARUINT64,
    OP_UINT64
  ].include?(self[:type])
end

#varuint32?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/crabstone/arch/5/wasm.rb', line 45

def varuint32?
  self[:type] == OP_VARUINT32
end

#varuint64?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/crabstone/arch/5/wasm.rb', line 49

def varuint64?
  self[:type] == OP_VARUINT64
end