| Age | Commit message (Collapse) | Author |
|
x86_64: rewrite unsafe int vector multiplication
|
|
Functions like isMinGW() and isGnuLibC() have a good reason to exist: They look
at multiple components of the target. But functions like isWasm(), isDarwin(),
isGnu(), etc only exist to save 4-8 characters. I don't think this is a good
enough reason to keep them, especially given that:
* It's not immediately obvious to a reader whether target.isDarwin() means the
same thing as target.os.tag.isDarwin() precisely because isMinGW() and similar
functions *do* look at multiple components.
* It's not clear where we would draw the line. The logical conclusion before
this commit would be to also wrap Arch.isX86(), Os.Tag.isSolarish(),
Abi.isOpenHarmony(), etc... this obviously quickly gets out of hand.
* It's nice to just have a single correct way of doing something.
|
|
These deal with how Zig stores OS headers in `lib/libc/include` and so don't
really belong in std.Target.
|
|
This allows it to inspect CPU features which is needed for Propeller, and AVR in
the future.
|
|
Allows deduplicating the code in Sema.
|
|
|
|
|
|
* arm_apcs is the long dead "OABI" which we never had working support for.
* arm_aapcs16_vfp is for arm-watchos-none which is a dead target that we've
dropped support for.
|
|
|
|
This was for a hobby project that appears to be dormant for now. This can be
added back if the project is resumed in the future.
|
|
|
|
|
|
|
|
As calling convention may not be specified explicitly in the source,
so use va_arg's location instead.
Signed-off-by: Tw <tw19881113@gmail.com>
|
|
|
|
|
|
I observed a stack overflow during x86_64 CodeGen in a debug compiler
compiled by the llvm backend. This happens while compiling
`main.buildOutputType` due to the Air being nested almost 500 levels.
|
|
|
|
|
|
|
|
|
|
This is all of the expected 0.14.0 progress on #21530, which can now be
postponed once this commit is merged.
This required rewriting the (un)wrap operations since the original
implementations were extremely buggy.
Also adds an easy way to retrigger Sema OPV bugs so that I don't have to
keep updating #22419 all the time.
|
|
The current zig fetch help docs tell the user to specify a package's URL, but it's unclear what the URL should be.
This change expands the help output to explain what URLs the zig fetch command can handle and provides examples of valid URLs.
Related: #20096
A git bundle file seems to be the more accurate term, as it's what git uses in its documentation: https://git-scm.com/docs/git-bundle
|
|
|
|
fuzzer: write inputs to shared memory before running
|
|
|
|
|
|
In debug mode, schedule it early. In release modes, schedule it late.
|
|
Can't imagine this working, but might as well try until I remember why.
Closes #21439
|
|
Closes #19905
|
|
Closes #21490
|
|
This refactor was left out of the previous commit to make the diff less
noisy and easier to review. There should be no change in behavior.
|
|
Currently zig fails to build while linking the system LLVM/C++ libraries
on my Chimera Linux system due to the fact that libc++.so is a linker
script with the following contents:
INPUT(libc++.so.1 -lc++abi -lunwind)
Prior to this commit, zig would try to convert "ambiguous names" in
linker scripts such as libc++.so.1 in this example into -lfoo style
flags. This fails in this case due to the so version number as zig
checks for exactly the .so suffix.
Furthermore, I do not think that this conversion is semantically correct
since converting libfoo.so to -lfoo could theoretically end up resulting
in libfoo.a getting linked which seems wrong when a different file is
specified in the linker script.
With this patch, this attempted conversion is removed. Instead, zig
always first checks if the exact file/path in the linker script exists
relative to the current working directory.
If the file is classified as a library (including versioned shared
objects such as libfoo.so.1), zig then falls back to checking if
the exact file/path in the linker script exists relative to each
directory in the library search path, selecting the first match or
erroring out if none is found.
This behavior fixes the regression that prevents building zig while
linking the system LLVM/C++ libraries on Chimera Linux.
|
|
|
|
Closes #22797
|
|
introduce std.heap.SmpAllocator
|
|
Fixes the backend portion of #22798
|
|
|
|
In main, now this allocator is chosen by default when compiling without
libc in ReleaseFast or ReleaseSmall, and not targeting WebAssembly.
|
|
runtime page size detection
rework GeneralPurposeAllocator to reduce active mapping count
Allocator VTable API update
|
|
x86_64: rewrite `@truncate`
|
|
|
|
This ensure capacity call does not match the number of
appendAssumeCapacity() calls that follow it. Fix this.
This was discovered due to hitting the assertion failure in
appendAssumeCapacity() while building river.
I'm not sure how to isolate a minimal reproducer for a test.
|
|
* fix merge conflicts
* rename the declarations
* reword documentation
* extract FixedBufferAllocator to separate file
* take advantage of locals
* remove the assertion about max alignment in Allocator API, leaving it
Allocator implementation defined
* fix non-inline function call in start logic
The GeneralPurposeAllocator implementation is totally broken because it
uses global state but I didn't address that in this commit.
|
|
heap.zig: define new default page sizes
heap.zig: add min/max_page_size and their options
lib/std/c: add miscellaneous declarations
heap.zig: add pageSize() and its options
switch to new page sizes, especially in GPA/stdlib
mem.zig: remove page_size
|
|
Fix a bunch of frontend bugs
|
|
|
|
|
|
|
|
|