Andrew Kelley
25b1c00c72
stage2: add implicit return void where applicable
2020-07-13 00:08:21 -07:00
Andrew Kelley
c306392b44
stage2: codegen: more branching support
2020-07-13 00:08:21 -07:00
Andrew Kelley
b75a51f94b
stage2: implement function calling convention for calls
2020-07-13 00:08:21 -07:00
Andrew Kelley
8fe63d5042
stage2: peer type resolution with noreturn
2020-07-13 00:08:21 -07:00
Andrew Kelley
1cab40d783
Merge pull request #5864 from pixelherodev/cbe
...
CBE: get basic returns working
2020-07-13 07:07:27 +00:00
Noam Preil
8d6cadee16
CBE: Code cleanup
2020-07-13 01:49:04 -04:00
Noam Preil
4a46248198
CBE: Only generate (void) for calls whose return values are ignored
2020-07-13 01:49:04 -04:00
Noam Preil
a124b027b4
CBE: Use hasCodeGenBits instead of checking against void and noreturn
2020-07-13 01:49:04 -04:00
Noam Preil
3bad1c16cc
Get basic return test working
2020-07-13 01:49:04 -04:00
pixelherodev
2c882b2e65
CBE: Make C an ObjectFormat instead of a special bool ( #5849 )
2020-07-12 22:56:31 -04:00
Vexu
dff1ac1089
check for invalid sentinel when creating pointer with @Type
2020-07-13 00:29:53 +00:00
Isaac Freund
ef17af1270
std: add mem.joinZ
...
currently the only options are doing a second allocation and copying or
implementing this yourself.
2020-07-12 22:17:40 +00:00
xackus
5b570bceb5
document a few functions in std.mem
2020-07-12 21:55:49 +00:00
Andrew Kelley
7adbc11403
Merge pull request #5857 from daurnimator/use-unmanaged
...
Use unmanaged datastructures from std.http.headers
2020-07-12 21:46:26 +00:00
Sam Tebbs
873e187f05
Make allocator test functions public
2020-07-12 21:45:25 +00:00
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
daurnimator
91235b9371
std: don't store allocator inside of std.http.HeaderEntry
2020-07-13 00:38:59 +10:00
daurnimator
f7e4014c82
std: use *Unmanaged data structures in http.Headers object
2020-07-13 00:34:58 +10:00
daurnimator
4b48266bb7
std: add StringHashMapUnmanaged
2020-07-13 00:34:02 +10: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 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
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