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
Jacob Young
3faa4ea959
main: enable debug modes in build scripts
2023-10-26 21:45:57 -04:00
Jacob Young
5e83441096
x86_64: implement @divFloor
and @mod
for i128
2023-10-26 21:45:57 -04:00
Andrew Kelley
ba9e38847a
sema: remove source location logic in zirExportValue
...
`.unneeded` source location should never be passed when the source
location is in fact available.
2023-10-26 17:12:17 -07:00
joadnacer
28b848e3f0
std.io_uring: Improve splice implementation
2023-10-27 00:31:55 +01:00
joadnacer
0005e7e70b
std.linux: Update io_uring structs and consts for kernel 6.3.8
2023-10-27 00:31:52 +01:00
Michael Dusan
da06269d70
std.target: bump some OS max versions
...
- freebsd, openbsd, macos, ios, watchos, tvos
2023-10-26 19:18:37 -04:00
Krzysztof Wolicki
a9e66ed730
Step.Options: @typeName
gives a fully qualified name so the test needs to reflect that
2023-10-26 13:56:43 +03:00
Andrew Kelley
ba817fae8f
Merge pull request #17690
...
Sema: move remaining anon decls to new mechanism
2023-10-26 03:49:16 -04:00
Andrew Kelley
cf9735a5e0
link: Coff, MachO, and Wasm all had the same UAF bug
2023-10-25 20:24:05 -07:00
Andrew Kelley
098a07dc45
link.Elf: fix UAF in lowerAnonDecl
...
The main problem being fixed here is there was a getOrPut() that held on
to a reference to the value pointer too long, and meanwhile the call to
`lowerConst` ended up being recursive and mutating the hash map,
invoking undefined behavior.
caught via #17719
2023-10-25 19:57:02 -07:00
Andrew Kelley
cbcef2d806
C backend: remove some @as
2023-10-25 19:57:02 -07:00
Jacob Young
51f7e5412a
cbe: update DeclGen.decl_index
to support anon decls
2023-10-25 19:57:02 -07:00
Andrew Kelley
405ba2680f
Sema: replace refValue with simpler implementation
...
Move some more anon decls to the new mechanism
2023-10-25 19:57:02 -07:00
Andrew Kelley
03b473d21b
Sema: rework addConstantMaybeRef
...
and add anonDeclRef and migrate some anon decls to it
2023-10-25 19:57:02 -07:00
Andrew Kelley
f841b265c5
Sema: move @typeInfo
anon decls to new mechanism
2023-10-25 19:57:02 -07:00
Andrew Kelley
426b5982d7
Sema: move some TODO comments to an issue
...
Tracking issue: #17689
2023-10-25 19:57:02 -07:00
Andrew Kelley
7a106645fd
Sema: migrate @src
to new anon decl mechanism
2023-10-25 19:57:02 -07:00
Jakub Konka
cc394431ae
Merge pull request #17699 from ziglang/elf-better-alloc
...
elf: allocated PHDR table always immediately succeeding the EHDR
2023-10-25 23:25:56 +02:00
Jakub Konka
10ea7accf7
Merge pull request #17706 from ziglang/elf-error-tests
...
elf: test error generation
2023-10-25 23:20:12 +02:00
frmdstryr
5c5d1f93c4
Update comment on for_range in Ast
...
The rhs can be omitted eg `0..`
2023-10-25 14:09:34 -04:00