Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
stack_elem.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <sysio/vm/opcodes.hpp>
4#include <sysio/vm/variant.hpp>
5
6#include <cstdint>
7
8namespace sysio { namespace vm {
9
10 class operand_stack_elem : public variant<i32_const_t, i64_const_t, f32_const_t, f64_const_t> {
11 public:
12 using variant<i32_const_t, i64_const_t, f32_const_t, f64_const_t>::variant;
13 inline int32_t& to_i32() & { return get<i32_const_t>().data.i; }
14 inline uint32_t& to_ui32() & { return get<i32_const_t>().data.ui; }
15 inline float& to_f32() & { return get<f32_const_t>().data.f; }
16 inline uint32_t& to_fui32() & { return get<f32_const_t>().data.ui; }
17
18 inline int64_t& to_i64() & { return get<i64_const_t>().data.i; }
19 inline uint64_t& to_ui64() & { return get<i64_const_t>().data.ui; }
20 inline double& to_f64() & { return get<f64_const_t>().data.f; }
21 inline uint64_t& to_fui64() & { return get<f64_const_t>().data.ui; }
22
23 inline int32_t to_i32() const & { return get<i32_const_t>().data.i; }
24 inline uint32_t to_ui32() const & { return get<i32_const_t>().data.ui; }
25 inline float to_f32() const & { return get<f32_const_t>().data.f; }
26 inline uint32_t to_fui32() const & { return get<f32_const_t>().data.ui; }
27
28 inline int64_t to_i64() const & { return get<i64_const_t>().data.i; }
29 inline uint64_t to_ui64() const & { return get<i64_const_t>().data.ui; }
30 inline double to_f64() const & { return get<f64_const_t>().data.f; }
31 inline uint64_t to_fui64() const & { return get<f64_const_t>().data.ui; }
32
33 };
34}} // nameo::vm
uint32_t to_ui32() const &
uint64_t to_ui64() const &
uint64_t to_fui64() const &
uint32_t to_fui32() const &
signed __int64 int64_t
Definition stdint.h:135
unsigned int uint32_t
Definition stdint.h:126
signed int int32_t
Definition stdint.h:123
unsigned __int64 uint64_t
Definition stdint.h:136