hoshi-lang dev
Yet another programming language
Loading...
Searching...
No Matches
IRValueType Class Reference

#include <IR.h>

Collaboration diagram for IRValueType:

Public Types

enum class  ValueAttr : yoi::indexT {
  Nullable , Raw , PermanentInCurrentScope , Borrow ,
  NoBorrow
}
 
enum class  valueType : yoi::indexT {
  integerRaw = 0 , decimalRaw , booleanRaw , shortRaw ,
  unsignedRaw , characterObject , stringLiteral , structObject ,
  null , integerObject , booleanObject , decimalObject ,
  shortObject , unsignedObject , stringObject , virtualMethod ,
  pointerObject , pointer , interfaceObject , none ,
  charRaw , incompleteTemplateType , foreignInt32Type , foreignFloatType ,
  bracedInitalizerList , datastructObject
}
 

Public Member Functions

 IRValueType ()
 
 IRValueType (valueType type)
 
 IRValueType (valueType type, yoi::indexT typeAffiliateModule, yoi::indexT objectPrototypeIndex)
 
 IRValueType (valueType type, yoi::indexT typeAffiliateModule, yoi::indexT objectPrototypeIndex, const std::set< ValueAttr > &attributes)
 
 IRValueType (valueType type, const yoi::vec< yoi::indexT > &dimensions)
 
 IRValueType (valueType type, const yoi::vec< yoi::IRValueType > &bracedTypes)
 
 IRValueType (valueType type, yoi::indexT typeAffiliateModule, yoi::indexT objectPrototypeIndex, const yoi::vec< yoi::indexT > &dimensions)
 
bool isBasicType () const
 
bool isBasicRawType () const
 
bool isForeignBasicType () const
 
bool is1ByteType () const
 
bool isArrayType () const
 
bool isDynamicArrayType () const
 
IRValueType getNormalizedForeignBasicType ()
 
IRValueType getElementType ()
 
IRValueType getArrayType (const yoi::vec< yoi::indexT > &dimensions)
 
IRValueType getDynamicArrayType ()
 
IRValueType getBasicRawType () const
 
IRValueType getBasicObjectType () const
 
yoi::wstr to_string (bool showAttributes=false) const
 
bool operator== (const yoi::IRValueType &rhs) const
 
IRValueTypeaddAttribute (ValueAttr attr)
 
IRValueTyperemoveAttribute (ValueAttr attr)
 
bool hasAttribute (ValueAttr attr) const
 
yoi::indexT calculateDimensionSize () const
 

Public Attributes

enum yoi::IRValueType::valueType type
 
yoi::indexT typeAffiliateModule
 
yoi::indexT typeIndex
 
yoi::vec< yoi::indexTdimensions
 
yoi::vec< IRValueTypebracedTypes
 
std::set< ValueAttrattributes
 
IRMetadata metadata
 

Detailed Description

Definition at line 106 of file IR.h.

Member Enumeration Documentation

◆ ValueAttr

enum class ValueAttr : yoi::indexT
strong
Enumerator
Nullable 
Raw 
PermanentInCurrentScope 
Borrow 
NoBorrow 

Definition at line 108 of file IR.h.

◆ valueType

enum class valueType : yoi::indexT
strong
Enumerator
integerRaw 
decimalRaw 
booleanRaw 
shortRaw 
unsignedRaw 
characterObject 
stringLiteral 
structObject 
null 
integerObject 
booleanObject 
decimalObject 
shortObject 
unsignedObject 
stringObject 
virtualMethod 
pointerObject 
pointer 
interfaceObject 
none 
charRaw 
incompleteTemplateType 
foreignInt32Type 
foreignFloatType 
bracedInitalizerList 
datastructObject 

Definition at line 109 of file IR.h.

Constructor & Destructor Documentation

◆ IRValueType() [1/7]

Definition at line 1528 of file IR.cpp.

◆ IRValueType() [2/7]

Definition at line 626 of file IR.cpp.

◆ IRValueType() [3/7]

IRValueType ( IRValueType::valueType  type,
yoi::indexT  typeAffiliateModule,
yoi::indexT  objectPrototypeIndex 
)

Definition at line 623 of file IR.cpp.

◆ IRValueType() [4/7]

IRValueType ( valueType  type,
yoi::indexT  typeAffiliateModule,
yoi::indexT  objectPrototypeIndex,
const std::set< ValueAttr > &  attributes 
)

Definition at line 1366 of file IR.cpp.

◆ IRValueType() [5/7]

IRValueType ( valueType  type,
const yoi::vec< yoi::indexT > &  dimensions 
)

Definition at line 1098 of file IR.cpp.

◆ IRValueType() [6/7]

IRValueType ( valueType  type,
const yoi::vec< yoi::IRValueType > &  bracedTypes 
)

Definition at line 1611 of file IR.cpp.

◆ IRValueType() [7/7]

IRValueType ( valueType  type,
yoi::indexT  typeAffiliateModule,
yoi::indexT  objectPrototypeIndex,
const yoi::vec< yoi::indexT > &  dimensions 
)

Definition at line 1092 of file IR.cpp.

Member Function Documentation

◆ addAttribute()

IRValueType & addAttribute ( ValueAttr  attr)

Definition at line 1361 of file IR.cpp.

Referenced by LLVMCodegen::generateFunction(), and LLVMCodegen::generateInstruction().

Here is the caller graph for this function:

◆ calculateDimensionSize()

yoi::indexT calculateDimensionSize ( ) const

Definition at line 1625 of file IR.cpp.

◆ getArrayType()

IRValueType getArrayType ( const yoi::vec< yoi::indexT > &  dimensions)

◆ getBasicObjectType()

◆ getBasicRawType()

◆ getDynamicArrayType()

IRValueType getDynamicArrayType ( )

Definition at line 1331 of file IR.cpp.

◆ getElementType()

IRValueType getElementType ( )

◆ getNormalizedForeignBasicType()

◆ hasAttribute()

bool hasAttribute ( ValueAttr  attr) const

Definition at line 1352 of file IR.cpp.

◆ is1ByteType()

bool is1ByteType ( ) const

◆ isArrayType()

bool isArrayType ( ) const

Definition at line 1088 of file IR.cpp.

◆ isBasicRawType()

◆ isBasicType()

◆ isDynamicArrayType()

bool isDynamicArrayType ( ) const

Definition at line 1335 of file IR.cpp.

◆ isForeignBasicType()

bool isForeignBasicType ( ) const

◆ operator==()

bool operator== ( const yoi::IRValueType rhs) const

◆ removeAttribute()

IRValueType & removeAttribute ( ValueAttr  attr)

Definition at line 1356 of file IR.cpp.

◆ to_string()

Member Data Documentation

◆ attributes

std::set<ValueAttr> attributes

Definition at line 145 of file IR.h.

Referenced by IRValueType::to_string().

◆ bracedTypes

yoi::vec<IRValueType> bracedTypes

Definition at line 143 of file IR.h.

◆ dimensions

◆ metadata

IRMetadata metadata

Definition at line 147 of file IR.h.

Referenced by IRValueType::to_string().

◆ type

◆ typeAffiliateModule

◆ typeIndex


The documentation for this class was generated from the following files: