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
Paul Espinosa
b45a2d72c8
Introduce Error Union and Use Writer
...
This commit edits the "Hello, World!" introduction. It introduces Error Union
Types. Also, it changes `outStream` to `writer` in the code example and description.
2020-07-11 18:08:00 +07:00
Vexu
2e037fd827
use correct cast function when doing @floatCast at comptime
2020-07-11 11:36:28 +03:00
Paul
e57458a94f
Update doc/langref.html.in
...
Co-authored-by: Joachim Schmidt <joachim.schmidt557@outlook.com>
2020-07-11 09:10:08 +07:00
Paul
50df1334f3
Update doc/langref.html.in
...
Co-authored-by: Joachim Schmidt <joachim.schmidt557@outlook.com>
2020-07-11 09:09:57 +07:00
Paul
656b640e79
Update doc/langref.html.in
...
Co-authored-by: Joachim Schmidt <joachim.schmidt557@outlook.com>
2020-07-11 09:09:43 +07:00
Paul
5afa7f2545
Update doc/langref.html.in
...
Co-authored-by: Joachim Schmidt <joachim.schmidt557@outlook.com>
2020-07-11 09:09:07 +07: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 2e1bdd0d14f490a80bbed3ee0e0479a908715d33.
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
Paul Espinosa
f510f38592
Explain Language Ref's Hello World
...
To introduce the Zig programming language, the "Hello, world!" code sample now has
documentation to explain some of the features shown in the code sample
and contains links to those features in the rest of the documentation.
Writing style goals:
* Balance writing style to keep beginner and experience programmers interested.
* Be concise: allow the rest of the documentation to clarify language features.
2020-07-09 21:32:51 +07: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
Noam Preil
aaaebfe97f
Detect unexpected compilation errors in tests
2020-07-07 16:47:39 -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
b55d0193e4
stage2: progress towards Block and CondBr codegen
2020-07-07 08:01:54 +00:00
Andrew Kelley
4d01385e14
fix liveness analysis and not correctly propagating link errors
...
We still flush the ELF file even when there are compile errors.
2020-07-07 03:48:20 +00:00
Noam Preil
0db0258fb2
Remove old comment
2020-07-06 17:54:06 -04:00