Veikka Tuominen
7be6f352e3
cbe: fix asm return values
2022-11-30 15:14:34 +02:00
Veikka Tuominen
3281494dc5
cbe: prevent access of inactive union field in unimplemented instructions
2022-11-30 15:14:34 +02:00
Veikka Tuominen
a67ea4a4ae
cbe: include hash in tuple type name
...
Different (simple) tuple types do not necessarily print out as different strings.
This is issue would be caused by passing std.fmt.Formatter to std.fmt.format.
2022-11-30 15:14:33 +02:00
Veikka Tuominen
2dcac348e5
cbe: implement packed unions
2022-11-30 15:14:33 +02:00
Veikka Tuominen
1a1a5702ab
cbe: correctly handle pointers to zero bit error union payloads
2022-11-30 15:14:33 +02:00
Veikka Tuominen
4def9c4a9b
cbe: operand of address of operator must be an lvalue
2022-11-30 15:14:33 +02:00
Veikka Tuominen
6310186d52
cbe: cast pointer switch target to int
2022-11-30 15:14:33 +02:00
Veikka Tuominen
8af5648015
Sema: make inferred allocs always mutable
...
Const allocs don't make any sense, make_ptr_const handles making
the pointers not mutable.
2022-11-30 15:14:33 +02:00
Veikka Tuominen
63ae7899ae
cbe: ensure test and tagName function names are unique
2022-11-30 15:14:33 +02:00
Andrew Kelley
71038c42f5
Merge pull request #13513 from ziglang/faster-wasm-gpa
...
WebAssembly-only fast allocator
2022-11-30 01:46:37 -05:00
Andrew Kelley
7f063b2c52
WasmAllocator: simplify thanks to new Allocator interface
...
Now it can refuse to resize when it would disturb the metadata tracking
strategy, resulting in smaller code size, a simpler implementation, and
less fragmentation.
2022-11-29 23:46:02 -07:00
Andrew Kelley
931261752d
rename a couple variables
2022-11-29 23:46:02 -07:00
Andrew Kelley
e2e60f5ff9
std.heap.WasmAllocator: redo
...
The previous version had a fatal flaw: it did ensureCapacity(1) on the
freelist when allocating, but I neglected to consider that you could
free() twice in a row. Silly!
This strategy allocates an intrusive freelist node with every
allocation, big or small. It also does not have the problems with resize
because in this case we can push the upper areas of freed stuff into the
corresponding freelist.
2022-11-29 23:46:02 -07:00
Andrew Kelley
3dcea95ffe
std.heap.WasmAllocator: implement resizing
2022-11-29 23:46:02 -07:00
Andrew Kelley
d4a1ae474a
std.heap.WasmAllocator: resize in place without force shrinking
2022-11-29 23:46:02 -07:00
Andrew Kelley
0c0c70ee82
std.heap.WasmAllocator: large allocations
2022-11-29 23:46:02 -07:00
Andrew Kelley
3ea04ed64c
introduce std.heap.WasmAllocator
...
fast allocator for WebAssembly
eventually this is intended to be merged into
`std.heap.GeneralPurposeAllocator`
2022-11-29 23:46:02 -07:00
Andrew Kelley
9f8c19210b
std.heap: extract PageAllocator, WasmPageAllocator
2022-11-29 23:46:02 -07:00
Andrew Kelley
e35f297aeb
Merge pull request #13666 from ziglang/allocator-interface
...
std.mem.Allocator: allow shrink to fail
2022-11-30 01:44:34 -05:00
Andrew Kelley
f466667888
stage2: fix crash on comptime lazy @ctz
and @clz
2022-11-29 23:30:38 -07:00
Andrew Kelley
ceb0a632cf
std.mem.Allocator: allow shrink to fail
...
closes #13535
2022-11-29 23:30:38 -07:00
Andrew Kelley
deda6b5146
LLVM: fix canElideLoad behavior with loops
...
closes #13546
2022-11-30 00:20:49 -05:00
Andrew Kelley
b8473ae7d3
Merge pull request #13693 from Vexu/safety
...
Safety panic improvements & some bug fixes
2022-11-29 19:59:55 -05:00
Jakub Konka
648579b330
libstd: skip problematic tests on aarch64-windows
2022-11-30 00:26:40 +01:00
Jakub Konka
37a9b78bc1
Merge pull request #13701 from ziglang/arm-win-more-features
...
Improve aarch64 feature detection based on the readouts from privileged system registers
2022-11-30 00:20:38 +01:00
Loris Cro
52e1be9c68
Revert "ci: add markers for collapsing log sections in GH web UI"
...
This reverts commit 6028adda4b
.
2022-11-29 22:55:04 +01:00
Loris Cro
6028adda4b
ci: add markers for collapsing log sections in GH web UI
2022-11-29 22:03:30 +01:00
Veikka Tuominen
b2b1d421c3
Sema: add missing failWithBadMemberAccess to zirExport
...
The assumption that AstGen would error only holds when exporting
a identifier not a namespace member.
2022-11-29 21:44:08 +02:00
Veikka Tuominen
4b0ef6a409
Sema: make non-existent field error point to field name
...
Closes #13698
2022-11-29 21:44:08 +02:00
Veikka Tuominen
6f5a438946
AstGen: unstack block scope when creating opaque type
...
Closes #13697
2022-11-29 21:44:08 +02:00
Veikka Tuominen
e60db701d1
Sema: add option to disable formatted panics
...
Closes #13174
2022-11-29 21:44:08 +02:00
Veikka Tuominen
ed73429926
Sema: explain why parameter must be declared comptime
...
Closes #13692
2022-11-29 21:44:08 +02:00
Veikka Tuominen
17ff002bc0
Sema: improve safety panic for access of inactive union field
2022-11-29 21:44:08 +02:00
Jakub Konka
9d0ea0e3f1
arm: implement CPU feature detection by parsing system registers
...
Also add an incomplete table implementing instruction fusions according
to official optimisation programming manuals.
2022-11-29 19:24:42 +01:00
Jakub Konka
988fff260e
windows: map CP 40xx registry values to system ID registers
2022-11-29 19:24:42 +01:00
Jakub Konka
152202da77
windows: if detecting CPU feature set and model fails, use generic with overrides
2022-11-29 19:24:42 +01:00
Veikka Tuominen
6337c04244
Sema: improve panic for slice start index being greater than end index
...
Closes #13689
2022-11-29 15:47:02 +02:00
Veikka Tuominen
6f9c7e33b9
llvm: implement union_init
for packed unions
...
Closes #13664
2022-11-29 15:47:02 +02:00
Veikka Tuominen
34be5784a3
parser: disallow defer and variable declaration as else branch
...
Closes #13658
2022-11-29 15:47:02 +02:00
Jakub Konka
1829b6eab8
Merge pull request #13625 from kcbanner/windows_disable_symlink_tests
...
Skip linker tests requiring symlinks on Windows
2022-11-29 02:57:37 +01:00
Jakub Konka
033aa1d761
aarch64-windows: skip failing standalone tests
2022-11-28 19:45:53 -05:00
Jakub Konka
870872dd63
aarch64-windows: skip failing floatop behavior test
2022-11-28 18:10:51 -05:00
Jakub Konka
07bf4de6a9
aarch64-windows: skip failing align behavior test
2022-11-28 18:10:51 -05:00
Jakub Konka
7bcc1282e2
Update build.zig
2022-11-28 22:04:42 +01:00
Jakub Konka
d3b1cdf508
Merge pull request #13659 from ziglang/arm-win-cpu-features
...
windows: add native CPU and features detection for Armv8 chips
2022-11-28 21:36:56 +01:00
Veikka Tuominen
a660df4900
llvm: improve emitted debug info
...
* ensure parameter debug info is in the subroutine di scope
* slit sub file path into basename and dirname
Closes #12257
Closes #12665
2022-11-28 21:58:41 +02:00
Frank Denis
da9c530d99
Update wasi-libc to a00bf321eeeca836ee2a0d2d25aeb8524107b8cc ( #13626 )
...
* Update wasi-libc to a00bf321eeeca836ee2a0d2d25aeb8524107b8cc
It includes a port of emscripten's allocator that performs
performs much better than the old one.
Most importantly, it includes the prerequisites to later add
support for POSIX threads.
2022-11-28 19:58:03 +01:00
Ryan Liptak
4e078941d0
os.windows.OpenFile: Add USER_MAPPED_FILE
as a possible error
...
Ran into this when using a program that uses CreateFileMapping and then trying to call `std.fs.createFile` on the mapped file. More info can be found here:
https://stackoverflow.com/questions/41844842/when-error-1224-error-user-mapped-file-occurs
Before:
```
error.Unexpected NTSTATUS=0xc0000243
C:\Users\Ryan\Programming\Zig\zig\lib\std\os\windows.zig:138:40: 0x7ff74e957466 in OpenFile (test.exe.obj)
else => return unexpectedStatus(rc),
^
```
After:
```
FAIL (AccessDenied)
C:\Users\Ryan\Programming\Zig\zig\lib\std\os\windows.zig:137:30: 0x7ff7f5b776ea in OpenFile (test.exe.obj)
.USER_MAPPED_FILE => return error.AccessDenied,
^
```
2022-11-28 18:56:11 +01:00
zooster
a27bfae036
std.Thread.Futex.PosixImpl.Address.from: fix alignment
type
...
Fixes #13673
2022-11-28 18:49:33 +02:00
Jakub Konka
2528189101
windows: fix signature of kernel32.RegOpenKeyExW to use *HKEY
2022-11-28 17:09:03 +01:00