Compare commits

..

No commits in common. "adfce1d43e8d3e75de0b2bca07f12c00d2c842ec" and "81fd0aebfd1865578ada88ed72934f2268bac957" have entirely different histories.

2 changed files with 59 additions and 980 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5172,7 +5172,7 @@ fn SliceEmitResult emit_string_literal(Module* module, Value* value)
LLVMThreadLocalMode tlm = LLVMNotThreadLocal; LLVMThreadLocalMode tlm = LLVMNotThreadLocal;
bool externally_initialized = false; bool externally_initialized = false;
u32 alignment = 1; u32 alignment = 1;
auto global = llvm_create_global_variable(module->llvm.module, string_type, is_constant, LLVMInternalLinkage, constant_string, string_literal("const.string"), tlm, externally_initialized, alignment, LLVMGlobalUnnamedAddr); auto global = llvm_create_global_variable(module->llvm.module, string_type, is_constant, LLVMInternalLinkage, constant_string, string_literal("conststring"), tlm, externally_initialized, alignment, LLVMGlobalUnnamedAddr);
return { global, LLVMConstInt(uint64(module)->llvm.abi, length, false) }; return { global, LLVMConstInt(uint64(module)->llvm.abi, length, false) };
} break; } break;
@ -7372,6 +7372,9 @@ fn void emit_value(Module* module, Value* value, TypeKind type_kind, bool expect
auto* left = value->binary.left; auto* left = value->binary.left;
auto llvm_function = module->current_function->variable.storage->llvm;
assert(llvm_function);
auto* right_block = LLVMAppendBasicBlockInContext(module->llvm.context, llvm_function, "shortcircuit.right"); auto* right_block = LLVMAppendBasicBlockInContext(module->llvm.context, llvm_function, "shortcircuit.right");
auto* end_block = LLVMAppendBasicBlockInContext(module->llvm.context, llvm_function, "shortcircuit.end"); auto* end_block = LLVMAppendBasicBlockInContext(module->llvm.context, llvm_function, "shortcircuit.end");
@ -7437,6 +7440,7 @@ fn void emit_value(Module* module, Value* value, TypeKind type_kind, bool expect
resolve_type_in_place(module, boolean_type); resolve_type_in_place(module, boolean_type);
auto boolean = boolean_type->llvm.abi; auto boolean = boolean_type->llvm.abi;
LLVMValueRef incoming_left = 0; LLVMValueRef incoming_left = 0;
switch (shorcircuiting_op) switch (shorcircuiting_op)
@ -8944,8 +8948,6 @@ fn void analyze_statement(Module* module, Scope* scope, Statement* statement, u3
} }
} }
assert(!local);
analyze_statement(module, &statement->for_each.scope, statement->for_each.predicate, last_line, last_column, last_debug_location); analyze_statement(module, &statement->for_each.scope, statement->for_each.predicate, last_line, last_column, last_debug_location);
if (LLVMGetInsertBlock(module->llvm.builder)) if (LLVMGetInsertBlock(module->llvm.builder))