zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 708f153288ffa1aabb03c30b6a3a7898e27e92a0 (tree)
parent 0498bd40d9bb941454c9008c566a3599ea8f6f6b
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Thu, 20 Jun 2019 22:39:13 -0400

BRANCH_TODO file moved to the pull request comments

Diffstat:
DBRANCH_TODO | 23-----------------------
1 file changed, 0 insertions(+), 23 deletions(-)

diff --git a/BRANCH_TODO b/BRANCH_TODO @@ -1,23 +0,0 @@ -Scratch pad for stuff to do before merging master -================================================= - -labeled break from a block - -better behavior for implicit casts. for example these introduce an extra allocation/memcpy: - var x: [1]i32 = [_]i32{1}; - var x = ([1]i32)([_]i32{1}); -whereas this one does not: - var x = [_]i32{1}; -but all 3 should be semantically identical - - -This example has less than ideal LLVM IR: -```zig -export fn entry() void { - _ = mul(true, 1) catch undefined; -} -pub fn mul(c: bool, answer: i32) error{Overflow}!i32 { - return if (c) error.Overflow else answer; -} -``` -It creates an unnecessary stack variable.