Andrew Kelley
b57cb04afc
Merge remote-tracking branch 'origin/master' into llvm6
2018-03-08 10:59:24 -05:00
Jimmi Holst Christensen
2e010c60ae
Translate C now correctly converts ints, floats, ptrs and enums to bools
...
* Boolean "and" and "or" should also work with these types.
* This new method also simplifies to output code.
2018-03-08 15:34:00 +01:00
Jimmi Holst Christensen
b2887620f3
Translate C will now handle ignored return values
2018-03-08 13:15:30 +01:00
Jimmi Holst Christensen
689e241ff8
Merge branch 'master' of github.com:zig-lang/zig
2018-03-08 10:29:43 +01:00
Jimmi Holst Christensen
51b2f1b80b
Translate C can now translate switch statements again
2018-03-08 10:29:29 +01:00
Andrew Kelley
790aaeacae
add compile error for using @tagName on extern union
...
closes #742
2018-03-07 14:35:48 -05:00
Jimmi Holst Christensen
bb80daf509
Ast Render no longer outputs erroneous semicolon
...
closes #813
2018-03-07 10:39:32 +01:00
Andrew Kelley
d96dd5bc32
fix missing compile error for returning error from void async function
...
closes #799
2018-03-06 21:44:27 -05:00
Andrew Kelley
6b5cfd9d99
turn assertion into compile error for using var as return type
...
closes #758
2018-03-06 20:41:49 -05:00
Andrew Kelley
eff3530dfa
var is no longer a pseudo-type, it is syntax
...
closes #779
2018-03-06 18:31:31 -05:00
Andrew Kelley
44ae891bd7
fix assertion when taking slice of zero-length array
...
closes #788
2018-03-06 17:19:45 -05:00
Andrew Kelley
cc0f660ad2
unless hf is specified in target environ, assume soft floating point
...
closes #804
2018-03-06 16:57:41 -05:00
Andrew Kelley
5d5820029d
fix broken tests from previous commit
2018-03-06 16:46:45 -05:00
Andrew Kelley
07e47c058c
ptrCast builtin now gives an error for removing const qualifier
...
closes #384
2018-03-06 16:37:03 -05:00
Andrew Kelley
46e258c9f7
Merge pull request #815 from Hejsil/more-translate-c
...
Translate C now handles bools better
2018-03-06 10:43:52 -05:00
Andrew Kelley
c3807dfb34
remove value judgement from std lib API docs
...
documentation should be purely technical, and not contain opinions about
how easy or hard something is.
2018-03-06 10:41:07 -05:00
Jimmi Holst Christensen
1d378d8f26
Removed fixed todo
2018-03-06 12:33:09 +01:00
Jimmi Holst Christensen
5ab25798e3
We now also use trans_to_bool_expr on bool not
2018-03-06 12:04:14 +01:00
Jimmi Holst Christensen
bf47cf418a
expr to bool is now it's own function.
...
* Now while and for loops work on ints and floats, like if statements
* This fixes the loop problem in #813
2018-03-06 11:57:51 +01:00
Jimmi Holst Christensen
61ecc48671
Added appropriate TODO comment to UO_LNot
2018-03-06 11:15:13 +01:00
Jimmi Holst Christensen
ed1386eeff
Simple translation of UO_LNot
2018-03-06 11:13:10 +01:00
Andrew Kelley
d34d36619e
Merge pull request #814 from jacobdufault/utf8-view
...
Make Utf8View public, add comments, and make iterator lowercase.
2018-03-06 01:42:04 -05:00
Jacob Dufault
8fd7e9115c
Make Utf8View public, add comments, and make iterator lowercase.
2018-03-05 21:42:01 -08:00
Joshua Olson
c787837ce5
Clarify what is meant by 'libraries' ( #808 )
2018-03-04 19:26:16 -05:00
Joshua Olson
db18d38a43
Fix Linux gcc requirement ( #807 )
...
g++ may be a separate package. I had this problem on Fedora.
2018-03-04 17:46:17 -05:00
Andrew Kelley
73a306e2fa
fix conflict artifact accidentally in appveyor script
2018-03-03 17:44:41 -05:00
Andrew Kelley
7ee1b88042
add llvm 6.0.0 binaries to appveyor cache
2018-03-03 16:43:57 -05:00
Andrew Kelley
1c244d34b3
Merge branch 'master' into llvm6
2018-03-03 16:30:59 -05:00
Andrew Kelley
56645c1701
std.debug.dwarf supports line number version 4
...
fixes stack traces for llvm6 generated zig programs
2018-03-02 16:26:22 -05:00
Andrew Kelley
101b7745c4
add optnone noinline to async functions
...
this works around LLVM optimization assertion failures.
https://bugs.llvm.org/show_bug.cgi?id=36578
closes #800
2018-03-02 13:40:03 -05:00
Andrew Kelley
a217c764db
Merge remote-tracking branch 'origin/master' into llvm6
2018-03-01 22:25:15 -05:00
Andrew Kelley
7d494b3e7b
Merge branch 'async'
...
closes #727
2018-03-01 21:55:15 -05:00
Andrew Kelley
de5c0c9f40
Merge remote-tracking branch 'origin/master' into async
2018-03-01 20:47:35 -05:00
Andrew Kelley
6bade0b825
coroutines: add await early test case
2018-03-01 16:17:38 -05:00
Andrew Kelley
8a0e1d4c02
await keyword works
2018-03-01 15:46:35 -05:00
Andrew Kelley
a7c87ae1e4
fix not casting result of llvm.coro.promise
2018-03-01 10:23:47 -05:00
Andrew Kelley
253d988e7c
implementation of await
...
but it has bugs
2018-03-01 03:28:13 -05:00
Andrew Kelley
834e992a7c
add test for coroutine suspend with block
2018-02-28 22:26:26 -05:00
Andrew Kelley
8429d4ceac
implement coroutine resume
2018-02-28 22:18:48 -05:00
Andrew Kelley
c622766156
async function fulfills promise atomically
2018-02-28 21:48:20 -05:00
Andrew Kelley
807a5e94e9
add atomicrmw builtin function
2018-02-28 21:19:51 -05:00
Andrew Kelley
36eadb569a
run coroutine tests only in Debug mode
...
LLVM 5.0.1, 6.0.0, and trunk crash when attempting to optimize coroutine code.
So, Zig does not support ReleaseFast or ReleaseSafe for coroutines yet.
Luckily, Clang users are running into the same crashes, so folks from the LLVM
community are working on fixes. If we're really lucky they'll be fixed in 6.0.1.
Otherwise we can hope for 7.0.0.
2018-02-28 18:56:26 -05:00
Andrew Kelley
58dc2b719c
better coroutine codegen, now passing first coro test
...
we have to use the Suspend block with llvm.coro.end to
return from the coro
2018-02-28 18:22:43 -05:00
Andrew Kelley
ad2a29ccf2
break the data dependencies that llvm coro transforms cant handle
...
my simple coro test program builds now
see #727
2018-02-28 16:47:13 -05:00
Andrew Kelley
026aebf2ea
another workaround for llvm coroutines
...
this one doesn't work either
2018-02-28 04:01:22 -05:00
Andrew Kelley
6568be575c
Merge branch 'bnoordhuis-fix795'
2018-02-28 00:29:20 -05:00
Andrew Kelley
556f22a751
different way of fixing previous commit
...
get_fn_type doesn't need the complete parameter type, it
can just ensure zero bits known.
2018-02-28 00:28:26 -05:00
Andrew Kelley
1b8a241f6f
Merge branch 'fix795' of https://github.com/bnoordhuis/zig into bnoordhuis-fix795
2018-02-28 00:22:53 -05:00
Andrew Kelley
0f449a3ec1
Merge pull request #796 from bnoordhuis/fix731-more
...
allow implicit cast from &const to ?&const &const
2018-02-27 23:55:03 -05:00
Ben Noordhuis
90598b4631
fix assert on self-referencing function ptr field
...
The construct `struct S { f: fn(S) void }` is not legal because structs
are not copyable but it should not result in an ICE.
Fixes #795 .
2018-02-28 00:56:00 +01:00