Commit Graph

9690 Commits

Author SHA1 Message Date
Jakub Konka
eea7271c4e Fix incorrect continue condition in PreopeonList
Also, check for overflow on incremented file descriptors. Previously,
we'd trigger a panic if we exceeded the `fd_t` resolution. Now, instead,
we throw an `error.Overflow` to signal that there can be no more
file descriptors available from the runtime. This way we give the user
the ability to still be able to check if their desired preopen exists
in the list or not.
2020-07-12 21:02:33 +00:00
Vexu
e1a5e061ca revert accidental format of tests
these test the tokenizers handling of EOF and formatting makes them useless
2020-07-12 11:27:50 +03:00
Vexu
bfe9d4184f fix alignment parsing in stage1 2020-07-12 07:35:34 +00:00
Andrew Kelley
fe08a4d065 Merge pull request #5846 from Vexu/anytype
Rename 'var' type to 'anytype'
2020-07-12 07:35:01 +00:00
Andrew Kelley
2dcb70a6be Merge pull request #5847 from Vexu/decl
Take advantage of new HashMap API's preserving order
2020-07-12 07:31:48 +00:00
Andrew Kelley
f23987db7d Sponsors Button => ZSF
Zig Software Foundation
2020-07-11 18:33:56 -04:00
Vexu
be1507a7af update compile error tests and some doc comments 2020-07-12 00:54:07 +03:00
Vexu
3e095d8ef3 use 'anytype' in translate-c 2020-07-11 22:04:38 +03:00
Vexu
1a989ba39d fix parser tests and add test for anytype conversion 2020-07-11 21:20:50 +03:00
Vexu
e85fe13e44 run zig fmt on std lib and self hosted 2020-07-11 20:41:19 +03:00
Vexu
9907116478 use typeInfo instead of hardcoded tables in std.Target 2020-07-11 20:11:20 +03:00
Vexu
2e6688ae27 Add test for @typeInfo declarations showing up in declaration order
Both the stage1 and std lib HashMap implementations now preserve insertion order
2020-07-11 19:51:20 +03:00
Vexu
8110639c79 add 'anytype' to stage1 and langref 2020-07-11 17:41:33 +03:00
Vexu
c2fb4bfff3 add 'anytype' to self-hosted parser 2020-07-11 17:41:16 +03:00
Vexu
2e037fd827 use correct cast function when doing @floatCast at comptime 2020-07-11 11:36:28 +03:00
Josh Wolfe
eddc68ad94 remove stray allocator parameter 2020-07-10 06:27:07 +00:00
Andrew Kelley
02619edf41 Revert "use correct cast function when doing @floatCast at comptime"
This reverts commit 2e1bdd0d14.

Test failures
2020-07-09 23:24:21 -07:00
Vexu
2e1bdd0d14 use correct cast function when doing @floatCast at comptime
Closes #5832
2020-07-09 21:25:55 +03:00
Andrew Kelley
a489ea0b2f Merge branch 'register-allocation' 2020-07-08 21:03:28 -07:00
Andrew Kelley
bf56cdd9ed start to make test runner aware of logging
by default the test runner will only print logs with "warning" or
higher. this can be configured via the std.testing API.

See #5738 for future plans
2020-07-08 21:01:13 -07:00
Andrew Kelley
7bd0500589 Merge remote-tracking branch 'origin/master' into register-allocation 2020-07-08 20:46:06 -07:00
Andrew Kelley
8e425c0c8d stage2: if AST=>ZIR 2020-07-08 20:33:33 -07:00
Andrew Kelley
0e1c7209e8 Merge pull request #5822 from pixelherodev/cbe
CBE cleanup
2020-07-09 03:32:34 +00:00
Ryan Liptak
12a7dedb1f langref: Expand "if error union with optional" test case
Follow-up to #5818, closes #5819
2020-07-09 03:30:35 +00:00
xackus
2064e84cdd ci: check langref.html for html errors 2020-07-08 19:34:44 +00:00
Ryan Liptak
f77c968cf8 langref: Add test case for "if error union with optional"
This is an edge case that isn't too uncommon but is rather confusing to try to deduce without documentation, since it feels like `else` is being overloaded in this scenario and there's no obvious 'correct' behavior here. This just adds a test demonstrating how Zig currently behaves in this scenario.
2020-07-08 19:32:15 +00:00
Paul Espinosa
eeae3a8f9d Rename langref's Index to Contents (TOC)
The language reference's Index is a list of the documentation's contents in
order of appearance. This commit renames "Index" to "Contents" as in table of
contents. It also renames the HTML/CSS identifiers from "index" to "toc".
2020-07-08 19:31:38 +00:00
Noam Preil
d060be8804 CBE: Don't expose openCFile, always close file after an update 2020-07-08 14:10:11 -04:00
Noam Preil
6b48634166 CBE: Emit asm decls for now, but rename to make them valid 2020-07-08 14:05:07 -04:00
Andrew Kelley
6fbb5f0a81 Merge pull request #5816 from pixelherodev/cbe
Beginnings of C backend
2020-07-08 10:45:17 +00:00
Andrew Kelley
be0546d877 stage2: implement compare operator AST->ZIR 2020-07-08 07:04:43 +00:00
Andrew Kelley
5e60872060 stage2 misc fixes 2020-07-08 06:56:20 +00:00
Andrew Kelley
8849604131 stage2: proper indenting when printing ZIR text 2020-07-08 05:44:51 +00:00
Andrew Kelley
ab9df5b04b stage2: machine code for condbr jumps 2020-07-08 05:35:41 +00:00
Noam Preil
9d92d62525 CBE: Only try to use GNU attribute when __GNUC__is set 2020-07-08 00:33:44 -04:00
Noam Preil
e2aad33d4e Stage2: facepalm. 2020-07-08 00:11:41 -04:00
Noam Preil
9aaffe00d3 CBE: Cleanup unimplementeds 2020-07-07 23:59:55 -04:00
Noam Preil
089c056dbe CBE: Improve resource cleanup 2020-07-07 23:24:30 -04:00
Noam Preil
7a6104929b CBE: truncate output file 2020-07-07 23:19:25 -04:00
Noam Preil
173e671241 CBE: Some cleanup 2020-07-07 23:11:17 -04:00
Vexu
5667a21b1e fix missing check on extern variables with no type 2020-07-08 03:09:41 +00:00
Noam Preil
b91cf15972 CBE: Move standards determination to generated code 2020-07-07 22:57:34 -04:00
Noam Preil
5461c482d0 CBE: Integrate into stage2 via --c-standard 2020-07-07 21:54: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
Andrew Kelley
597a363673 Merge pull request #5755 from kubkon/dir-iter-tests
[libstd]: add Dir.Iterator tests
2020-07-07 23:13:58 +00:00
Noam Preil
cf86aa8772 Fix a dumb in tests 2020-07-07 18:43:25 -04:00
Jakub Konka
417c928952 Add comment about memory invalidation in Iterator.next on Win 2020-07-08 00:03:45 +02:00
Noam Preil
6ece36a051 Working translation of empty function 2020-07-07 17:51:59 -04:00
Noam Preil
2f28ecf946 CBE: Get test more useful 2020-07-07 17:06:07 -04:00