Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
IR::ObjectType Struct Reference

#include <Types.h>

Collaboration diagram for IR::ObjectType:

Public Member Functions

 ObjectType ()
 
 ObjectType (const FunctionType *inFunction)
 
 ObjectType (TableType inTable)
 
 ObjectType (MemoryType inMemory)
 
 ObjectType (GlobalType inGlobal)
 

Public Attributes

const ObjectKind kind
 

Friends

const FunctionTypeasFunctionType (const ObjectType &objectType)
 
TableType asTableType (const ObjectType &objectType)
 
MemoryType asMemoryType (const ObjectType &objectType)
 
GlobalType asGlobalType (const ObjectType &objectType)
 

Detailed Description

Definition at line 316 of file Types.h.

Constructor & Destructor Documentation

◆ ObjectType() [1/5]

IR::ObjectType::ObjectType ( )
inline

Definition at line 320 of file Types.h.

const ObjectKind kind
Definition Types.h:318

◆ ObjectType() [2/5]

IR::ObjectType::ObjectType ( const FunctionType * inFunction)
inline

Definition at line 321 of file Types.h.

321: kind(ObjectKind::function), function(inFunction) {}
const FunctionType * function
Definition Types.h:351

◆ ObjectType() [3/5]

IR::ObjectType::ObjectType ( TableType inTable)
inline

Definition at line 322 of file Types.h.

322: kind(ObjectKind::table), table(inTable) {}
TableType table
Definition Types.h:352

◆ ObjectType() [4/5]

IR::ObjectType::ObjectType ( MemoryType inMemory)
inline

Definition at line 323 of file Types.h.

323: kind(ObjectKind::memory), memory(inMemory) {}
MemoryType memory
Definition Types.h:353

◆ ObjectType() [5/5]

IR::ObjectType::ObjectType ( GlobalType inGlobal)
inline

Definition at line 324 of file Types.h.

324: kind(ObjectKind::global), global(inGlobal) {}
GlobalType global
Definition Types.h:354

Friends And Related Symbol Documentation

◆ asFunctionType

const FunctionType * asFunctionType ( const ObjectType & objectType)
friend

Definition at line 326 of file Types.h.

327 {
328 WAVM_ASSERT_THROW(objectType.kind == ObjectKind::function);
329 return objectType.function;
330 }
#define WAVM_ASSERT_THROW(cond)
Definition Errors.h:29

◆ asGlobalType

GlobalType asGlobalType ( const ObjectType & objectType)
friend

Definition at line 341 of file Types.h.

342 {
343 WAVM_ASSERT_THROW(objectType.kind == ObjectKind::global);
344 return objectType.global;
345 }

◆ asMemoryType

MemoryType asMemoryType ( const ObjectType & objectType)
friend

Definition at line 336 of file Types.h.

337 {
338 WAVM_ASSERT_THROW(objectType.kind == ObjectKind::memory);
339 return objectType.memory;
340 }

◆ asTableType

TableType asTableType ( const ObjectType & objectType)
friend

Definition at line 331 of file Types.h.

332 {
333 WAVM_ASSERT_THROW(objectType.kind == ObjectKind::table);
334 return objectType.table;
335 }

Member Data Documentation

◆ function

const FunctionType* IR::ObjectType::function

Definition at line 351 of file Types.h.

◆ global

GlobalType IR::ObjectType::global

Definition at line 354 of file Types.h.

◆ kind

const ObjectKind IR::ObjectType::kind

Definition at line 318 of file Types.h.

◆ memory

MemoryType IR::ObjectType::memory

Definition at line 353 of file Types.h.

◆ table

TableType IR::ObjectType::table

Definition at line 352 of file Types.h.


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