Commit Graph

2420 Commits

Author SHA1 Message Date
Andrew Kelley
e4fd3fd52b workaround for llvm-config missing xml2 2018-03-10 14:48:41 -05:00
Andrew Kelley
6288ad865c change 5 to 6 in travis osx scripts 2018-03-10 14:36:59 -05:00
Andrew Kelley
84e952c230 fix await multithreaded data race
coro return was reading from a value that coro await was
writing to. that wasn't how it was designed to work, it
was an implementation mistake.

this commit also has some work-in-progress code for fixing
error return traces across suspend points.
2018-03-10 01:38:40 -05:00
Andrew Kelley
3b3649b86f refactor stack trace code to remove global state 2018-03-10 01:38:40 -05:00
Andrew Kelley
60b2031831 improvements to stack traces
* @panic generates an error return trace
 * printing an error return trace no longer interferes with
   normal stack traces.
 * instead of ignore_frame_count, we look at the return address
   when you call panic, and that's the first stack trace function
   makes stack traces much cleaner - the error return trace
   flows gracefully into the stack trace
2018-03-10 01:38:40 -05:00
Andrew Kelley
20011a7a1c add behavior test for coroutine frame allocation failure 2018-03-10 01:38:40 -05:00
Andrew Kelley
61a02d9d1e omit pad zeroes in debug stack traces 2018-03-10 01:38:40 -05:00
Andrea Orru
f25c1c6858 Fixed syntax errors in linux-i386 syscalls 2018-03-09 22:25:21 -08:00
Andrea Orru
70c3008a00 Added 6 parameters syscalls for zen 2018-03-09 22:24:52 -08:00
Marc Tiehuis
7a893691c0 Unroll Sha3 inner loop
Issue #699 since fixed. Nearly a x3 perf improvement.

Using --release-fast.

Sha3_256 (before): 96 Mb/s
Sha3_256  (after): 267 Mb/s

Sha3_512 (before): 53 Mb/s
Sha3_512  (after): 142 Mb/s

No real gains from unrolling other initialization loops in crypto
functions so have been left as is.
2018-03-10 10:00:07 +13:00
Andrew Kelley
5a7a0e8518 update to SoftFloat-3e
closes #823
2018-03-09 15:06:06 -05:00
Andrew Kelley
6db9be8900 don't memoize comptime functions if they can mutate state via parameters
closes #639
2018-03-09 14:20:44 -05:00
Andrew Kelley
aaf2230ae8 fix partial inlining of binary math operator using old value
the code was abusing the internal IR API. fixed now.

closes #699
2018-03-08 17:15:55 -05:00
Andrew Kelley
028ec0f2c3 enums with 1 field and explicit tag type still get the tag type
closes #820
2018-03-08 15:22:42 -05:00
Andrew Kelley
aa9902b586 translate-c: add missing case labels 2018-03-08 11:47:07 -05:00
Andrew Kelley
2db28ea849 travis ci: update ubuntu llvm repo and CC,CXX env vars to 6 2018-03-08 11:46:47 -05:00
Andrew Kelley
3200ebc2ea Merge branch 'llvm6'
Zig now depends on LLVM 6.0.0.

The latest commit that depends on LLVM 5.0.1 is
2e010c60ae.
2018-03-08 10:59:54 -05:00
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