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

Functions

LLVMValueRef codegen_stmt_program (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_expression (CodeGenContext *ctx, AstNode *node)
 
void add_symbol_with_element_type (CodeGenContext *ctx, const char *name, LLVMValueRef value, LLVMTypeRef type, LLVMTypeRef element_type, bool is_function)
 
void add_symbol_to_module_with_element_type (ModuleCompilationUnit *module, const char *name, LLVMValueRef value, LLVMTypeRef type, LLVMTypeRef element_type, bool is_function)
 
LLVMTypeRef extract_element_type_from_ast (CodeGenContext *ctx, AstNode *type_node)
 
LLVMValueRef codegen_stmt_var_decl (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_function (CodeGenContext *ctx, AstNode *node)
 
bool is_enum_constant (LLVM_Symbol *sym)
 
int64_t get_enum_constant_value (LLVM_Symbol *sym)
 
LLVMValueRef codegen_stmt_enum (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_return (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_block (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_if (CodeGenContext *ctx, AstNode *node)
 
bool is_range_type (LLVMTypeRef type)
 
LLVMValueRef get_range_start_value (CodeGenContext *ctx, LLVMValueRef range_struct)
 
LLVMValueRef get_range_end_value (CodeGenContext *ctx, LLVMValueRef range_struct)
 
LLVMValueRef codegen_stmt_print (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_defer (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_break_continue (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_infinite_loop (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_while_loop (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_for_loop (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_loop (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_switch (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_case_value (CodeGenContext *ctx, AstNode *case_value)
 
LLVMValueRef codegen_enum_member_case (CodeGenContext *ctx, AstNode *member_expr)
 
LLVMValueRef codegen_stmt_case (CodeGenContext *ctx, AstNode *node)
 
LLVMValueRef codegen_stmt_default (CodeGenContext *ctx, AstNode *node)
 

Function Documentation

◆ add_symbol_to_module_with_element_type()

void add_symbol_to_module_with_element_type ( ModuleCompilationUnit module,
const char *  name,
LLVMValueRef  value,
LLVMTypeRef  type,
LLVMTypeRef  element_type,
bool  is_function 
)

◆ add_symbol_with_element_type()

void add_symbol_with_element_type ( CodeGenContext ctx,
const char *  name,
LLVMValueRef  value,
LLVMTypeRef  type,
LLVMTypeRef  element_type,
bool  is_function 
)

◆ codegen_case_value()

LLVMValueRef codegen_case_value ( CodeGenContext ctx,
AstNode case_value 
)

◆ codegen_enum_member_case()

LLVMValueRef codegen_enum_member_case ( CodeGenContext ctx,
AstNode member_expr 
)

◆ codegen_for_loop()

LLVMValueRef codegen_for_loop ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_infinite_loop()

LLVMValueRef codegen_infinite_loop ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_loop()

LLVMValueRef codegen_loop ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_block()

LLVMValueRef codegen_stmt_block ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_break_continue()

LLVMValueRef codegen_stmt_break_continue ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_case()

LLVMValueRef codegen_stmt_case ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_default()

LLVMValueRef codegen_stmt_default ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_defer()

LLVMValueRef codegen_stmt_defer ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_enum()

LLVMValueRef codegen_stmt_enum ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_expression()

LLVMValueRef codegen_stmt_expression ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_function()

LLVMValueRef codegen_stmt_function ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_if()

LLVMValueRef codegen_stmt_if ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_print()

LLVMValueRef codegen_stmt_print ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_program()

LLVMValueRef codegen_stmt_program ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_return()

LLVMValueRef codegen_stmt_return ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_switch()

LLVMValueRef codegen_stmt_switch ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_stmt_var_decl()

LLVMValueRef codegen_stmt_var_decl ( CodeGenContext ctx,
AstNode node 
)

◆ codegen_while_loop()

LLVMValueRef codegen_while_loop ( CodeGenContext ctx,
AstNode node 
)

◆ extract_element_type_from_ast()

LLVMTypeRef extract_element_type_from_ast ( CodeGenContext ctx,
AstNode type_node 
)

◆ get_enum_constant_value()

int64_t get_enum_constant_value ( LLVM_Symbol sym)

◆ get_range_end_value()

LLVMValueRef get_range_end_value ( CodeGenContext ctx,
LLVMValueRef  range_struct 
)

◆ get_range_start_value()

LLVMValueRef get_range_start_value ( CodeGenContext ctx,
LLVMValueRef  range_struct 
)

◆ is_enum_constant()

bool is_enum_constant ( LLVM_Symbol sym)

◆ is_range_type()

bool is_range_type ( LLVMTypeRef  type)