Commit Graph

1596 Commits

Author SHA1 Message Date
Andrew Kelley
4794281d64 embed LLD 5.0.0
This is 48aaa9f66120f72b5d7e4a90b32fee40a3386ce9 from the
git monorepo.
2017-08-27 17:46:59 -04:00
Andrew Kelley
ebdc6b594d all tests passing in MacOS
depends on LLD 5.0.0 with 3 patches

See #273
2017-08-27 17:16:42 -04:00
Andrew Kelley
5fd579a51c macos passing all tests except for building a shared library
see #273
2017-08-27 05:44:03 -04:00
Andrew Kelley
ff2c794612 all behavior tests passing for macos
See #273
2017-08-27 05:15:24 -04:00
Andrew Kelley
91536813ec macos updates
* try some macos travis stuff
 * put c in the link libs for macos since we always link with libSystem
 * for non-native targets on macos, allow runtime symbol resolution
   - it's causing an infinite loop in LLD.
 * for macos, always build compiler_rt and turn on LinkOnce because
   compiler_rt on darwin is missing some stuff.
2017-08-27 02:51:25 -04:00
Andrew Kelley
01f88bf8c6 travis again 2017-08-27 01:28:04 -04:00
Andrew Kelley
fedccf9d2d travis try again 2017-08-27 01:19:18 -04:00
Andrew Kelley
6623a11b2c travis: add macos script 2017-08-27 01:07:06 -04:00
Andrew Kelley
b59aa7b906 fixups to linux build 2017-08-27 00:28:17 -04:00
Andrew Kelley
29a418c9d5 progress toward tests passing on MacOS 2017-08-27 00:11:09 -04:00
Andrew Kelley
2a49c876be audit alignment for functions
see #37
2017-08-26 15:20:39 -04:00
Andrew Kelley
95aed8c457 Merge branch 'align' 2017-08-26 14:26:43 -04:00
Andrew Kelley
a0ae575ff8 codegen for enums chooses best order of tag and union fields
closes #396
2017-08-26 14:25:52 -04:00
Andrew Kelley
40feecb3e4 fixups from previous commit
See #396
2017-08-26 13:51:51 -04:00
scurest
5bc877017e use most_aligned_member+padding to represent enum unions 2017-08-26 13:48:16 -04:00
Andrew Kelley
e726925e80 remove @alignOf and add @cAbiAlignOf and @preferredAlignOf
See #396
2017-08-26 13:29:24 -04:00
Andrew Kelley
3a4ea41fe8 add some asserts in switch analysis code 2017-08-26 13:06:13 -04:00
Andrew Kelley
2b8f98a52c fix wrong switch target type with enum from .h file
fixes crash when else => unreachable is missing
2017-08-26 12:23:12 -04:00
Andrew Kelley
105a09e1d6 fix invalid llvm IR for const enum
closes #394
2017-08-26 00:34:40 -04:00
Andrew Kelley
234030c37a update build to look for llvm 5.0 2017-08-26 00:34:40 -04:00
Andrew Kelley
8f57544410 update travis for llvm 5 2017-08-26 00:34:40 -04:00
Andrew Kelley
2bd6c60752 update for llvm 5.0.0rc1 2017-08-26 00:34:40 -04:00
Andrew Kelley
6aa04c422b float division by zero check only when FloatMode.Optimzed
closes #395
2017-08-25 20:44:32 -04:00
Andrew Kelley
a0223e513f add zig-compiler-completions to Related Projects 2017-08-25 20:14:33 -04:00
Andrew Kelley
db613d38f0 implement comptime bitcasting from array 2017-08-25 20:05:10 -04:00
Andrew Kelley
4d8269f69f fix some casts on const data causing segfault 2017-08-25 19:54:20 -04:00
Andrew Kelley
754f7809e3 refactor - codegen llvm functions lazily 2017-08-25 13:13:07 -04:00
Andrew Kelley
629aa10c56 unreachable still codegens to unreachable in ReleaseFast test mode
closes #430
2017-08-25 10:20:06 -04:00
Andrew Kelley
5dddb45ec7 fix compiler test errors
closes #428

Thanks Marc Tiehuis for diagnosing this bug
2017-08-22 11:54:58 -04:00
Andrew Kelley
0a922d3bca move docs to website 2017-08-20 17:30:02 -04:00
Andrew Kelley
d5271d1e49 more zen 2017-08-20 12:10:21 -04:00
Andrew Kelley
be16034275 std.math: remove constants that can be derived
from others at compile time
2017-08-20 05:43:40 -04:00
Andrew Kelley
f248ef5f3f move zen of zig to a sub command 2017-08-20 04:25:42 -04:00
Andrew Kelley
d9dd50d74c fix not propagating parseh aliases through pub use decls 2017-08-20 04:03:36 -04:00
Andrew Kelley
8e19bdfc79 zen update 2017-08-20 03:24:28 -04:00
Andrew Kelley
09bd4a9a86 compile-time f32, f64 operations are now correctly lossy
previously we used the bigfloat abstraction to do all
compile-time float math. but runtime code and comptime code
are supposed to get the same result. so now if you add a
f32 to a f32 at compile time it does it with f32 math
instead of the bigfloat. float literals still get the
bigfloat math.

closes #424
2017-08-20 01:04:51 -04:00
Andrew Kelley
c73a0c92d0 fix floating point printing 2017-08-19 19:11:43 -04:00
Andrew Kelley
caaeab9882 add setEvalBranchQuota builtin function 2017-08-19 17:10:29 -04:00
Andrew Kelley
eb26aeb1e5 std: better int log2 implementation for number literals 2017-08-19 02:29:18 -04:00
Andrew Kelley
cd2f65ff6a add compile error for globally shadowing a primitive type
closes #423
2017-08-19 02:02:25 -04:00
Andrew Kelley
987768778a bit shifting safety
* add u3, u4, u5, u6, u7 and i3, i4, i5, i6, i7
 * shift operations shift amount parameter type is
   integer with log2 bit width of other param
   - This enforces not violating undefined behavior on
     shift amount >= bit width with the type system
 * clean up math.log, math.ln, math.log2, math.log10

closes #403
2017-08-19 01:43:43 -04:00
Andrew Kelley
558ece8f6f slightly nicer floating point printing 2017-08-18 18:05:28 -04:00
Andrew Kelley
33c592e981 make udivmod generic and add tests 2017-08-18 17:20:03 -04:00
Andrew Kelley
51bde26842 add compiler-rt fns: udivmodti4, udivti3, umodti3 2017-08-18 16:26:09 -04:00
Andrew Kelley
ea9e1639ca include compiler-rt tests in main testing suite 2017-08-18 13:51:16 -04:00
Andrew Kelley
0aa36e882e remove dependency on quadmath.h 2017-08-18 13:28:59 -04:00
Andrew Kelley
b73d4f74c2 depend on libquadmath
it seems to be shipped with gcc and clang
2017-08-18 13:13:03 -04:00
Andrew Kelley
e1c225694d cast between __float128 and double to fix build in some places 2017-08-18 12:43:48 -04:00
Andrew Kelley
3a762e5a8d make casting between __float128 and long double explicit 2017-08-18 12:37:01 -04:00
Andrew Kelley
1b5d61bee9 fix bitCast for big integers
and make bigfloat use __float128
2017-08-17 22:52:12 -04:00