Commit Graph

4754 Commits (af7daae26b874a40319041cce784645b03aa8fb3)

Author SHA1 Message Date
Andrew Kelley 4c38a8cce1
more regression fixes. empty test passes again 2019-04-02 18:31:19 -04:00
Andrew Kelley 5aee17e888
regression fixes and fix packed struct abi size 2019-04-02 18:31:19 -04:00
Andrew Kelley ddb8aa73f5
more regression fixes 2019-04-02 18:31:18 -04:00
Andrew Kelley 30b2fb2fb5
bug fixes 2019-04-02 18:31:18 -04:00
Andrew Kelley d7bc7635c0
put the hack from master branch back in 2019-04-02 18:31:18 -04:00
Andrew Kelley d3f2fe2cef
remove the lazy value stuff
let's try to keep this branch to solving one problem at a time
2019-04-02 18:31:18 -04:00
Andrew Kelley 3dc8448680
introduce lazy values
but I think it's a bad idea, so I'm going to back out the change
2019-04-02 18:31:18 -04:00
Andrew Kelley ee5064c053
decouple llvm types from zig types
Not tested yet, but it builds.

This closes #761, and lays the groundwork for fixing the remaining
false positive "foo depends on itself" bugs, such as #624.

It also lays the groundwork for implementing ability to specify
alignment of fields (#1512).
2019-04-02 18:31:17 -04:00
Andrew Kelley 2f96c55095 fix cache hash regression
fixes "warning: unexpected seek failure"

fix regression introduced by 27e31f0475

the fd should be closed only if returning with an error
2019-04-02 15:29:16 -04:00
Andrew Kelley 0cccba71d4
better error message when os_file_overwrite fails 2019-04-02 15:21:08 -04:00
Shawn Landden 27e31f0475 fix fd leak in stage1 cacheing code 2019-04-02 12:27:14 -04:00
Andrew Kelley 3c27d9c25a
Merge pull request #2147 from emekoi/fix1940
added error for implicit cast from *const T to *[1]T.
2019-04-01 11:35:03 -04:00
Andrew Kelley 3199792ade
Merge pull request #2150 from vegecode/armv7m-compiler-rt
Armv7m compiler rt
2019-04-01 11:31:57 -04:00
hryx c76d51de97 zig fmt: Allow one-line for loops 2019-04-01 11:31:00 -04:00
Shritesh Bhattarai d645500883 fmt: fix first line comment indent in struct init 2019-03-31 22:33:32 -04:00
vegecode bfbfb7b3b0 Remove inline keywords in addXf3.zig pending #2154 2019-03-31 21:00:36 -05:00
hryx 0563e8e1d4 Always write a multiline struct literal if a field expr is multiline 2019-03-31 21:09:56 -04:00
emekoi b7aa289ae4 fixed broken casts in std 2019-03-31 16:47:34 -05:00
emekoi 4a64f26627 added error for implicit cast from *const T to *[1]T. credit: @kristate 2019-03-31 16:47:34 -05:00
Michael Dusan aa794eb621 fix zig run to accept executable args
The `--` double-hyphen is now used to end further `zig` processing
of command line options. All arguments after `--` will be passed
on to the executable. eg. `--help` will be passed on.

`zig run foo.zig -- --help`

closes #2148
2019-03-31 17:01:11 -04:00
vegecode 937ff0cb6a Add all __aeabi functions (C versions) who alias currently existing functions to compiler-rt 2019-03-31 15:54:02 -05:00
vegecode 779137be41 Add __aeabi_{f,d}neg and __neg{s,d,X}f2 to compiler-rt 2019-03-31 15:54:02 -05:00
vegecode 38c2093500 Add __aeabi_{f,d}{add,sub} and __{add,sub}{s,d}f3 to compiler-rt 2019-03-31 15:54:02 -05:00
vegecode 310f91fb4f Add __aeabi_mem{cmp,clr,set,cpy,move} to compiler-rt 2019-03-31 15:54:02 -05:00
vegecode e89b704293 Add memcmp to builtins 2019-03-31 15:54:02 -05:00
hryx a4afacd182 Veritcally align array literal columns 2019-03-31 14:27:10 -04:00
Andrew Kelley 25ac2fe8cd
fix anon enum literal used with switch on union(enum)
closes #2141
closes #2142
2019-03-31 12:43:21 -04:00
MateuszOkulus 62af701804 Remove binary and octal float literals from documentation.
Part of #2093
2019-03-31 10:49:55 -04:00
Andrew Kelley 90a78866db
Merge pull request #2112 from shritesh/param_decl_doc_comments
Add doc_comments to param decl
2019-03-30 19:22:28 -04:00
Shritesh Bhattarai b0d89cfe3f fmt: Fix param decl test 2019-03-30 14:58:18 -05:00
Shritesh Bhattarai efa751c339 Add doc_comments to param decl 2019-03-30 14:50:08 -05:00
emekoi 8fdf8b6972 fixed libc command on mingw 2019-03-29 23:16:17 -05:00
Rohlem 5703ab1d0c fix std.ascii type error and inverted logic
previously:
```
...\lib\zig\std\ascii.zig:203:20: error: unable to perform binary not operation on type 'comptime_int'
        return c | ~0b00100000;
                   ^
```
2019-03-29 12:18:42 -04:00
Rohlem a824a8c687 add std.ascii to std.std test "std" 2019-03-29 12:18:42 -04:00
Shawn Landden d494a5f4cf fix tests for math.mulWide 2019-03-29 12:17:48 -04:00
Shawn Landden 66f13ba807 stage1: better error message when comparing against null
Closes: #2104
2019-03-28 15:54:44 -04:00
Shawn Landden 85d1885375 std.mulWide() whose return is twice as wide 2019-03-28 15:51:10 -04:00
Andrew Kelley 64b2cf776c
implement target_c_type_size_in_bits for WASI 2019-03-27 16:08:45 -04:00
Andrew Kelley fbe9233aa7
Merge pull request #2107 from shawnl/arm64
fix build on arm64
2019-03-27 13:11:01 -04:00
emekoi cf4e9a27c5 removed static build flags on mingw 2019-03-27 12:49:26 -04:00
Shawn Landden 084724c689 use __ARM_EABI__, not __arm__
This is sort of pedantic and old OABI systems are unlikely to ever run zig.
2019-03-27 01:18:58 +00:00
Shawn Landden 65e234adfd fix build on arm64 2019-03-27 01:14:29 +00:00
Shritesh Bhattarai 85575704a4 Use linux.exit_group if not single threaded 2019-03-26 17:49:20 -04:00
Shritesh Bhattarai 5942797000 fmt: check for extra newline at end of file
`anything_changed` checks if `source_index` == `source.len`
Fixes #2074
2019-03-26 13:26:00 -04:00
Shawn Landden 51be449a57 std.ascii: respond to review
This won't generate as much mode in debug mode, as it doesn't check for overflow.
2019-03-26 12:00:55 -04:00
Andrew Kelley 1d09cdaa6a munmap allows address 0
fixes test suite regression on macOS from previous commit
2019-03-25 16:04:25 -04:00
Andrew Kelley 5eaead6a56
implement allowzero pointer attribute
closes #1953

only needed for freestanding targets.

also adds safety for `@intToPtr` when the address is zero.
2019-03-25 12:55:45 -04:00
Andrew Kelley 3306e43984
add compile error test for invalid enum literal implicit cast
See #683
2019-03-24 18:51:24 -04:00
Andrew Kelley da9d8a6ecf
implement peer type resolution for enum literals
See #683
2019-03-24 18:47:36 -04:00
Andrew Kelley aff7b38838
make switch expressions allow enum literal types
See #683
2019-03-24 01:15:21 -04:00