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

#include <IR.h>

Collaboration diagram for IRFFITable:

Classes

class  ImportLibrary
 

Public Member Functions

yoi::indexT addImportedFunction (const yoi::wstr &libraryName, const yoi::wstr &functionName, const std::shared_ptr< IRFunctionDefinition > &functionDefinition)
 
void addForeignType (const yoi::wstr &foreignTypeName, const std::shared_ptr< IRValueType > &structType)
 
void addExportedFunction (const yoi::wstr &exportName, yoi::indexT moduleIndex, yoi::indexT functionIndex, const std::set< IRFunctionDefinition::FunctionAttrs > &attrs)
 Add an exported function to the FFI table.
 

Public Attributes

yoi::indexTable< yoi::wstr, std::tuple< yoi::indexT, yoi::indexT, std::set< IRFunctionDefinition::FunctionAttrs > > > exportedFunctionTable
 
yoi::indexTable< yoi::wstr, std::shared_ptr< IRValueType > > foreignTypeTable
 
yoi::indexTable< yoi::wstr, ImportLibraryimportedLibraries
 

Detailed Description

Definition at line 1095 of file IR.h.

Member Function Documentation

◆ addExportedFunction()

void addExportedFunction ( const yoi::wstr exportName,
yoi::indexT  moduleIndex,
yoi::indexT  functionIndex,
const std::set< IRFunctionDefinition::FunctionAttrs > &  attrs 
)

Add an exported function to the FFI table.

Parameters
exportNameThe name of the exported function.
moduleIndexModule index of the function.
functionIndexFunction index of the function.
attrsThe attributes of the function.
Exceptions
std::out_of_rangeIf the export name already exists in the FFI table.

Definition at line 1049 of file IR.cpp.

References IRFFITable::exportedFunctionTable, and indexTable< A, B >::put_create().

Here is the call graph for this function:

◆ addForeignType()

void addForeignType ( const yoi::wstr foreignTypeName,
const std::shared_ptr< IRValueType > &  structType 
)

Definition at line 1056 of file IR.cpp.

References IRFFITable::foreignTypeTable.

◆ addImportedFunction()

yoi::indexT addImportedFunction ( const yoi::wstr libraryName,
const yoi::wstr functionName,
const std::shared_ptr< IRFunctionDefinition > &  functionDefinition 
)

Definition at line 1039 of file IR.cpp.

References IRFFITable::importedLibraries.

Member Data Documentation

◆ exportedFunctionTable

yoi::indexTable<yoi::wstr, std::tuple<yoi::indexT, yoi::indexT, std::set<IRFunctionDefinition::FunctionAttrs> > > exportedFunctionTable

Definition at line 1106 of file IR.h.

Referenced by IRFFITable::addExportedFunction().

◆ foreignTypeTable

yoi::indexTable<yoi::wstr, std::shared_ptr<IRValueType> > foreignTypeTable

Definition at line 1108 of file IR.h.

Referenced by IRFFITable::addForeignType().

◆ importedLibraries

Definition at line 1110 of file IR.h.

Referenced by IRFFITable::addImportedFunction().


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