Commit Graph

505 Commits (c664692bdd62765ab444a79a8704d2161c1809f1)

Author SHA1 Message Date
Andrew Kelley dd58278dbe
add behavior test for previous commit 2020-02-18 15:28:14 -05:00
Andrew Kelley 7f7d1fbe5a
Implement noasync awaits
Note that there is not yet runtime safety for this.

See #3157
2020-02-16 01:44:52 -05:00
Andrew Kelley cb3a818699
zig fmt: support `noasync await` 2020-02-16 01:44:52 -05:00
Andrew Kelley 72805fd66e
fix taking address of temporary async frame 2020-02-16 01:44:49 -05:00
LemonBoy 1c8ac2a0c1 test: Add test cases for the new capture behavior 2020-02-14 15:59:28 +01:00
Andrew Kelley e8dfc5e7f6
Merge pull request #4442 from fengb/testing-allocator-calls
Migrate tests from FixedBufferAllocator to testing.allocator
2020-02-13 16:17:21 -05:00
LemonBoy c5260f7f86 ir: Allow implicit conversion between vector types
Only valid when the number of elements match and the types are
compatible.

Fixes #4334
2020-02-13 12:13:56 +01:00
Benjamin Feng 699c50a375 Switch a bunch of FBA to use testing.allocator 2020-02-12 17:17:56 -06:00
LemonBoy 6c05f0949a ir: Fix erroneous error message for ptr casts
Don't blindly throw an error if two integer types are checked for
compatibility.

Bug reported in #4430
2020-02-11 17:03:11 +01:00
LemonBoy f8fd8c481a test: Skip the atomic-on-fp test for riscv64 2020-02-11 17:03:10 +01:00
Timon Kruiper 2618366055 Add cast between [*c]T and ?[*:0]T on fn parameter
Fixes #4176
2020-02-10 19:43:58 -05:00
Andrew Kelley 04ee3b01a1
fix defer interfering with return value spill 2020-02-09 17:19:28 -05:00
Andrew Kelley 24d197b037
solve previous commit a better way 2020-02-08 15:28:12 -05:00
Andrew Kelley d80db3546c
Revert "properly spill optional payload capture value"
This reverts commit 80ba21b83c.
2020-02-08 15:07:12 -05:00
Andrew Kelley 80ba21b83c
properly spill optional payload capture value 2020-02-08 14:59:33 -05:00
Andrew Kelley 884804dbc3
fix async runtime function call resolves target fn frame 2020-02-08 13:45:31 -05:00
Andrew Kelley 877f39d227
fix async function call resolves target fn frame 2020-02-07 22:48:31 -05:00
Andrew Kelley 39ee1f4b97
fix invalid behavior tests from prev commit
and fix "no-op casts" from incorrectly spilling
2020-02-07 16:31:52 -05:00
Andrew Kelley 4a60689309
more carefully calculate llvm field indexes
more correctly solves #4403
2020-02-07 14:54:58 -05:00
Andrew Kelley 65b1a4953f
Merge pull request #4324 from fengb/testing-allocator
Remove debug.global_allocator in favor of testing.allocator
2020-01-30 10:01:40 -05:00
Benjamin Feng 46d84a1b63 Convert a few more page_allocator 2020-01-30 00:27:44 -06:00
Benjamin Feng b7a236d68e Convert a bunch of page_allocator to testing.allocator 2020-01-29 22:22:01 -06:00
Benjamin Feng b077f3ab7d Promoted "leak_count_allocator" to the main testing.allocator 2020-01-29 22:22:00 -06:00
LemonBoy fe4ef7b461
Fix comptime float-int comparisons
Closes #4259
2020-01-29 16:37:55 -05:00
Benjamin Feng ffd30dbe28 Fix stage1 test 2020-01-29 15:30:13 -06:00
LemonBoy 59bc1d2721 Fix edge case in switch with single else
ir_gen_switch_expr doesn't set the switch_br field at all if there are
zero cases, detect this situation and handle it gracefully.

Closes #4322
2020-01-29 16:05:14 -05:00
Benjamin Feng aa9caf5064 Create leak_count_allocator 2020-01-29 14:37:01 -06:00
Benjamin Feng 4d134a01f5 Move debug.global_allocator to testing.allocator 2020-01-29 12:21:29 -06:00
Benjamin Feng 9a0a378e2f Add test cases for suspend in while loops 2020-01-29 10:01:51 -06:00
Andrew Kelley 287d3c37e1
fix 0-bit child type coerced to optional return ptr result location
by un-special-casing 0 bit types in result locations
2020-01-28 11:39:36 -05:00
Andrew Kelley 9d59cdb8c1
fix auto created variables not having correct alignment 2020-01-27 19:42:32 -05:00
Andrew Kelley 37ab960492
fix not handling undefined u0 correctly 2020-01-27 18:59:46 -05:00
Andrew Kelley b38b967844
fix triple level result location with bitcast sandwich
...passed as tuple element
2020-01-27 18:26:39 -05:00
Andrew Kelley c0fee9dfc7
fix nested bitcast passed as tuple element 2020-01-27 17:30:39 -05:00
Andrew Kelley e2778c03e0
Merge branch 'master' into ir-clean-up-vars 2020-01-27 13:32:39 -05:00
Andrew Kelley 1a08c0d40b
new test case 2020-01-23 00:46:44 -05:00
Andrew Kelley 830e0ba2d2 enable native CPU feature for windows; disable failing tests
See #508. These can be re-enabled when we upgrade to LLVM 10.
2020-01-21 21:46:06 -05:00
Andrew Kelley 7bb4c855ad
Merge pull request #4222 from LemonBoy/eutwouwth
Prevent crash with empty non-exhaustive enum
2020-01-18 19:25:23 -05:00
LemonBoy b0f753e21d Fix edge case in tagName handling of unions
Closes #4226
2020-01-18 20:16:15 +01:00
LemonBoy c53d94e512 Prevent crash with empty non-exhaustive enum 2020-01-18 15:13:21 +01:00
LemonBoy 5f2bac010d Allow @tagName on enum literals
Closes #4214
2020-01-18 09:55:18 +01:00
Andrew Kelley b5ac079f88
Merge pull request #4191 from Vexu/non-exhaustive-enums
Implement non-exhaustive enums
2020-01-17 14:26:12 -05:00
Vexu 39f92a9ee4
improve behavior test 2020-01-17 09:50:20 +02:00
Andrew Kelley 396d57c498
fix failing array test by improving copy_const_val 2020-01-16 21:58:53 -05:00
Andrew Kelley 8f336b3970
revert one part of ir get_elem_ptr analysis
this reverts one part of 4c3bfeca. it solves some behavior regressions
but introduces new ones. This change was incorrect to make however,
and this commit takes the code in a better direction.
2020-01-16 21:58:52 -05:00
Andrew Kelley 6a8c9f7306
fix regression with optionals and globals 2020-01-16 21:58:52 -05:00
Andrew Kelley b952b84486
relax language requirements regarding else unreachable 2020-01-16 21:58:52 -05:00
Andrew Kelley 8bf425957b
fix regressions double implicit casting return ptr 2020-01-16 21:58:52 -05:00
Andrew Kelley e48157c3cb
fix regression with inferred struct fields 2020-01-16 21:58:52 -05:00
Andrew Kelley fb8da16a60
fix regressions in get_elem_ptr related to undefined 2020-01-16 21:58:52 -05:00