Jakub Konka
71dfea1f17
coff: implement exporting anon decls
2023-10-29 18:55:58 +01:00
Jakub Konka
a7a95ce9c4
macho: implement exporting anon decls
2023-10-29 18:55:58 +01:00
Jakub Konka
eaca72534c
elf: implement exporting anon decls
2023-10-29 18:55:58 +01:00
Jakub Konka
209fd8cb93
elf: add partial implementation of exporting anon decls
2023-10-29 18:55:58 +01:00
Andrew Kelley
fa022d1ecc
Merge pull request #17759 from jacobly0/x86_64
...
x86_64: pass more tests
2023-10-29 13:10:51 -04:00
Jacob Young
f6f2708d82
x86_64: fix compiler rt test failures
2023-10-29 07:20:36 -04:00
Jacob Young
1fecf86ebf
x86_64: refactor codegen memory repr
...
Also refactor linker reloc lowering.
2023-10-29 05:17:43 -04:00
Jacob Young
20ade4ce7f
tests: change some x86_64 backend targets to pic for more coverage
2023-10-29 05:15:35 -04:00
Jacob Young
f133bcba9f
x86_64: fix hazard between pic call and sysv cc
2023-10-29 05:15:35 -04:00
Kamil T
37295696ec
std.os.windows additions and fixes
2023-10-29 11:01:54 +02:00
Andrew Kelley
e7ead9c5ea
std: delete psapi, gdi32, and winmm
...
The only remaining Windows APIs now are the ones that the standard
library itself depends on for its cross-platform abstractions.
closes #4426
2023-10-29 00:58:00 -04:00
Jakub Konka
13c7aa5fef
Merge pull request #17727 from ziglang/elf-memory-deferred
...
x86_64+elf: do not pass hardcoded memory addresses in prep for build-obj
2023-10-28 19:41:07 +02:00
Andrew Kelley
d817a3c517
delete std.os.windows.user32
...
This is progress towards #4426
Closes #17417
2023-10-28 13:16:47 -04:00
Andrew Kelley
e69fd4d696
Merge pull request #17762 from ziglang/zir-index-type-safety
...
make Zir.Inst.Index typed
2023-10-28 13:14:40 -04:00
Andrew Kelley
62f45b802c
make Zir.Inst.Index typed
...
This commit starts by making Zir.Inst.Index a nonexhaustive enum rather
than a u32 alias for type safety purposes, and the rest of the changes
are needed to get everything compiling again.
2023-10-28 10:14:15 -07:00
Andrew Kelley
49b9e1e69b
std.mem.minMax: make it return a tuple
...
this is a breaking change
2023-10-28 10:14:15 -07:00
Andrew Kelley
256ab68a97
frontend: make Decl.zir_decl_index typed
...
This field had the wrong type. It's not a `Zir.Inst.Index`, it's
actually a `Zir.OptionalExtraIndex`. Also, the former is currently
aliased to `u32` while the latter is a nonexhaustive enum that gives us
more type checking.
This commit is preparation for making this field non-optional. Now it
can be changed to `Zir.ExtraIndex` and then the compiler will point out
all the places that the non-optional assumption is being violated.
2023-10-28 04:30:27 -04:00
Jacob Young
12b5c8156a
x86_64: handle .load_symbol in more places
2023-10-28 03:51:05 -04:00
Jakub Konka
20a3664153
x86_64: handle .load_symbol in mul_with_overflow and mul_div
2023-10-28 03:48:18 -04:00
Jakub Konka
396003fb06
x86_64: assert fixes are ._ for linker_reloc
2023-10-28 03:48:18 -04:00
Jakub Konka
493f786b38
x86_64: refactor Lower.zig
2023-10-28 03:48:18 -04:00
Jakub Konka
df7db0c4be
x86_64: pass behavior tests PIC and non-PIC
2023-10-28 03:48:18 -04:00
Jakub Konka
2be1250f24
x86_64: no more load/lea_symbol weirdness
2023-10-28 03:48:18 -04:00
Jakub Konka
0d00b7c585
elf: set needs_got on generated extern vars
2023-10-28 03:48:18 -04:00
Jakub Konka
9a1fbb2705
x86_64: rename load/lea_memory to load/lea_symbol
2023-10-28 03:48:18 -04:00
Jakub Konka
a6a10d9c2b
x86_64: do not hardcode memory passed by Elf linker
2023-10-28 03:48:18 -04:00
XXIV
9ff9ea38ea
compiler_rt/emutls: remove unnecessary @ptrCast ( #17755 )
2023-10-28 02:27:58 -04:00
mlugg
c1c9bc0c41
Sema: do not assume switch item indices align with union field indices
...
Resolves : #17754
2023-10-28 06:30:28 +01:00
Andrew Kelley
5257643d3d
Merge pull request #17747 from ziglang/organize-behavior-tests
...
categorize behavior tests
2023-10-28 00:00:40 -04:00
Jacob Young
a440cf6d44
x86_64: fix c abi test failures
2023-10-27 23:31:20 -04:00
expikr
aecdf6ad50
Doc: elaborate on Slice section
...
somehow the concept of slices had less elaboration in its own dedicated section than the mentions of it elsewhere.
2023-10-27 23:11:56 +00:00
Andrew Kelley
24d9438bcc
split export behavior test into export_keyword and export_builtin
2023-10-27 12:45:04 -07:00
Andrew Kelley
9f0fd72321
categorize nan behavior test
...
move it from bugs/xxx.zig to its own category
2023-10-27 12:43:34 -07:00
Andrew Kelley
3fb301b16a
categorize fn ptr behavior test
...
move a function pointer test from bugs/xxx.zig to fn.zig
2023-10-27 12:43:34 -07:00
Andrew Kelley
dfe9cae4eb
categorize globals behavior tests
...
moves some tests that store to global variables to their own category
instead of being named after a GitHub issue.
2023-10-27 12:43:34 -07:00
Andrew Kelley
1c85b0acbb
Merge pull request #17735 from ziglang/export-anon
...
link: support exporting constant values without a Decl
2023-10-27 15:20:13 -04:00
Linus Groh
772636ed0d
std.json: Parse -0 as a float instead of an integer ( #17729 )
...
This is consistent with `JSON.parse("-0")` in JavaScript, RFC 8259
doesn't specifically mention what to do in this case.
If a negative zero is encoded the intention is likely to preserve the
sign.
2023-10-27 18:05:51 +00:00
frmdstryr
a4cffd80bd
Update slice_sentinel comment
...
Slice end can be omitted
2023-10-27 18:45:59 +03:00
frmdstryr
8dccd77277
Update comment on while
...
The @"while" is still used if cont expr is missing.
2023-10-27 18:45:24 +03:00
Jacob Young
3b0dce8ebd
Merge pull request #17716 from jacobly0/x86_64
...
x86_64: pass more tests
2023-10-27 08:29:24 -04:00
Travis Staloch
8f48533691
GenericReader error set fixes
...
add error.EndOfStream to readEnum() and isBytes() so that users can
catch these errors. this also prevents them from panicing with
'invalid error value' on EndOfStream.
test both methods.
2023-10-27 05:50:33 -04:00
Andrew Kelley
29b05897a5
Merge pull request #17734 from joadnacer/iouring-update
...
std.linux: Update io_uring structs and consts for kernel 6.3.8
2023-10-27 04:44:25 -04:00
Nameless
87735e4dae
std.http.Client: add proxy scheme guessing, fix typo
...
This adds scheme guessing when loading proxies, such that
`HTTP_PROXY=127.0.0.1` and such are valid now and it behaves identically
to `HTTP_PROXY=http://127.0.0.1 `. Additionally fixed a typo that was
causing loadDefaultProxies to never populate the https_proxy.
2023-10-27 03:42:33 -04:00
Jacob Young
b0cf620fe3
x86_64: fix cond_br
2023-10-27 03:33:49 -04:00
Jacob Young
42bca3e2ee
x86_64: fix @memset
2023-10-27 01:40:27 -04:00
Jacob Young
434a7db986
x86_64: add missing spill
2023-10-27 01:40:27 -04:00
Andrew Kelley
4bc88dd116
link: support exporting constant values without a Decl
...
The main motivating change here is to prevent the creation of a fake
Decl object by the frontend in order to `@export()` a value.
Instead, `link.updateDeclExports` is renamed to `link.updateExports` and
accepts a tagged union which can be either a Decl.Index or a
InternPool.Index.
2023-10-26 20:32:16 -07:00
Jacob Young
6ad22cd964
x86_64: add missing spills
2023-10-26 22:35:38 -04:00
Jacob Young
48526c0eb6
test: enable c-abi-tests for the x86_64 backend
...
Add testing for `x86_64_v2` and `x86_64_v3` with the x86_64 backend.
2023-10-26 21:45:58 -04:00
Jacob Young
98cd378208
x86_64: fix behavior of getValue
...
Old behavior renamed to `getValueIfFree`.
2023-10-26 21:45:58 -04:00