LemonBoy
51cbd96820
Fix sentinel value of opaque pointers in typeInfo
...
Fixes #3888
2019-12-20 15:48:34 -05:00
LemonBoy
f077c3c4cc
Fix comptime evaluation of runtime array access
...
Fix #3951
2019-12-20 15:47:43 -05:00
LemonBoy
d8499f7abe
Make sure the fields array is always non-null
...
Fixes #3497
2019-12-17 15:45:22 -05:00
Andrew Kelley
1cad0acc7e
add behavior test for vector comparison
2019-12-16 11:22:28 -05:00
Vexu
0f38410ea6
improve extern enum
2019-12-15 19:28:53 -05:00
LemonBoy
59de23dfa0
Don't assume TLS storage has a fixed address
...
Fixes #3433
2019-12-15 16:23:42 -05:00
LemonBoy
19ddbd9e9e
Make sure the address is aligned for intToPtr ops
...
Closes #773
2019-12-15 14:41:05 -05:00
Andrew Kelley
e54c49be9b
uncomment a now-passing behavior test
2019-12-12 19:45:33 -05:00
Robin Voetter
4b4fbe3887
Replace @typeOf with @TypeOf in all zig source
...
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
2019-12-10 11:09:41 -05:00
Andrew Kelley
a3f6a58c77
remove var args from the language
...
closes #208
2019-12-09 15:27:27 -05:00
Andrew Kelley
f205d23e65
implement async function call with @call
...
this removes the last usage of var args in zig std lib
2019-12-09 15:27:26 -05:00
Andrew Kelley
69b587c1d3
add regression cases for now-passing tests
...
closes #2749
2019-12-09 15:23:51 -05:00
Andrew Kelley
5d82744f1c
ability to give comptime and non-comptime types to same parameter
2019-12-09 13:30:53 -05:00
Andrew Kelley
5874cb04bd
implement tuple concatenation
2019-12-08 22:44:41 -05:00
LemonBoy
d5e788072d
Make array types (quasi-)lazy
...
Fixes #3843
2019-12-08 17:29:59 -05:00
Andrew Kelley
1cb19d1a46
fix anon struct literal field initialized with fn call
2019-12-08 17:28:34 -05:00
Andrew Kelley
fe8d65556d
add syntax for comptime struct fields
2019-12-08 12:26:20 -05:00
Andrew Kelley
119ed128c0
implement comptime struct fields
2019-12-08 12:26:20 -05:00
LemonBoy
19c1b5a33a
Fix for @Type not picking up the sentinel value
...
The code converted the whole TypeInfo payload into an optional type
instead of using the "sentinel" field value.
Fixes #3828
2019-12-08 10:28:29 -05:00
Andrew Kelley
edebe0586b
remove compile error for peer result comptime_int and null
...
closes #2763
2019-12-07 13:03:43 -05:00
Andrew Kelley
ecb77af534
add regression test for fixed bug
...
closes #3742
2019-12-06 17:20:27 -05:00
Andrew Kelley
525b1e8fb4
Merge pull request #3856 from ziglang/builtin-call
...
introduce `@call` and remove other builtin calls
2019-12-06 15:49:47 -05:00
Andrew Kelley
71b7f4b47f
remove @newStackCall
from zig
2019-12-06 14:52:09 -05:00
Andrew Kelley
343987cd05
remove @inlineCall
from zig
2019-12-06 14:12:01 -05:00
Andrew Kelley
b1895da9b8
add behavioral test case for previous commit
2019-12-06 12:27:56 -05:00
Andrew Kelley
1f602fe8c5
implement @call
...
closes #3732
2019-12-05 17:07:15 -05:00
Andrew Kelley
6d8550a7df
fix crash assigning optional struct with anon literal
...
closes #3827
2019-12-02 01:09:06 -05:00
Andrew Kelley
080316cd4f
fix assigning to an unwrapped optional field in an inline loop
2019-12-01 18:55:35 -05:00
Andrew Kelley
8524404f71
this test isn't passing in master branch either
2019-12-01 16:39:30 -05:00
Andrew Kelley
b220be7a33
more test regression fixes
2019-11-29 23:04:19 -05:00
Andrew Kelley
815b4cfd9d
fix return result loc as peer result loc in inferred error set function
2019-11-29 18:21:21 -05:00
Andrew Kelley
bcdb3a9006
more progress
2019-11-28 00:02:53 -05:00
Andrew Kelley
bf3ac66150
remove type coercion from array values to references
...
* Implements #3768 . This is a sweeping breaking change that requires
many (trivial) edits to Zig source code. Array values no longer
coerced to slices; however one may use `&` to obtain a reference to
an array value, which may then be coerced to a slice.
* Adds `IrInstruction::dump`, for debugging purposes. It's useful to
call to inspect the instruction when debugging Zig IR.
* Fixes bugs with result location semantics. See the new behavior test
cases, and compile error test cases.
* Fixes bugs with `@typeInfo` not properly resolving const values.
* Behavior tests are passing but std lib tests are not yet. There
is more work to do before merging this branch.
2019-11-27 03:37:50 -05:00
Andrew Kelley
4261fa3c49
move logic to the appropriate layers; add new compile error
2019-11-25 18:46:17 -05:00
Andrew Kelley
cb38bd0a14
rename std.heap.direct_allocator to std.heap.page_allocator
...
std.heap.direct_allocator is still available for now but it is marked
deprecated.
2019-11-25 17:25:06 -05:00
Andrew Kelley
15d415e10b
make std.mem.toSlice use null terminated pointers
...
and fix the fallout
2019-11-24 21:21:05 -05:00
Andrew Kelley
4018034708
add test cases for arbitrary pointer sentinels
2019-11-24 16:52:32 -05:00
Andrew Kelley
09ec720dab
fix comptime @ptrCast
of pointers to arrays
2019-11-24 16:25:26 -05:00
Andrew Kelley
f7574f44c1
add test for struct with var field
2019-11-24 15:20:15 -05:00
Andrew Kelley
44b1dc6db8
add type coercion: [:x]T to [*:x]T
2019-11-24 15:17:55 -05:00
Andrew Kelley
4c7b52503b
all tests passing
2019-11-24 02:14:21 -05:00
Andrew Kelley
f25182f46d
structs can have fields with type var
...
behavior tests passing now
2019-11-23 17:51:37 -05:00
Andrew Kelley
7597735bad
update the stage1 implementation to the new proposal
...
See #3731
2019-11-23 04:45:35 -05:00
Andrew Kelley
fd6020c4e2
update tests, better error messages, update self-hosted tokenizer
2019-11-21 20:43:41 -05:00
Andrew Kelley
47f06be369
string literals are now null terminated
...
this also deletes C string literals from the language, and then makes
the std lib changes and compiler changes necessary to get the behavior
tests and std lib tests passing again.
2019-11-21 20:43:41 -05:00
Andrew Kelley
21f344b3b9
add null terminated pointers and arrays to self-hosted
...
as well as `@typeInfo` and `@Type`
2019-11-21 20:43:41 -05:00
Andrew Kelley
1aa978f32e
implement null terminated pointers
2019-11-21 20:43:41 -05:00
Andrew Kelley
9eed0d3603
add regression test case. closes #2889
2019-11-18 19:54:37 -05:00
Andrew Kelley
828abe046f
add regression test case. closes #3007
2019-11-18 19:51:49 -05:00
daurnimator
4e28d7a5f7
fix bug on empty error union
2019-11-17 22:29:49 +00:00