authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-06-26 14:00:44-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-06-26 14:00:44-04:00
log33f996bb163568c9bb10e5044ed9df53599a917f
treec4e095935269530567e18442526e01de9aab2e73
parent32c6f643aef6a5cad8942c54689210d35b48245a
signaturelock-open Commit is signed but in an unrecognized format.

all tests passing on linux


5 files changed, 11 insertions(+), 7 deletions(-)

doc/langref.html.in+1-1
...@@ -5096,7 +5096,7 @@ fn gimmeTheBiggerInteger(a: u64, b: u64) u64 {...@@ -5096,7 +5096,7 @@ fn gimmeTheBiggerInteger(a: u64, b: u64) u64 {
5096 <p>5096 <p>
5097 For example, if we were to introduce another function to the above snippet:5097 For example, if we were to introduce another function to the above snippet:
5098 </p>5098 </p>
5099 {#code_begin|test_err|values of type 'type' must be comptime known#}5099 {#code_begin|test_err|cannot store runtime value in type 'type'#}
5100fn max(comptime T: type, a: T, b: T) T {5100fn max(comptime T: type, a: T, b: T) T {
5101 return if (a > b) a else b;5101 return if (a > b) a else b;
5102}5102}
src/all_types.hpp+3-2
...@@ -335,8 +335,9 @@ struct ConstExprValue {...@@ -335,8 +335,9 @@ struct ConstExprValue {
335 RuntimeHintSlice rh_slice;335 RuntimeHintSlice rh_slice;
336 } data;336 } data;
337337
338 ConstExprValue(const ConstExprValue &other) = delete; // plz zero initialize with {}338 // uncomment these to find bugs. can't leave them uncommented because of a gcc-9 warning
339 ConstExprValue& operator= (const ConstExprValue &other) = delete; // use copy_const_val339 //ConstExprValue(const ConstExprValue &other) = delete; // plz zero initialize with {}
340 //ConstExprValue& operator= (const ConstExprValue &other) = delete; // use copy_const_val
340};341};
341342
342enum ReturnKnowledge {343enum ReturnKnowledge {
src/codegen.cpp+3-1
...@@ -691,7 +691,9 @@ static ZigLLVMDIScope *get_di_scope(CodeGen *g, Scope *scope) {...@@ -691,7 +691,9 @@ static ZigLLVMDIScope *get_di_scope(CodeGen *g, Scope *scope) {
691 is_definition, scope_line, flags, is_optimized, nullptr);691 is_definition, scope_line, flags, is_optimized, nullptr);
692692
693 scope->di_scope = ZigLLVMSubprogramToScope(subprogram);693 scope->di_scope = ZigLLVMSubprogramToScope(subprogram);
694 ZigLLVMFnSetSubprogram(fn_llvm_value(g, fn_table_entry), subprogram);694 if (!g->strip_debug_symbols) {
695 ZigLLVMFnSetSubprogram(fn_llvm_value(g, fn_table_entry), subprogram);
696 }
695 return scope->di_scope;697 return scope->di_scope;
696 }698 }
697 case ScopeIdDecls:699 case ScopeIdDecls:
src/ir.cpp+3-1
...@@ -10726,6 +10726,8 @@ static ZigType *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_node, ZigT...@@ -10726,6 +10726,8 @@ static ZigType *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_node, ZigT
10726 } else if (prev_inst->value.type->id == ZigTypeIdOptional) {10726 } else if (prev_inst->value.type->id == ZigTypeIdOptional) {
10727 return prev_inst->value.type;10727 return prev_inst->value.type;
10728 } else {10728 } else {
10729 if ((err = type_resolve(ira->codegen, prev_inst->value.type, ResolveStatusSizeKnown)))
10730 return ira->codegen->builtin_types.entry_invalid;
10729 return get_optional_type(ira->codegen, prev_inst->value.type);10731 return get_optional_type(ira->codegen, prev_inst->value.type);
10730 }10732 }
10731 } else {10733 } else {
...@@ -21547,7 +21549,7 @@ static IrInstruction *ir_analyze_instruction_from_bytes(IrAnalyze *ira, IrInstru...@@ -21547,7 +21549,7 @@ static IrInstruction *ir_analyze_instruction_from_bytes(IrAnalyze *ira, IrInstru
2154721549
21548 IrInstruction *result_loc = ir_resolve_result(ira, &instruction->base, instruction->result_loc,21550 IrInstruction *result_loc = ir_resolve_result(ira, &instruction->base, instruction->result_loc,
21549 dest_slice_type, nullptr, true, false);21551 dest_slice_type, nullptr, true, false);
21550 if (type_is_invalid(result_loc->value.type) || instr_is_unreachable(result_loc)) {21552 if (result_loc != nullptr && (type_is_invalid(result_loc->value.type) || instr_is_unreachable(result_loc))) {
21551 return result_loc;21553 return result_loc;
21552 }21554 }
2155321555
std/event/lock.zig+1-2
...@@ -123,8 +123,7 @@ pub const Lock = struct {...@@ -123,8 +123,7 @@ pub const Lock = struct {
123};123};
124124
125test "std.event.Lock" {125test "std.event.Lock" {
126 // https://github.com/ziglang/zig/issues/2377126 if (builtin.single_threaded) return error.SkipZigTest;
127 //if (true) return error.SkipZigTest;
128127
129 const allocator = std.heap.direct_allocator;128 const allocator = std.heap.direct_allocator;
130129