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 , WeakRef
}
 
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 114 of file IR.h.

Member Enumeration Documentation

◆ ValueAttr

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

Definition at line 116 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 117 of file IR.h.

Constructor & Destructor Documentation

◆ IRValueType() [1/7]

Definition at line 1530 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 1368 of file IR.cpp.

◆ IRValueType() [5/7]

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

Definition at line 1100 of file IR.cpp.

◆ IRValueType() [6/7]

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

Definition at line 1618 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 1094 of file IR.cpp.

Member Function Documentation

◆ addAttribute()

IRValueType & addAttribute ( ValueAttr  attr)

Definition at line 1363 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 1632 of file IR.cpp.

◆ getArrayType()

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

◆ getBasicObjectType()

◆ getBasicRawType()

◆ getDynamicArrayType()

IRValueType getDynamicArrayType ( )

Definition at line 1333 of file IR.cpp.

◆ getElementType()

IRValueType getElementType ( )

◆ getNormalizedForeignBasicType()

◆ hasAttribute()

bool hasAttribute ( ValueAttr  attr) const

Definition at line 1354 of file IR.cpp.

◆ is1ByteType()

bool is1ByteType ( ) const

◆ isArrayType()

bool isArrayType ( ) const

Definition at line 1090 of file IR.cpp.

◆ isBasicRawType()

◆ isBasicType()

◆ isDynamicArrayType()

bool isDynamicArrayType ( ) const

Definition at line 1337 of file IR.cpp.

◆ isForeignBasicType()

bool isForeignBasicType ( ) const

◆ operator==()

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

◆ removeAttribute()

IRValueType & removeAttribute ( ValueAttr  attr)

Definition at line 1358 of file IR.cpp.

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

Here is the caller graph for this function:

◆ to_string()

Member Data Documentation

◆ attributes

std::set<ValueAttr> attributes

Definition at line 153 of file IR.h.

Referenced by IRValueType::to_string().

◆ bracedTypes

yoi::vec<IRValueType> bracedTypes

Definition at line 151 of file IR.h.

◆ dimensions

◆ metadata

IRMetadata metadata

Definition at line 155 of file IR.h.

Referenced by IRValueType::to_string().

◆ type

◆ typeAffiliateModule

◆ typeIndex


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