Luma 0.1.0
A low-level compiled alternative to C, C++, and more!
Loading...
Searching...
No Matches
Functions
module_handles.c File Reference
#include "../llvm.h"
#include "../../c_libs/memory/memory.h"
#include <stdlib.h>
Include dependency graph for module_handles.c:

Functions

unsigned int hash_string (const char *str)
 
void init_symbol_cache (void)
 
void cache_symbol (const char *module_name, const char *symbol_name, LLVM_Symbol *symbol)
 
LLVM_Symbollookup_cached_symbol (const char *module_name, const char *symbol_name)
 
void init_struct_cache (void)
 
void cache_struct (const char *name, StructInfo *info)
 
StructInfolookup_cached_struct (const char *name)
 
StructInfofind_struct_type_fast (CodeGenContext *ctx, const char *name)
 
void preprocess_all_modules (CodeGenContext *ctx)
 
void cleanup_module_caches (void)
 
ModuleDependencyInfobuild_codegen_dependency_info (AstNode **modules, size_t module_count, ArenaAllocator *arena)
 
LLVMValueRef codegen_stmt_program_multi_module (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_module (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_use (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_os (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_link (CodeGenContext *ctx, AstNode *node)
 
void import_module_symbols (CodeGenContext *ctx, ModuleCompilationUnit *source_module, const char *alias)
 
void import_function_symbol (CodeGenContext *ctx, LLVM_Symbol *source_symbol, ModuleCompilationUnit *source_module, const char *alias)
 
void import_variable_symbol (CodeGenContext *ctx, LLVM_Symbol *source_symbol, ModuleCompilationUnit *source_module, const char *alias)
 
LLVMValueRef codegen_expr_member_access (CodeGenContext *ctx, AstNode *node)
 
LLVM_Symbolfind_symbol_with_module_support (CodeGenContext *ctx, const char *name)
 
bool is_main_module (ModuleCompilationUnit *unit)
 
void set_module_as_main (ModuleCompilationUnit *unit)
 
void print_module_info (CodeGenContext *ctx)
 
void debug_object_files (const char *output_dir)
 

Function Documentation

◆ build_codegen_dependency_info()

ModuleDependencyInfo * build_codegen_dependency_info ( AstNode **  modules,
size_t  module_count,
ArenaAllocator arena 
)

◆ cache_struct()

void cache_struct ( const char *  name,
StructInfo info 
)

◆ cache_symbol()

void cache_symbol ( const char *  module_name,
const char *  symbol_name,
LLVM_Symbol symbol 
)

◆ cleanup_module_caches()

void cleanup_module_caches ( void  )

◆ codegen_expr_member_access()

LLVMValueRef codegen_expr_member_access ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_link()

LLVMValueRef codegen_stmt_link ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_module()

LLVMValueRef codegen_stmt_module ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_os()

LLVMValueRef codegen_stmt_os ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_program_multi_module()

LLVMValueRef codegen_stmt_program_multi_module ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_use()

LLVMValueRef codegen_stmt_use ( CodeGenContext ctx,
AstNode node 
)

◆ debug_object_files()

void debug_object_files ( const char *  output_dir)

◆ find_struct_type_fast()

StructInfo * find_struct_type_fast ( CodeGenContext ctx,
const char *  name 
)

◆ find_symbol_with_module_support()

LLVM_Symbol * find_symbol_with_module_support ( CodeGenContext ctx,
const char *  name 
)

◆ hash_string()

unsigned int hash_string ( const char *  str)

◆ import_function_symbol()

void import_function_symbol ( CodeGenContext ctx,
LLVM_Symbol source_symbol,
ModuleCompilationUnit source_module,
const char *  alias 
)

◆ import_module_symbols()

void import_module_symbols ( CodeGenContext ctx,
ModuleCompilationUnit source_module,
const char *  alias 
)

◆ import_variable_symbol()

void import_variable_symbol ( CodeGenContext ctx,
LLVM_Symbol source_symbol,
ModuleCompilationUnit source_module,
const char *  alias 
)

◆ init_struct_cache()

void init_struct_cache ( void  )

◆ init_symbol_cache()

void init_symbol_cache ( void  )

◆ is_main_module()

bool is_main_module ( ModuleCompilationUnit unit)

◆ lookup_cached_struct()

StructInfo * lookup_cached_struct ( const char *  name)

◆ lookup_cached_symbol()

LLVM_Symbol * lookup_cached_symbol ( const char *  module_name,
const char *  symbol_name 
)

◆ preprocess_all_modules()

void preprocess_all_modules ( CodeGenContext ctx)

◆ print_module_info()

void print_module_info ( CodeGenContext ctx)

◆ set_module_as_main()

void set_module_as_main ( ModuleCompilationUnit unit)