Commit Graph

2261 Commits (08d595b4724217f0b2b10cd3b9e31a71698cf5c1)

Author SHA1 Message Date
Andrew Kelley dde7cc52d2 fix exp1m implementation
in the llvm6 branch with assertions on, it failed the test
this fixes it
2018-01-06 02:58:45 -05:00
Andrew Kelley 17e68c4a11 disable NewGVN
closes #673
2018-01-06 00:15:37 -05:00
Andrew Kelley e08a4ea62d Merge branch 'appveyor' 2018-01-05 12:16:16 -05:00
Andrew Kelley 2c35e24bd9 workaround for microsoft releasing windows SDK with wrong version 2018-01-05 11:35:46 -05:00
Andrew Kelley 79d50d9933 appveyor: enable verbose link for self hosted compiler 2018-01-04 23:43:46 -05:00
Andrew Kelley f377b1e886 Revert "appveyor ci: look for newer windows sdk version"
This reverts commit 31d632b72e.

according to
https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
10240 is actually 26624 and there was some kind of versioning issue.
2018-01-04 23:37:21 -05:00
Andrew Kelley 7f0b12a481 appveyor: skip building self hosted compiler for now 2018-01-04 23:30:03 -05:00
Andrew Kelley 25ad0b47e2 appveyor: try using vcvarsall 2018-01-04 23:11:27 -05:00
Andrew Kelley d1ef17e3cd appveyor: set VCINSTALLDIR 2018-01-04 22:59:39 -05:00
Andrew Kelley 1b120d1e49 update windows build to llvm 5.0.1
llvm-config.exe does not handle diaguids.lib for us so we have to
duplicate the work.
2018-01-04 22:46:26 -05:00
Andrew Kelley 21a552682e Revert "try using appveyor's llvm copy"
This reverts commit 35dc987dc8.
2018-01-04 19:06:48 -05:00
Andrew Kelley 35dc987dc8 try using appveyor's llvm copy 2018-01-04 18:54:46 -05:00
Andrew Kelley 31d632b72e appveyor ci: look for newer windows sdk version 2018-01-04 18:34:42 -05:00
Andrew Kelley 7e65fe7ac3 fix test regressions on windows from previous commit 2018-01-04 16:36:59 -05:00
Andrew Kelley d008e209e7 self-hosted compiler works on macos 2018-01-04 15:30:22 -05:00
Andrew Kelley e1c03d9e8e self-hosted compiler works on windows
* better error message for realpath failing
 * fix bug in std.io.readFileAllocExtra incorrectly returning
   error.EndOfStream
 * implement std.os.selfExePath and std.os.selfExeDirPath for windows
2018-01-04 13:48:45 -05:00
Andrew Kelley 0cd63b28f3 fix self-hosted build on windows 2018-01-03 22:38:13 -05:00
Andrew Kelley 477e3f64fc self-hosted build: use llvm-config from stage1 2018-01-03 21:32:50 -05:00
Andrew Kelley 5c8600d790 add december in review to reading material; fix docs 2018-01-03 21:11:58 -05:00
Andrew Kelley 5a800db48c build: std files and c header files are only specified once
In the CMakeLists.txt file. And then we communicate the list
to the zig build.
2018-01-03 19:39:04 -05:00
Andrew Kelley a45db7e853 add building the self hosted compiler to the main test suite 2018-01-03 18:25:17 -05:00
Andrew Kelley 5b156031e9 enum tag values are expressions so no parentheses needed 2018-01-03 16:05:37 -05:00
Andrew Kelley 5c988cc722 readme: update macos installation instructions 2018-01-03 14:16:20 -05:00
Andrew Kelley 36ff26609b fix self hosted compiler on windows 2018-01-03 04:55:49 -05:00
Andrew Kelley 6281a511e1 add noInlineCall to docs 2018-01-03 03:27:48 -05:00
Andrew Kelley c741d3f4b2 add test for while respecting implicit comptime 2018-01-03 03:15:06 -05:00
Andrew Kelley d9d61ed563 doc fixes 2018-01-03 02:51:45 -05:00
Andrew Kelley 0ea50b3157 ir: new pass iteration strategy
Before:
 * IR basic blocks are in arbitrary order
 * when doing an IR pass, when a block is encountered, code
   must look at all the instructions in the old basic block,
   determine what blocks are referenced, and queue up those
   old basic blocks first.
 * This had a bug (See #667)

Now:
 * IR basic blocks are required to be in an order that guarantees
   they will be referenced by a branch, before any instructions
   within are referenced.
   ir pass1 is updated to meet this constraint.
 * When doing an IR pass, we iterate over old basic blocks
   in the order they appear. Blocks which have not been
   referenced are discarded.
 * After the pass is complete, we must iterate again to look
   for old basic blocks which now point to incomplete new
   basic blocks, due to comptime code generation.
 * This last part can probably be optimized - most of the time
   we don't need to iterate over the basic block again.

closes #667
2018-01-02 21:08:12 -05:00
Andrew Kelley aafb832288
Merge pull request #668 from sparrisable/master
Added format for floating point numbers. {.x} where x is the number of decimals.
2017-12-30 23:21:02 -05:00
Peter Rönnquist d15b02a6b6 Added format for floating point numbers. {.x} where x is the number of decimals. 2017-12-31 00:27:58 +01:00
Josh Wolfe 4e3d7fc4bc fix self-hosted parser test 2017-12-26 23:29:15 -07:00
Josh Wolfe 192a039173 move utf8 parsing to std
source files no longer need to end with a newline
2017-12-26 23:17:33 -07:00
Josh Wolfe 08dd1b553b set compile flags for zip_cpp 2017-12-26 18:05:43 -07:00
Andrew Kelley 6fece14cfb self-hosted: build against zig_llvm and embedded LLD
Now the self-hosted compiler re-uses the same C++ code for interfacing
with LLVM as the C++ code.
It also links against the same LLD library files.
2017-12-26 19:44:08 -05:00
Andrew Kelley 2a25398c86 fix segfault when passing union enum with sub byte...
...field to const slice parameter

we use a packed struct internally to represent a const array
of disparate union values, and needed to update the internal
getelementptr instruction to recognize that.

closes #664
2017-12-24 04:11:58 -05:00
Andrew Kelley 86397a532e docs: fix typo 2017-12-24 02:52:30 -05:00
Josh Wolfe f0a1753607 add source encoding rules to the docs. see #663 2017-12-23 22:23:06 -07:00
Josh Wolfe d6a74ed463 [self-hosted] source must be valid utf8. see #663 2017-12-23 21:47:13 -07:00
Josh Wolfe fb96c3e73e debug needs to export FailingAllocator 2017-12-23 21:47:13 -07:00
Andrew Kelley 4183c6f1a5 move std/debug.zig to a subdirectory
self hosted compiler parser tests do some fuzz testing
2017-12-23 22:15:48 -05:00
Andrew Kelley 9dae796fe3 translate-c: set up debug scope for translated functions 2017-12-23 22:14:35 -05:00
Andrew Kelley 79c2ceb2d5 build: findLLVM correctly handles system libraries 2017-12-23 22:14:35 -05:00
Andrew Kelley e0a1466bd8 build: add --search-prefix option 2017-12-23 22:14:35 -05:00
Andrew Kelley 2031989d98 std.os.path.resolve handles an absolute path that is missing the drive 2017-12-23 22:14:35 -05:00
Josh Wolfe 0082989f22 [self-hosted] tokenizer error for ascii control codes 2017-12-23 18:35:45 -07:00
Josh Wolfe 45ab752f9a source files must end with newline 2017-12-23 17:47:48 -07:00
Andrew Kelley 39c7bd24e4 port most of main.cpp to self hosted compiler 2017-12-23 00:57:56 -05:00
Andrew Kelley 760b307e8a fix endianness of sub-byte integer fields in packed structs
closes #307
2017-12-22 18:27:33 -05:00
Andrew Kelley e44a11341d std.math: remove unnecessary inline calls and
workaround windows 32 bit test failure
See #537
2017-12-22 13:14:07 -05:00
Josh Wolfe 0e7fb69bea bufPrint returns an error 2017-12-22 00:52:01 -07:00