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

#include <IR.h>

Collaboration diagram for IRFunctionDefinition:

Classes

struct  Builder
 

Public Types

enum class  FunctionAttrs {
  AlwaysInline , BuiltinImplementation , NoFFI , Variadic ,
  Static , Constructor , Finalizer , Unreachable ,
  Preserve , NoRawAndNullOptimization , Intrinsic , Throws ,
  Generator
}
 

Public Member Functions

 IRFunctionDefinition (const yoi::wstr &name, const yoi::vec< std::pair< yoi::wstr, std::shared_ptr< IRValueType > > > &argumentTypes, const std::shared_ptr< IRValueType > &returnType, const yoi::vec< std::shared_ptr< IRCodeBlock > > &codeBlock, const std::set< FunctionAttrs > &attrs, const IRDebugInfo &debugInfo)
 
IRVariableTablegetVariableTable ()
 
yoi::wstr to_string (yoi::indexT indent=0)
 
bool hasAttribute (const FunctionAttrs &attr)
 

Public Attributes

yoi::wstr name
 
yoi::vec< std::shared_ptr< IRValueType > > argumentTypes
 
std::shared_ptr< IRValueTypereturnType
 
yoi::vec< std::shared_ptr< IRCodeBlock > > codeBlock
 
IRVariableTable variableTable
 
std::set< FunctionAttrsattrs
 
IRDebugInfo debugInfo
 
yoi::indexT linkedModuleId
 

Detailed Description

Definition at line 461 of file IR.h.

Member Enumeration Documentation

◆ FunctionAttrs

enum class FunctionAttrs
strong
Enumerator
AlwaysInline 
BuiltinImplementation 
NoFFI 
Variadic 
Static 
Constructor 
Finalizer 
Unreachable 
Preserve 
NoRawAndNullOptimization 
Intrinsic 
Throws 
Generator 

Definition at line 463 of file IR.h.

Constructor & Destructor Documentation

◆ IRFunctionDefinition()

IRFunctionDefinition ( const yoi::wstr name,
const yoi::vec< std::pair< yoi::wstr, std::shared_ptr< IRValueType > > > &  argumentTypes,
const std::shared_ptr< IRValueType > &  returnType,
const yoi::vec< std::shared_ptr< IRCodeBlock > > &  codeBlock,
const std::set< FunctionAttrs > &  attrs,
const IRDebugInfo debugInfo 
)

Definition at line 605 of file IR.cpp.

References IRFunctionDefinition::argumentTypes, IRVariableTable::createScope(), IRVariableTable::put(), and IRFunctionDefinition::variableTable.

Here is the call graph for this function:

Member Function Documentation

◆ getVariableTable()

IRVariableTable & getVariableTable ( )

Definition at line 619 of file IR.cpp.

References IRFunctionDefinition::variableTable.

Referenced by LLVMCodegen::generateFunction().

Here is the caller graph for this function:

◆ hasAttribute()

bool hasAttribute ( const FunctionAttrs attr)

Definition at line 1425 of file IR.cpp.

References IRFunctionDefinition::attrs.

◆ to_string()

yoi::wstr to_string ( yoi::indexT  indent = 0)

Member Data Documentation

◆ argumentTypes

◆ attrs

◆ codeBlock

yoi::vec<std::shared_ptr<IRCodeBlock> > codeBlock

Definition at line 482 of file IR.h.

Referenced by LLVMCodegen::generateFunction().

◆ debugInfo

IRDebugInfo debugInfo

Definition at line 485 of file IR.h.

Referenced by LLVMCodegen::generateFunction(), and IRFunctionDefinition::Builder::yield().

◆ linkedModuleId

yoi::indexT linkedModuleId

Definition at line 487 of file IR.h.

◆ name

◆ returnType

◆ variableTable


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