Commit Graph

5366 Commits

Author SHA1 Message Date
Andrew Kelley
6c195ede54
add test case for defer modifying return value before returned
See #961
2019-06-26 23:25:53 -04:00
Andrew Kelley
01ff0d4d62
Merge pull request #2602 from ziglang/copy-elision-3
result location mechanism (part of no-copy semantics)
2019-06-26 18:29:19 -04:00
Andrew Kelley
517bdea754
fix incorrectly omitting variable declarations
in non-debug modes
2019-06-26 16:27:24 -04:00
Andrew Kelley
3085d29af8
Merge remote-tracking branch 'origin/master' into copy-elision-3 2019-06-26 14:44:01 -04:00
Andrew Kelley
5cd4753bea add missing error code for DeleteFileW 2019-06-26 14:32:19 -04:00
Andrew Kelley
33f996bb16
all tests passing on linux 2019-06-26 14:00:44 -04:00
Luna
07c0d484ee net: quickfix on non-existing Address.family 2019-06-26 13:24:51 -04:00
Andrew Kelley
32c6f643ae
disable building self hosted compiler in test suite
Rather than fixing regressions with deprecated coroutines, I'm going
to let them regress more until #2377 is solved.
2019-06-26 12:42:08 -04:00
Andrew Kelley
ff737cc648
fix peer type resolution: unreachable, error set, unreachable 2019-06-26 12:31:51 -04:00
Vexu
fa42c99d82 fixed IfTypeExpr parsing 2019-06-26 11:04:34 -04:00
Andrew Kelley
e79e8993e6
Merge pull request #2750 from cartr/thumbv4-aeabi
compiler-rt: Support thumb versions older than armv6
2019-06-26 11:03:42 -04:00
Carter Sande
f9e26d9871 compiler-rt: use more idiomatic switch syntax 2019-06-25 22:56:09 -07:00
Andrew Kelley
b4e40cb59a
fix peer type resolution with null 2019-06-26 00:36:24 -04:00
Andrew Kelley
fd4c5f54f0
all compile error tests passing 2019-06-25 19:03:56 -04:00
Andrew Kelley
0a77325916
fix several compile error test regressions 2019-06-25 18:06:03 -04:00
Andrew Kelley
da68aec339
fix infinite loop when error in peer resolution 2019-06-25 16:04:01 -04:00
Andrew Kelley
cb55803a59
fix implicit cast vector to array 2019-06-25 13:57:45 -04:00
Andrew Kelley
c61e0a078c
fix union init with void payload
all std lib tests passing now
2019-06-25 11:31:38 -04:00
Marc Tiehuis
f5af349bd6
Merge pull request #2714 from ziglang/fmt-overhaul
Add positional, precision and width support to std.fmt
2019-06-25 20:15:33 +12:00
Carter Sande
cd02630da8 compiler-rt: Support thumb versions older than armv6
Add versions of __aeabi_memset and __aeabi_memclr which do not use mov
instructions between low registers, as this is unsupported on thumbv4t
and thumbv5.
2019-06-24 22:32:50 -07:00
Marc Tiehuis
08e8d30dd6 Add parsing of fill and alignment in std.format
These options are now available to use when printing, however nothing
currently makes use of these.
2019-06-25 17:11:18 +12:00
Michael Dusan
de2b0cd722 fix compile error when building zig w/ clang
errors as reported on macOS w/ Xcode 10.1, 10.2 and 11.0:

src/ir.cpp:23285:16: error: variable 'bits' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
    } else if (float_type->id == ZigTypeIdFloat)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ir.cpp:23288:13: note: uninitialized use occurs here
    switch (bits) {
            ^~~~
src/ir.cpp:23285:12: note: remove the 'if' if its condition is always true
    } else if (float_type->id == ZigTypeIdFloat)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ir.cpp:23281:18: note: initialize the variable 'bits' to silence this warning
    unsigned bits;
2019-06-24 16:25:18 -04:00
Michael Dusan
3021e5ca67 align (vector -> array) store to result location 2019-06-24 14:52:57 -04:00
Andrew Kelley
24400d5882
Merge branch 'shawnl-simd2' 2019-06-23 17:14:28 -04:00
Andrew Kelley
7f4de2dfdb
remove stray abort 2019-06-23 17:14:10 -04:00
Andrew Kelley
b2cbc59e4c
Merge branch 'simd2' of https://github.com/shawnl/zig into shawnl-simd2 2019-06-23 17:10:33 -04:00
emekoi
ca3660f6bf increase stack size for mingw 2019-06-23 16:51:12 -04:00
Andrew Kelley
020d5b529e
compile error tests only for debug mode 2019-06-23 02:06:57 -04:00
Andrew Kelley
036cc48a82
Merge remote-tracking branch 'origin/master' into copy-elision-3 2019-06-23 01:29:48 -04:00
Andrew Kelley
5e58aa4884
uncomment passing std lib tests
these ones getting skipped need to get fixed before merging the branch
2019-06-23 01:29:18 -04:00
Andrew Kelley
38568318a0
fix some legacy coroutine stuff 2019-06-23 00:41:11 -04:00
Andrew Kelley
9153b17c92
Merge pull request #2733 from emekoi/write-strings
various fixes for mingw
2019-06-22 23:51:21 -04:00
emekoi
f1c57a7f84 supress warnings for format strings on msys64 2019-06-22 20:21:48 -05:00
emekoi
3ac9e3c888 make string literal const on windows 2019-06-22 19:54:11 -05:00
Andrew Kelley
7e303fa28f
fix another crash 2019-06-22 19:02:59 -04:00
Andrew Kelley
2b1695b1b0
fix std.json regression 2019-06-22 18:54:27 -04:00
Andrew Kelley
86f362ce8e
elide redundant safety check when switching on tagged unions 2019-06-22 16:18:42 -04:00
Shawn Landden
71e014caec stage1: add @sin @cos @exp @exp2 @ln @log2 @log10 @fabs @floor @ceil @trunc @round
and expand @sqrt

This revealed that the accuracy of ln is not as good as the current algorithm in
musl and glibc, and should be ported again.

v2: actually include tests
v3: fix reversal of in and out arguments on f128M_sqrt()
    add test for @sqrt on comptime_float
    do not include @nearbyInt() until it works on all targets.
2019-06-22 14:34:34 -05:00
Sahnvour
987c209b40 heap: make one global instance of DirectAllocator
it is now stateless, so the de/init are not necessary anymore
2019-06-22 14:10:53 -04:00
Andrew Kelley
3c4b255a3c
fix implicit cast fn call result to optional in field result 2019-06-22 13:37:13 -04:00
Andrew Kelley
65997f816b
Merge remote-tracking branch 'origin/master' into copy-elision-3 2019-06-22 01:19:06 -04:00
Gray Olson
be51511d29 Update langref.html.in 2019-06-22 01:15:47 -04:00
Andrew Kelley
726674b2bd
fix ArenaAllocator 2019-06-22 01:13:10 -04:00
Andrew Kelley
b5f9033d82
uncomment passing std lib tests 2019-06-21 19:29:34 -04:00
Andrew Kelley
727af307c6
fix return result loc and then switch with range...
...implicit casted to error union
2019-06-21 18:21:12 -04:00
Andrew Kelley
ff6d563b04
fix implicit cast to optional to error union to return result loc 2019-06-21 17:49:54 -04:00
Andrew Kelley
5441f77672
fix implicit cast bitcast result to error union by returning 2019-06-21 16:54:46 -04:00
Andrew Kelley
142e77abbb
fix extern functions returning byval structs 2019-06-21 14:44:49 -04:00
Andrew Kelley
48ccf427af
fix nested orelse and nested catch 2019-06-21 14:06:01 -04:00
Andrew Kelley
4299cd4446
blocks have result location semantics 2019-06-21 13:16:55 -04:00