Commit Graph

182 Commits

Author SHA1 Message Date
Andrew Kelley
df11512f85
fixups 2019-07-02 16:52:55 -04:00
Andrew Kelley
140335b99f
Merge branch 'has-field' of https://github.com/shawnl/zig into shawnl-has-field 2019-07-02 16:21:40 -04:00
Andrew Kelley
0a0c11685f
fix for with null and T peer types and inferred result location type
See #2762
2019-06-27 17:22:35 -04:00
Andrew Kelley
1b23c46138
fix switch with null and T peer types and inferred result location type
closes #2762
2019-06-27 16:54:19 -04:00
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
3085d29af8
Merge remote-tracking branch 'origin/master' into copy-elision-3 2019-06-26 14:44:01 -04:00
Andrew Kelley
ff737cc648
fix peer type resolution: unreachable, error set, unreachable 2019-06-26 12:31:51 -04:00
Andrew Kelley
b4e40cb59a
fix peer type resolution with null 2019-06-26 00:36:24 -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
Andrew Kelley
b2cbc59e4c
Merge branch 'simd2' of https://github.com/shawnl/zig into shawnl-simd2 2019-06-23 17:10:33 -04:00
Andrew Kelley
036cc48a82
Merge remote-tracking branch 'origin/master' into copy-elision-3 2019-06-23 01:29:48 -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
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
4f21dc8a80
fix regression with zero sized array
thanks mikdusan!
2019-06-21 00:58:18 -04:00
Andrew Kelley
0498bd40d9
fix loops with multiple break statements 2019-06-20 22:38:40 -04:00
Andrew Kelley
237233b04b
fix coroutines 2019-06-20 18:27:04 -04:00
Andrew Kelley
057b105fad
one more test passing 2019-06-20 18:03:55 -04:00
Andrew Kelley
3c541d7be3
fix peer result loc fn call with comptime condition 2019-06-19 23:52:51 -04:00
Andrew Kelley
6217b401f9
fix labeled break inside comptime if inside runtime if 2019-06-19 23:39:49 -04:00
Andrew Kelley
78eeb6e9ae
fix double getelementptr of runtime global 2019-06-19 22:29:39 -04:00
Andrew Kelley
04c25efe11
Merge remote-tracking branch 'origin/master' into copy-elision-3 2019-06-19 19:01:28 -04:00
Andrew Kelley
4ffab5b85f
fix optional pointer to size zero struct 2019-06-19 18:47:02 -04:00
Andrew Kelley
c7dc03fcb1
fix try not setting error code on result location 2019-06-19 17:07:05 -04:00
Andrew Kelley
96931228af
fix comptime test error for empty error set 2019-06-19 16:29:46 -04:00
Andrew Kelley
974db231a0
fix extraneous nested union field instruction 2019-06-19 16:16:47 -04:00
Andrew Kelley
e36680d3bd
fix detection of unable to evaluate constant expression 2019-06-19 15:18:51 -04:00
Andrew Kelley
b588a803bf
fix comptime modification of const struct field 2019-06-19 14:35:59 -04:00
Shawn Landden
39ad072a84 test: include muladd.zig in behavior tests 2019-06-19 12:07:02 -05:00
Shawn Landden
fce2d2d18b stage1: add support for @mulAdd fused-multiply-add for floats and vectors of floats
Not all of the softfloat library is being built....

Vector support is very buggy at the moment, but should work when the bugs are fixed.
(as I had the same code working with another vector function, that hasn't been merged yet).
2019-06-19 12:07:02 -05:00
Andrew Kelley
79671efd3a
fix inline loop behavior with variable result loc 2019-06-18 17:43:05 -04:00
Andrew Kelley
e27da17ff2
back to many behavioral tests passing 2019-06-18 17:07:27 -04:00
Andrew Kelley
9050a07540
when resolving slice types, might need to...
...resolve alignment if custom alignment is provided

fixes #2689
2019-06-18 11:31:05 -04:00
Andrew Kelley
8ed88280a6
Revert "fixes resolving aligment of child type in slice"
This reverts commit aa60d2a688.

The copyright ownership of this 10 line patch is under dispute.
See #2701 for details. So I'll revert it and then fix it myself without
looking at this patch.
2019-06-18 11:18:53 -04:00
Andrew Kelley
f4b8850002
fix type info crash on extern lib name 2019-06-16 14:14:57 -04:00
Jimmi HC
aa60d2a688 fixes resolving aligment of child type in slice 2019-06-16 00:03:43 -04:00
Andrew Kelley
9564c05cd5
better result location handling of inline loops 2019-06-15 19:19:13 -04:00
Andrew Kelley
6bf193af19
better result location semantics with optionals and return locations
somewhere along this branch, #1901 has been fixed.
2019-06-15 12:28:21 -04:00
Andrew Kelley
acf16b5fb3
uncomment more passing tests 2019-06-14 13:32:04 -04:00
Andrew Kelley
7c074b8516
fix peer result locs with switch 2019-06-14 11:41:53 -04:00
Andrew Kelley
2ba29a1907
fix peer result location with error code and payload 2019-06-14 11:01:38 -04:00
Andrew Kelley
fdaca1b5f3
fix a couple more test regressions 2019-06-13 20:30:39 -04:00
Andrew Kelley
eaf74f4f96
fix bitcast packed struct to integer and back 2019-06-13 20:24:10 -04:00
Andrew Kelley
57347aacd7
fix atomic builtin functions 2019-06-13 20:01:25 -04:00