Noam Preil
b91cf15972
CBE: Move standards determination to generated code
2020-07-07 22:57:34 -04:00
Noam Preil
64bf130182
CBE: working asm Inputs and Outputs; std{int,def}.h auto-inclusion
2020-07-07 21:35:42 -04:00
Noam Preil
cf09b335d8
CBE: Working function call w/ no args or return value
2020-07-07 19:35:33 -04:00
Noam Preil
6ece36a051
Working translation of empty function
2020-07-07 17:51:59 -04:00
Noam Preil
a17200dab1
CBE skeleton
2020-07-07 16:40:14 -04:00
Noam Preil
b4c571301b
Stage2: Refactor in preparation for C backend
2020-07-07 14:55:44 -04:00
Andrew Kelley
abcd4ea5d8
Merge pull request #5793 from pfgithub/stage-2-testing
...
stage2 + operator and @as builtin
2020-07-05 22:58:05 +00:00
xackus
51f8c306d9
stage1: add missing runtime safety for @intCast unsigned -> signed of same bit count
2020-07-05 17:58:21 +02:00
pfg
4a63189bf1
stage2: add and @as tests
2020-07-04 15:30:17 -07:00
Ian Simonson
70cc1751ca
Translate-c fix rhs not cast on array access
...
Closes #5671 . Checks if the rhs is integral and of
differing or the same signedness. If they are different
does an @intCast to the lhs type
2020-07-02 14:05:12 +00:00
Andrew Kelley
8b82c40104
stage1: reimplement HashMap
...
The indexes are stored separately using an array of
uint8_t, uint16_t, uint32_t, or size_t, depending on the number of
entries in the map.
Entries only contain a key and a value, no longer have
distance_from_start_index or is_used.
In theory this should be both faster and use less memory.
In practice it seems to have little to no effect. For the standard
library tests, vs master branch, the time had no discernable
difference, and it shaved off only 13 MiB of peak rss usage.
2020-07-02 04:53:26 +00:00
Andrew Kelley
581d16154b
Merge pull request #5696 from alexnask/async_call_tuple
...
@asyncCall now takes arguments as a tuple instead of varargs
2020-06-28 01:00:58 -04:00
Andrew Kelley
ac6bf53069
stage2: clean up test harness, implement symbol collision detection ( #5708 )
...
* Clean up test harness
* Stage2/Testing: Add convenience wrappers
* Add a `compiles` wrapper case
* fix incremental compilation after error
* exported symbol collision detection
* function redefinition detection for Zig code
* handle missing function names
* Stage2/Testing: Simplify incremental compilation tests
* Stage2/Testing: Update documentation
* Stage2/TestHarness: Improve progress reporting
* Disable test
* Improve Tranform failure output
2020-06-27 21:54:11 -04:00
Noam Preil
97c41e7152
Disable test
2020-06-27 21:10:44 -04:00
Noam Preil
ab307a22f6
Stage2: remove clearErrors, fix ZIR export collision detection
2020-06-27 07:17:20 -04:00
Noam Preil
0e952a9f3a
Stage2/Testing: Simply incremental compilation tests
2020-06-26 05:00:53 -04:00
Noam Preil
c8f60b2e2f
Stage2: handle missing function names
2020-06-26 04:36:17 -04:00
Noam Preil
6510888039
Stage2: function redefinition detection for Zig code
2020-06-26 04:05:41 -04:00
Noam Preil
4a17e008da
Stage2: exported symbol collision detection
2020-06-26 03:17:13 -04:00
Noam Preil
649da2df52
Stage2/Testing: Add convenience wrappers
2020-06-26 02:42:02 -04:00
data-man
77bb2dc094
Use writer in benchmarks
2020-06-25 19:07:25 -04:00
arbrk1
78d8931647
Fix issue #5618 ( #5685 )
...
* fix issue #5618
* A test for the issue #5618 added.
Also inserted a comma in the neighboring test to make it more zigfmt-friendly.
2020-06-24 23:58:50 -04:00
Alexandros Naskos
2fde8249b7
Fixed crash when resolving peer types of *[N:s]const T and [*:s]const T
2020-06-24 23:58: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
Andrew Kelley
e42b7702eb
Merge remote-tracking branch 'origin/master' into zig-ast-to-zir
2020-06-24 15:36:59 -04:00
Alexandros Naskos
129a4fb251
Copy union const values correctly
2020-06-24 15:21:58 -04:00
Alexandros Naskos
7f342451b6
Fixed @asyncCall in runtime safety test
2020-06-24 18:43:11 +03:00
Alexandros Naskos
eefcd04462
Small fixes, fixed tests, added test for argument tuple type
2020-06-24 16:56:24 +03:00
Andrew Kelley
14aa08fcd3
self-hosted: restore ZIR functionality
2020-06-24 03:46:32 -04:00
antlilja
0de35af98b
Add duplicate checking for switch on types
...
* Add compile error tests
2020-06-23 15:17:04 -04:00
Andrew Kelley
44bd0a2670
Merge pull request #5662 from shtanton/meta-cast
...
Adds std.meta.cast and uses it to simplify translate-c
2020-06-22 19:54:30 -04:00
xackus
d907f574e0
stage1: fix concat of sliced str literals
2020-06-21 14:57:12 -04:00
Robin Voetter
8696e52a3d
Make unary minus for unsigned types a compile error ( #5654 )
...
* Make unary minus for unsigned types a compile error
* Add unreachable when generating unsigned negate
2020-06-21 14:55:44 -04:00
Charlie Stanton
6f47513009
Adds std.meta.cast and uses it to simplify translate-c
2020-06-21 18:24:59 +01:00
Ryan Liptak
399f6b77c4
Add 'no changes' test to zig fmt cli test
2020-06-20 22:21:23 -07:00
Ryan Liptak
b216d8de88
Simplify unformatted code in zig fmt cli test
2020-06-20 22:20:23 -07:00
Ryan Liptak
ca9d8a1337
Add zig fmt test to cli tests for both files and directories
...
Should catch basic `zig fmt` regressions that were previously going uncaught and breaking things
2020-06-20 22:02:55 -07:00
Andrew Kelley
c70633eacd
Merge pull request #5203 from tadeokondrak/@type-for-even-more-types
...
implement @typeInfo for Frame and implement @Type for Frame, EnumLiteral, and ErrorSet
2020-06-18 21:25:03 -04:00
Andrew Kelley
5ea0f589c9
Merge pull request #5625 from antlilja/master
...
Improve support for f128 and comptime_float operations
2020-06-18 20:32:43 -04:00
Andrew Kelley
4a38799631
make file and fn_name fields of SourceLocation also null-terminated
...
One of the main motivating use cases for this language feature is
tracing/profiling tools, which expect null-terminated strings for these
values. Since the data is statically allocated, making them
additionally null-terminated comes at no cost.
This prevents the requirement of compile-time code to convert to
null-termination, which could increase the compilation time of
code with tracing enabled.
See #2029
2020-06-18 17:09:10 -04:00
Vexu
14acc65675
add tests for @src
2020-06-18 21:11:34 +03:00
antlilja
1157ee1307
Improve builtin op support for f128/comptime_float
...
* Add support for fabs, floor, ceil, trunc and round
* Add behavior tests
2020-06-17 17:35:45 +02:00
Andrew Kelley
f595545c10
Merge pull request #5422 from pixelherodev/error_tests
...
[Stage2/Testing] ZIR tests for expected errors
2020-06-16 03:50:56 -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
7ee0462f5f
Stage2/Testing: Fix transformation tests
2020-06-15 20:33:39 -04:00