Commit Graph

5630 Commits

Author SHA1 Message Date
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
Shawn Landden
bbfb53d524 c: add fma and fmaf 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
joachimschmidt557
381c6a38b1 Correct the isEmpty function
Integrate isEmpty into the tests for std.atomic.Queue

Fix wrong test

Oops

Simpler checking
2019-06-18 16:31:06 -04:00
Andrew Kelley
77e0c53613
fix problem with inferred error set return result 2019-06-18 15:00:19 -04:00
Andrew Kelley
f90d17cc4d
fix bitcast 2019-06-18 14:44:25 -04:00
Andrew Kelley
077f9df15b
more miscellaneous fixes
when will it end
2019-06-18 14:30:17 -04:00
Jonathan Marler
c7bcf1a447 Fix windows create process retry/path search 2019-06-18 13:19:06 -04:00
Andrew Kelley
3ca4925709
Merge branch 'kristate-you-are-banned-please-fuck-off'
closes #2701
2019-06-18 11:32:31 -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
fdc6e0af05
fix zero length array literal casted to slice 2019-06-18 10:49:21 -04:00
Boris
99112b5d4a fix tiny typo in langref.html.in 2019-06-18 10:01:48 -04:00
Andrew Kelley
e5a0414b05
misc fixes 2019-06-17 21:55:14 -04:00
Andrew Kelley
4e182c7e9e
inferred comptime array inits 2019-06-17 17:46:03 -04:00
Andrew Kelley
0568000844
fix function calls 2019-06-17 17:12:06 -04:00
Andrew Kelley
74250e434e
inferred comptime union inits 2019-06-17 16:27:45 -04:00
Jonathan Marler
21dff1c4e2 Remove duplicate exe name with zig run 2019-06-17 14:10:10 -04:00
Andrew Kelley
b025193de5
inferred comptime values rather than elided scopes
because of this example:

```zig
export fn entry(b: bool) usize {
    var runtime = [1]i32{3};
    comptime var i: usize = 0;
    inline while (i < 2) : (i += 1) {
        const result = if (i == 0) [1]i32{2} else runtime;
    }
    comptime {
        return i;
    }
}
```

The problem is that the concept of "resetting" a result location,
introduced in the previous commit, cannot handle elision scopes.
This concept is inherently broken with inline loops.
2019-06-17 13:31:19 -04:00
Marc Tiehuis
d5d0942a0d Small cleanup of fmt.zig
Use inferred enum literals and split the large test case up.
2019-06-17 13:00:00 -04:00
Josh Wolfe
50c8a93a5e mem.concat 2019-06-17 01:41:33 -04:00
daurnimator
6ce2a03985 std: add gimli permutation to crypto 2019-06-16 22:55:38 -04:00
Timon Kruiper
72029c2fc8 Added HashInt to function calls AutoHash\nFixes issue 2669 2019-06-16 14:36:23 -04:00
Shawn Landden
4d3356435f stage1: check for null in buf_len and buf_ptr
follow up for f4b8850002
2019-06-16 14:26:38 -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
60025a3704
Merge remote-tracking branch 'origin/master' into copy-elision-3 2019-06-15 10:34:04 -04:00
Andrew Kelley
7c5ceb0c4c
standard library integrates with knowledge of stripped debug info 2019-06-14 18:45:41 -04:00
Andrew Kelley
362c79140f
expose builtin.strip_debug_info
zig code now can be made aware that it will not have any debug
information available at runtime.
2019-06-14 18:18:43 -04:00
Andrew Kelley
f8f054b354
fix @export for arrays not respecting the symbol name
Previously, the symbol name parameter of `@export` would be ignored for
variables, and the variable name would be used for the symbol name.
Now it works as expected.

See #2679
2019-06-14 17:23:24 -04:00
Andrew Kelley
42ea2d0d1c
fix @export for arrays and allow sections on extern variables
previously `@export` for an array would panic with a TODO message.
now it will do the export. However, it uses the variable's name
rather than the name passed to `@export`. Issue #2679 remains open
for that problem.
2019-06-14 15:28:52 -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
Andrew Kelley
24cfa3534f
allow comptime array literals casted to slices 2019-06-13 16:51:26 -04:00
Andrew Kelley
3cbe827464
fix behavior for nested array literals
new compile error for trying to cast runtime array literals to slices
2019-06-13 16:25:35 -04:00
Andrew Kelley
efb064449f
fix runtime initialize array elem and then implicit cast to slice 2019-06-13 13:31:15 -04:00
Jonathan Marler
9e8db5b750 Remove const on argsAlloc 2019-06-13 11:42:17 -04:00