Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Runtime::Value Struct Reference

#include <TaggedValue.h>

Inheritance diagram for Runtime::Value:
Collaboration diagram for Runtime::Value:

Public Member Functions

 Value (I32 inI32)
 
 Value (I64 inI64)
 
 Value (U32 inU32)
 
 Value (U64 inU64)
 
 Value (F32 inF32)
 
 Value (F64 inF64)
 
 Value (IR::ValueType inType, UntaggedValue inValue)
 
 Value ()=delete
 
- Public Member Functions inherited from Runtime::UntaggedValue
 UntaggedValue (I32 inI32)
 
 UntaggedValue (I64 inI64)
 
 UntaggedValue (U32 inU32)
 
 UntaggedValue (U64 inU64)
 
 UntaggedValue (F32 inF32)
 
 UntaggedValue (F64 inF64)
 
 UntaggedValue ()=delete
 

Public Attributes

IR::ValueType type
 
- Public Attributes inherited from Runtime::UntaggedValue
union { 
 
   I32   i32 
 
   U32   u32 
 
   I64   i64 
 
   U64   u64 
 
   F32   f32 
 
   F64   f64 
 
};  
 

Friends

std::string asString (const Value &value)
 

Detailed Description

Definition at line 41 of file TaggedValue.h.

Constructor & Destructor Documentation

◆ Value() [1/8]

Runtime::Value::Value ( I32 inI32)
inline

Definition at line 45 of file TaggedValue.h.

◆ Value() [2/8]

Runtime::Value::Value ( I64 inI64)
inline

Definition at line 46 of file TaggedValue.h.

◆ Value() [3/8]

Runtime::Value::Value ( U32 inU32)
inline

Definition at line 47 of file TaggedValue.h.

◆ Value() [4/8]

Runtime::Value::Value ( U64 inU64)
inline

Definition at line 48 of file TaggedValue.h.

◆ Value() [5/8]

Runtime::Value::Value ( F32 inF32)
inline

Definition at line 49 of file TaggedValue.h.

◆ Value() [6/8]

Runtime::Value::Value ( F64 inF64)
inline

Definition at line 50 of file TaggedValue.h.

◆ Value() [7/8]

Runtime::Value::Value ( IR::ValueType inType,
UntaggedValue inValue )
inline

Definition at line 54 of file TaggedValue.h.

54: UntaggedValue(inValue), type(inType) {}

◆ Value() [8/8]

Runtime::Value::Value ( )
delete

Friends And Related Symbol Documentation

◆ asString

std::string asString ( const Value & value)
friend

Definition at line 57 of file TaggedValue.h.

58 {
59 switch(value.type)
60 {
61 case IR::ValueType::i32: return "i32(" + std::to_string(value.i32) + ")";
62 case IR::ValueType::i64: return "i64(" + std::to_string(value.i64) + ")";
63 case IR::ValueType::f32: return "f32(" + Floats::asString(value.f32) + ")";
64 case IR::ValueType::f64: return "f64(" + Floats::asString(value.f64) + ")";
65 #if ENABLE_SIMD_PROTOTYPE
66 case IR::ValueType::v128: return "v128(" + std::to_string(value.v128.u64[0]) + "," + std::to_string(value.v128.u64[1]) + ")";
67 #endif
68 default: Errors::unreachable();
69 }
70 }
void unreachable()
Definition Errors.h:22
std::string asString(Float f)
Definition Floats.h:84
#define value
Definition pkcs11.h:157

Member Data Documentation

◆ type

IR::ValueType Runtime::Value::type

Definition at line 43 of file TaggedValue.h.


The documentation for this struct was generated from the following file: