23925 Commits

Author SHA1 Message Date
dweiller
4d296debef test: disable by-length slice test on wasm backend 2023-05-07 15:55:21 +10:00
dweiller
e507f0c0aa test: add behavior tests for pointer slice-by-length 2023-05-07 15:55:21 +10:00
dweiller
cba9077cc1 sema: fix slice by length non-array, non-slice case 2023-05-07 15:55:21 +10:00
dweiller
bd3360e03d convert s[start..start+len] to s[start..][0..len] 2023-05-07 15:55:21 +10:00
dweiller
2c5924c59a autodoc: fix support for slice_length ZIR instruction 2023-05-07 15:55:21 +10:00
dweiller
5bb8e9cd97 langref: mention slice-by-length pattern 2023-05-07 15:55:21 +10:00
dweiller
64e319f555 add optional sentinel to slice_length ZIR 2023-05-07 15:55:21 +10:00
dweiller
7c8d60e814 test: add behavior tests for slice-by-length 2023-05-07 15:55:20 +10:00
dweiller
2c2a0402c6 autodoc: implement slice_length case in walkInstruction 2023-05-07 15:55:20 +10:00
dweiller
8aa70cf6cd sema: omit extraneous addition when safety is unwanted 2023-05-07 15:55:20 +10:00
dweiller
9fb5b047e9 astgen: lower s[start..][0..len] to slice_length ZIR 2023-05-07 15:55:20 +10:00
dweiller
e58a0c5e9e sema: implement slice_length ZIR instruction 2023-05-07 15:55:20 +10:00
dweiller
a62b5d84d8 zir: add slice_length tag 2023-05-07 15:55:20 +10:00
Jacob Young
d71a43ec2c cbe: fix typos 2023-05-06 10:27:39 -07:00
Andrew Kelley
1e9811070b
Merge pull request #15591 from jacobly0/undef-errdefer-capture
AstGen: fix branch on undefined
2023-05-05 21:31:16 -07:00
David CARLIER
4bfd37ddb4 std.c: adding cpu affinity api for macOs (mainly x86_64) 2023-05-06 00:55:20 +03:00
Jacob Young
df4849c4f5 AstGen: cleanup previous fix
Allocating an extended tag is much cleaner and easier to reason about
than reusing an existing tag.  The previous `.data = undefined` was a
clear indication that we don't have any data to store, and so might as
well store an extended tag in that space almost for free.
2023-05-05 16:09:59 -04:00
Jacob Young
da878dc077 AstGen: fix branch on undefined
`isAlwaysVoid` was being called with the undefined tag added by
`addOne`, causing non-deterministic behavior failures with release
builds of the compiler.  Prevents the following random failure:

    test/behavior/defer.zig:120:40: error: expected type 'error{One}', found 'void'
2023-05-05 15:09:35 -04:00
Jacob Young
d70853ba39 main: add debug dump-zir command 2023-05-05 11:00:44 -07:00
Veikka Tuominen
a111130977
Merge pull request #15317 from devnexen/darwin_rand_nativegen
std: add CCRandomGenerateBytes macOs native api.
2023-05-05 19:52:05 +03:00
Loris Cro
9f3f9fb40f
Merge pull request #15578 from der-teufel-programming/autodoc-if-switch
Autodoc: Save and render source code for `if` and `switch`
2023-05-05 18:24:55 +02:00
Krzysztof Wolicki
538c8258c7 autodoc: Remove debug code 2023-05-05 12:01:00 +02:00
Krzysztof Wolicki
e0c65ce3f2 autodoc: main.js exprName cleanup 2023-05-05 02:46:04 +02:00
Krzysztof Wolicki
c63338712e autodoc: Save switches as comptimeExpr with the code instead of analyzing it deeply;
simplified getBlockSource;
2023-05-05 02:41:23 +02:00
Krzysztof Wolicki
e363ffad90 autodoc: Better comptimeExpr code for blocks 2023-05-05 01:46:19 +02:00
David CARLIER
012f9a97eb std.c: add os_proc_available_memory for darwin 2023-05-04 10:13:11 +03:00
Veikka Tuominen
3f3b1a6808 std.Build: use Step.* instead of *Step
Follow up to 13eb7251d37759bd47403db304c6120c706fe353
2023-05-03 20:55:29 -07:00
Jonathan Marler
5def162391 fix bug and simplify std.crypto.tls.Client.limitVecs 2023-05-03 20:52:18 -07:00
Andrew Kelley
f05cd008d8
Merge pull request #15559 from jacobly0/x86_64-behavior
x86_64: more behavior
2023-05-03 15:12:20 -07:00
Jacob Young
a19faa2481 x86_64: implement movement of more types
* f16
 * f128
 * vector
2023-05-03 04:25:14 -04:00
Jacob Young
6893f90887 x86_64: implement sqrt 2023-05-03 04:25:14 -04:00
Jacob Young
a5e50891cb x86_64: optimize code size for double neg/abs 2023-05-03 04:25:14 -04:00
Jacob Young
36a39267b8 x86_64: fix feature confusion 2023-05-03 04:25:14 -04:00
Jacob Young
9ccdbca635 x86_64: implement fabs 2023-05-03 04:25:14 -04:00
Jacob Young
31429a4e86 codegen: handle variable and decl_ref_mut consistently 2023-05-03 04:25:14 -04:00
Jacob Young
40ef796278 x86_64: fix todo message typo 2023-05-03 04:25:14 -04:00
Jacob Young
f894ec264b codegen: fix global nested field_ptr 2023-05-03 04:25:14 -04:00
Jacob Young
3a30b82741 x86_64: implement fieldParentPtr 2023-05-03 04:25:14 -04:00
Jacob Young
3f5592c114 x86_64: implement slice elem ptr for more MCValue tags 2023-05-03 04:25:14 -04:00
Jacob Young
f56f5af403 x86_64: fix global slices 2023-05-03 04:25:14 -04:00
Carl Åstholm
8d6336420b std.log.defaultLog: remove freestanding compile error 2023-05-03 11:19:37 +03:00
Nicolas Sterchele
13eb7251d3 build: rename std.Build.*Step to std.Build.Step.*
Follow-up actions from #14647

Fixes #14947
2023-05-03 08:39:24 +03:00
Tw
855493bb8b bpf: correct return type of ringbuf_output helper
Signed-off-by: Tw <weii.tan>
2023-05-03 08:37:40 +03:00
Arnau
14c68e847a langref: Documented extern "..." use
The use of `extern "..."` for specifying the library that has the definition was undocumented.
Fixes #13906
2023-05-03 08:35:30 +03:00
DraagrenKirneh
b643c5dc91 Change compression detection to use content-type instead of the url ending 2023-05-03 08:23:50 +03:00
David CARLIER
b9841750f9 std.c: adding freebsd's CPU_COUNT macro portage. 2023-05-03 08:19:46 +03:00
mlugg
152c7b1885 Implement multi-argument @min/@max and notice bounds
Resolves: #14039
2023-05-02 16:46:27 -07:00
DraagrenKirneh
e9cbdb2cfd Add a random generated prefix to the unix socket_path to guard against multiple tests/threads running the same test at the same time 2023-05-02 23:31:29 +03:00
Andrew Kelley
a2e2e25165
Merge pull request #15505 from jacobly0/x86_64-behavior
x86_64: fixes for behavior tests
2023-05-02 08:25:57 -07:00
Jacob Young
3b1ea390a3 x86_64: cleanup lazy symbols
In theory fixes updating lazy symbols during incremental compilation.
2023-05-01 19:22:53 -04:00