| Age | Commit message (Collapse) | Author |
|
This reverts commit 211f0a2226db7c53cfa1581c5572a6100c3e17f6.
The functions `mem.nativeToBig` and `mem.nativeToLittle` already existed.
|
|
|
|
|
|
Previously, `zig fmt` on the stage1 compiler (which is what we currently
ship) would perform what equates to `zig run std/special/fmt_runner.zig`
Now, `zig fmt` is implemented with the hybrid zig/C++ strategy outlined
by #1964.
This means Zig no longer has to ship some of the stage2 .zig files, and
there is no longer a delay when running `zig fmt` for the first time.
|
|
DirectAllocator: reduce the amount of redundant memcpy calls on Windows
|
|
Also breaking std lib API change: the return value of
std.zig.parse returns `*ast.Tree` rather than `ast.Tree`.
See #1964
|
|
After 4df2f3d74f test names have the word "test" in them so the
redundant word is removed from test runner. Also move the prefix/suffix
to where it logically belongs in the fully qualified symbol name.
|
|
|
|
Previously the memory would be copied to a different aligned address in some cases where the old offset could have been used. This fixes it so that it will always try to use the old offset when possible, and only uses a different offset if the old one is truly invalid (not aligned or not enough space to store the alloc at the old offset).
|
|
|
|
|
|
fix heap allocators when shrinking an object but growing its alignment
|
|
Closes: #2165
|
|
|
|
|
|
|
|
|
|
|
|
The return address may not point to an area covered by the debug infos
so we hope for the best and decrement the address so that it points to
the caller instruction.
|
|
|
|
|
|
|
|
|
|
To be used where `htons`, `htonl`, etc. would be used in C.
It's useful to have a function that returns a number directly for use in initialisers.
|
|
As `iovec_const` is to `iovec`, `msghdr_const` is to `msghdr`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #2306
|
|
* zig-fmt: allow comptime blocks in containers
* add test for comptime block in container
|
|
Signed/unsigned confusion made the code fail an assertion sometimes.
|
|
This modifies the build process of Zig to put all of the source files
into libcompiler.a, except main.cpp and userland.cpp.
Next, the build process links main.cpp, userland.cpp, and libcompiler.a
into zig1. userland.cpp is a shim for functions that will later be
replaced with self-hosted implementations.
Next, the build process uses zig1 to build src-self-hosted/stage1.zig
into libuserland.a, which does not depend on any of the things that
are shimmed in userland.cpp, such as translate-c.
Finally, the build process re-links main.cpp and libcompiler.a, except
with libuserland.a instead of userland.cpp. Now the shims are replaced
with .zig code. This provides all of the Zig standard library to the
stage1 C++ compiler, and enables us to move certain things to userland,
such as translate-c.
As a proof of concept I have made the `zig zen` command use text defined
in userland. I added `zig translate-c-2` which is a work-in-progress
reimplementation of translate-c in userland, which currently calls
`std.debug.panic("unimplemented")` and you can see the stack trace makes
it all the way back into the C++ main() function (Thanks LemonBoy for
improving that!).
This could potentially let us move other things into userland, such as
hashing algorithms, the entire cache system, .d file parsing, pretty
much anything that libuserland.a itself doesn't need to depend on.
This can also let us have `zig fmt` in stage1 without the overhead
of child process execution, and without the initial compilation delay
before it gets cached.
See #1964
|
|
free memory."
This reverts commit 71bb8cd5370f52b5fef3b107069d4879b434e108.
This broke the CI on Windows.
|
|
WasmAllocator: WebAssembly Memory Allocator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|