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

#include <TaggedValue.h>

Inheritance diagram for Runtime::Result:
Collaboration diagram for Runtime::Result:

Public Member Functions

 Result (I32 inI32)
 
 Result (I64 inI64)
 
 Result (U32 inU32)
 
 Result (U64 inU64)
 
 Result (F32 inF32)
 
 Result (F64 inF64)
 
 Result (IR::ResultType inType, UntaggedValue inValue)
 
 Result (const Value &inValue)
 
 Result ()=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::ResultType 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 Result &result)
 

Detailed Description

Definition at line 74 of file TaggedValue.h.

Constructor & Destructor Documentation

◆ Result() [1/9]

Runtime::Result::Result ( I32 inI32)
inline

Definition at line 78 of file TaggedValue.h.

◆ Result() [2/9]

Runtime::Result::Result ( I64 inI64)
inline

Definition at line 79 of file TaggedValue.h.

◆ Result() [3/9]

Runtime::Result::Result ( U32 inU32)
inline

Definition at line 80 of file TaggedValue.h.

◆ Result() [4/9]

Runtime::Result::Result ( U64 inU64)
inline

Definition at line 81 of file TaggedValue.h.

◆ Result() [5/9]

Runtime::Result::Result ( F32 inF32)
inline

Definition at line 82 of file TaggedValue.h.

◆ Result() [6/9]

Runtime::Result::Result ( F64 inF64)
inline

Definition at line 83 of file TaggedValue.h.

◆ Result() [7/9]

Runtime::Result::Result ( IR::ResultType inType,
UntaggedValue inValue )
inline

Definition at line 87 of file TaggedValue.h.

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

◆ Result() [8/9]

Runtime::Result::Result ( const Value & inValue)
inline

Definition at line 88 of file TaggedValue.h.

88: UntaggedValue(inValue), type(asResultType(inValue.type)) {}
ResultType asResultType(ValueType type)
Definition Types.h:186

◆ Result() [9/9]

Runtime::Result::Result ( )
delete

Friends And Related Symbol Documentation

◆ asString

std::string asString ( const Result & result)
friend

Definition at line 91 of file TaggedValue.h.

92 {
93 switch(result.type)
94 {
95 case IR::ResultType::none: return "()";
96 case IR::ResultType::i32: return "i32(" + std::to_string(result.i32) + ")";
97 case IR::ResultType::i64: return "i64(" + std::to_string(result.i64) + ")";
98 case IR::ResultType::f32: return "f32(" + Floats::asString(result.f32) + ")";
99 case IR::ResultType::f64: return "f64(" + Floats::asString(result.f64) + ")";
100 #if ENABLE_SIMD_PROTOTYPE
101 case IR::ResultType::v128: return "v128(" + std::to_string(result.v128.u64[0]) + "," + std::to_string(result.v128.u64[1]) + ")";
102 #endif
103 default: Errors::unreachable();
104 }
105 }
void unreachable()
Definition Errors.h:22
std::string asString(Float f)
Definition Floats.h:84

Member Data Documentation

◆ type

IR::ResultType Runtime::Result::type

Definition at line 76 of file TaggedValue.h.


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