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

Functions

StructInfofind_concrete_struct_for_base (CodeGenContext *ctx, StructInfo *base_info, const char *field_name)
 
StructInfofind_struct_type (CodeGenContext *ctx, const char *name)
 
void add_struct_type (CodeGenContext *ctx, StructInfo *struct_info)
 
int get_field_index (StructInfo *struct_info, const char *field_name)
 
bool is_field_access_allowed (CodeGenContext *ctx, StructInfo *struct_info, int field_index)
 
LLVMValueRef codegen_stmt_struct (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_struct_method (CodeGenContext *ctx, AstNode *func_node, StructInfo *struct_info, const char *method_name, bool is_public, bool is_static)
 
LLVMValueRef codegen_stmt_field (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_expr_struct_assignment (CodeGenContext *ctx, AstNode *node)
 
LLVMTypeRef codegen_type_struct (CodeGenContext *ctx, const char *struct_name)
 
LLVMValueRef codegen_struct_literal (CodeGenContext *ctx, const char *struct_name, LLVMValueRef *field_values, size_t field_count)
 

Function Documentation

◆ add_struct_type()

void add_struct_type ( CodeGenContext ctx,
StructInfo struct_info 
)

◆ codegen_expr_struct_assignment()

LLVMValueRef codegen_expr_struct_assignment ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_field()

LLVMValueRef codegen_stmt_field ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_struct()

LLVMValueRef codegen_stmt_struct ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_struct_literal()

LLVMValueRef codegen_struct_literal ( CodeGenContext ctx,
const char *  struct_name,
LLVMValueRef *  field_values,
size_t  field_count 
)

◆ codegen_struct_method()

LLVMValueRef codegen_struct_method ( CodeGenContext ctx,
AstNode func_node,
StructInfo struct_info,
const char *  method_name,
bool  is_public,
bool  is_static 
)

◆ codegen_type_struct()

LLVMTypeRef codegen_type_struct ( CodeGenContext ctx,
const char *  struct_name 
)

◆ find_concrete_struct_for_base()

StructInfo * find_concrete_struct_for_base ( CodeGenContext ctx,
StructInfo base_info,
const char *  field_name 
)

◆ find_struct_type()

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

◆ get_field_index()

int get_field_index ( StructInfo struct_info,
const char *  field_name 
)

◆ is_field_access_allowed()

bool is_field_access_allowed ( CodeGenContext ctx,
StructInfo struct_info,
int  field_index 
)