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 {
50965096 <p>
50975097 For example, if we were to introduce another function to the above snippet:
50985098 </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'#}
51005100fn max(comptime T: type, a: T, b: T) T {
51015101 return if (a > b) a else b;
51025102}
src/all_types.hpp+3-2
......@@ -335,8 +335,9 @@ struct ConstExprValue {
335335 RuntimeHintSlice rh_slice;
336336 } data;
337337
338 ConstExprValue(const ConstExprValue &other) = delete; // plz zero initialize with {}
339 ConstExprValue& operator= (const ConstExprValue &other) = delete; // use copy_const_val
338 // uncomment these to find bugs. can't leave them uncommented because of a gcc-9 warning
339 //ConstExprValue(const ConstExprValue &other) = delete; // plz zero initialize with {}
340 //ConstExprValue& operator= (const ConstExprValue &other) = delete; // use copy_const_val
340341};
341342
342343enum ReturnKnowledge {
src/codegen.cpp+3-1
......@@ -691,7 +691,9 @@ static ZigLLVMDIScope *get_di_scope(CodeGen *g, Scope *scope) {
691691 is_definition, scope_line, flags, is_optimized, nullptr);
692692
693693 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 }
695697 return scope->di_scope;
696698 }
697699 case ScopeIdDecls:
src/ir.cpp+3-1
......@@ -10726,6 +10726,8 @@ static ZigType *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_node, ZigT
1072610726 } else if (prev_inst->value.type->id == ZigTypeIdOptional) {
1072710727 return prev_inst->value.type;
1072810728 } else {
10729 if ((err = type_resolve(ira->codegen, prev_inst->value.type, ResolveStatusSizeKnown)))
10730 return ira->codegen->builtin_types.entry_invalid;
1072910731 return get_optional_type(ira->codegen, prev_inst->value.type);
1073010732 }
1073110733 } else {
......@@ -21547,7 +21549,7 @@ static IrInstruction *ir_analyze_instruction_from_bytes(IrAnalyze *ira, IrInstru
2154721549
2154821550 IrInstruction *result_loc = ir_resolve_result(ira, &instruction->base, instruction->result_loc,
2154921551 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))) {
2155121553 return result_loc;
2155221554 }
2155321555
std/event/lock.zig+1-2
......@@ -123,8 +123,7 @@ pub const Lock = struct {
123123};
124124
125125test "std.event.Lock" {
126 // https://github.com/ziglang/zig/issues/2377
127 //if (true) return error.SkipZigTest;
126 if (builtin.single_threaded) return error.SkipZigTest;
128127
129128 const allocator = std.heap.direct_allocator;
130129