74 Commits

Author SHA1 Message Date
Noam Preil
38d2c5cdf1
Rename type -> extension 2020-06-27 21:39:04 -04:00
Noam Preil
1861c25142
Improve Tranform failure output 2020-06-27 21:15:23 -04:00
Noam Preil
54148a8c88
Stage2/TestHarness: Improve progress reporting 2020-06-27 20:01:20 -04:00
Noam Preil
52787f2c9b
Fix a dumb 2020-06-26 06:52:29 -04:00
Noam Preil
6d536168b0
Stage2/Testing: Update documentation 2020-06-26 06:51:35 -04:00
Noam Preil
0e952a9f3a
Stage2/Testing: Simply incremental compilation tests 2020-06-26 05:00:53 -04:00
Noam Preil
53fead580e
Add a compiles wrapper case 2020-06-26 03:09:56 -04:00
Noam Preil
649da2df52
Stage2/Testing: Add convenience wrappers 2020-06-26 02:42:02 -04:00
Noam Preil
c88edbc46f
OOM -> catch unreachable 2020-06-24 23:34:58 -04:00
Noam Preil
5d7e981f95
Clean up test harness 2020-06-24 22:43:18 -04:00
Andrew Kelley
20b4a2cf2c self-hosted: add compare output test for new AST->ZIR code 2020-06-24 21:28:42 -04:00
Andrew Kelley
5aa3f56773 self-hosted: fix test regressions
I'm allowing incremental compilation of ZIR modules to be broken. This
is not a real use case of ZIR, and the feature requires a lot of code
duplication with incremental compilation of Zig AST (which works great).
2020-06-24 20:28:52 -04:00
Noam Preil
a99e61ebaa
Stage2/Testing: Code cleanup 2020-06-15 21:47:42 -04:00
Noam Preil
afec3e72f4
Stage2/Testing: Enable another test 2020-06-15 20:42:22 -04:00
Noam Preil
7d1c9a69cc
Stage2/Testing: Remove dead code 2020-06-15 20:33:43 -04:00
Noam Preil
adb21f1caf
Stage2/Testing: Add error tests to ZIRCase 2020-06-15 20:33:43 -04:00
Noam Preil
7ee0462f5f
Stage2/Testing: Fix transformation tests 2020-06-15 20:33:39 -04:00
Noam Preil
1e5945d0a9
Stage2/Testing: remove ZIRTransformCase 2020-06-15 20:33:39 -04:00
Noam Preil
71dca252a5
Stage2/Testing: Rename stage -> update 2020-06-15 20:33:32 -04:00
Noam Preil
b6bd51ed69
Stage2/Testing: Move Transformation case to ZIRCase 2020-06-15 20:33:25 -04:00
Noam Preil
e77fc7fe7e
Stage2/Testing: Fix error specification 2020-06-15 20:33:17 -04:00
Noam Preil
6dce317fe3
Stage2/Testing: Fix error tests 2020-06-15 20:33:07 -04:00
Noam Preil
d4fd7c6a01
Stage2/Testing: Staged test harness draft design 2020-06-15 20:32:54 -04:00
Noam Preil
bf8b3a4394
[Stage2/Testing] Handle decl and export errors 2020-06-15 17:51:43 -04:00
Noam Preil
68cc068a3a
[Stage2/Testing] Make API more friendly 2020-06-15 17:51:43 -04:00
Noam Preil
e030414c16
[Stage2/Testing] Always finish case, note all errs 2020-06-15 17:51:43 -04:00
Noam Preil
f2399db3ef
[Stage2/Testing] Don't rely on update erroring 2020-06-15 17:51:42 -04:00
Noam Preil
67414be86b
[Stage2/Testing] Print name of failed test 2020-06-15 17:51:42 -04:00
Noam Preil
c92816fbef
[Stage2/Testing] ZIR tests for expected errors 2020-06-15 17:51:29 -04:00
Andrew Kelley
47090d234e stage2: add passing test for compile error in unreferenced cycle 2020-06-08 15:16:40 -04:00
Andrew Kelley
b0968abccb update ZIR compare output test to test incremental updates 2020-05-17 13:49:22 -04:00
Andrew Kelley
cd5f69794d cross compile the stage2 tests for the target that they work for 2020-05-16 12:19:31 -04:00
Andrew Kelley
294bfb3321 stage2 zir tests passing 2020-05-15 23:54:13 -04:00
Andrew Kelley
a32d3a85d2 rework self-hosted compiler for incremental builds
* introduce std.ArrayListUnmanaged for when you have the allocator
   stored elsewhere
 * move std.heap.ArenaAllocator implementation to its own file. extract
   the main state into std.heap.ArenaAllocator.State, which can be
   stored as an alternative to storing the entire ArenaAllocator, saving
   24 bytes per ArenaAllocator on 64 bit targets.
 * std.LinkedList.Node pointer field now defaults to being null
   initialized.
 * Rework self-hosted compiler Package API
 * Delete almost all the bitrotted self-hosted compiler code. The only bit
   rotted code left is in main.zig and compilation.zig
 * Add call instruction to ZIR
 * self-hosted compiler ir API and link API are reworked to support
   a long-running compiler that incrementally updates declarations
 * Introduce the concept of scopes to ZIR semantic analysis
 * ZIR text format supports referencing named decls that are declared
   later in the file
 * Figure out how memory management works for the long-running compiler
   and incremental compilation. The main roots are top level
   declarations. There is a table of decls. The key is a cryptographic
   hash of the fully qualified decl name. Each decl has an arena
   allocator where all of the memory related to that decl is stored.
   Each code block has its own arena allocator for the lifetime of
   the block. Values that want to survive when going out of scope in
   a block must get copied into the outer block. Finally, values must
   get copied into the Decl arena to be long-lived.
 * Delete the unused MemoryCell struct. Instead, comptime pointers are
   based on references to Decl structs.
 * Figure out how caching works. Each Decl will store a set of other
   Decls which must be recompiled when it changes.

This branch is still work-in-progress; this commit breaks the build.
2020-05-10 02:05:54 -04:00
Andrew Kelley
92f3e9c92a remove last use of share_with_child_process 2020-05-02 01:54:36 -04:00
Andrew Kelley
1d202008d8 add ZIR transform test case 2020-05-01 06:47:20 -04:00
Andrew Kelley
2bae942800 add ZIR compare output test case to test suite 2020-05-01 06:47:20 -04:00
Andrew Kelley
9e7ae06249
std lib API deprecations for the upcoming 0.6.0 release
See #3811
2020-03-30 14:23:22 -04:00
Andrew Kelley
46ffc798b6
fix swapped logic for Windows
Remove `std.fs.deleteTree`. Callers instead should use
`std.fs.cwd().deleteTree`.

Add `std.fs.deleteTreeAbsolute` for when the caller has an absolute
path.
2020-03-18 16:42:47 -04:00
daurnimator
1ca5f06762
Update callers of fs.makePath 2020-03-03 13:25:43 -05:00
Ryan Liptak
834218d789 Fix remaining variadic formatted prints
Used a series of regex searches to try to find as many instances of the old pattern as I could and update them.
2020-01-09 13:36:44 -05:00
Vexu
4d8a8e65df
add more workarounds 2019-11-27 10:17:37 +02:00
Vexu
36849d8a7b
fixes and cleanup in self hosted 2019-11-26 11:52:12 +02:00
Vexu
0cbf00a3ec
self hosted compiler: final small fixes to get it compiling 2019-11-24 10:24:47 +02:00
Vexu
b9ef36094c
re-enable stage2 tests 2019-11-23 22:57:34 +02:00
Vexu
d40f204ec0
self hosted compiler: small miscellaneous fixes 2019-11-23 21:57:24 +02:00
Vexu
03cc81665b
Merge branch 'master' into modernize-stage2 2019-11-23 19:13:48 +02:00
Andrew Kelley
0237e7a701 std.io.getStdOut and related fns no longer can error
Thanks to the Windows Process Environment Block, it is possible to
obtain handles to the standard input, output, and error streams without
possibility of failure.
2019-11-13 04:01:40 +00:00
Vexu
c6076a1360
self hosted compiler: use enum literals 2019-11-07 10:30:56 +02:00
Vexu
9394d14815
self hosted compiler: unify Target and std.Target 2019-11-07 10:30:47 +02:00