aboutsummaryrefslogtreecommitdiff
path: root/std
AgeCommit message (Collapse)Author
2019-04-27Revert "std: Add mem.nativeIntToBig and mem.nativeIntToLittle"daurnimator
This reverts commit 211f0a2226db7c53cfa1581c5572a6100c3e17f6. The functions `mem.nativeToBig` and `mem.nativeToLittle` already existed.
2019-04-27fixed syntax erroremekoi
2019-04-27std: add LoggingAllocator prototypedaurnimator
2019-04-26zig fmt is built directly into stage1 rather than child processAndrew Kelley
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.
2019-04-26Merge pull request #2357 from squeek502/heap-shrink-large-alignAndrew Kelley
DirectAllocator: reduce the amount of redundant memcpy calls on Windows
2019-04-26self-hosted translate-c emits a hello world ASTAndrew Kelley
Also breaking std lib API change: the return value of std.zig.parse returns `*ast.Tree` rather than `ast.Tree`. See #1964
2019-04-26clean up test outputAndrew Kelley
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.
2019-04-25heap: fixup style of realloc memory copiesRyan Liptak
2019-04-25std.heap.DirectAllocator: reduce the amount of redundant memcpy calls on WindowsRyan Liptak
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).
2019-04-25add preliminary windows support to std.io.COutStreamAndrew Kelley
2019-04-25translate-c: a little closer to self-hosted implementationAndrew Kelley
2019-04-24Merge pull request #2312 from squeek502/heap-shrink-large-alignAndrew Kelley
fix heap allocators when shrinking an object but growing its alignment
2019-04-24remove Shebang (#!) supportShawn Landden
Closes: #2165
2019-04-24compiler-rt: Add missing import of test for comparesf2vegecode
2019-04-24compiler-rt: add aeabi_dcmp, comparedf2vegecode
2019-04-24OtherLemonBoy
2019-04-24Expose Elf32_Dyn and Elf64_DynLemonBoy
2019-04-24Implementation of dl_phdr_infoLemonBoy
2019-04-23Go one instruction before the return addressLemonBoy
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.
2019-04-23Fix silly typoLemonBoy
2019-04-23Fix reading of signed leb128 valuesLemonBoy
2019-04-22Bump up FixedBufferAllocator test memory to account for new testsRyan Liptak
2019-04-22std.heap.DirectAllocator: Fix aligned reallocs on WindowsRyan Liptak
2019-04-21std: Add mem.nativeIntToBig and mem.nativeIntToLittledaurnimator
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.
2019-04-21std: add msghdr_constdaurnimator
As `iovec_const` is to `iovec`, `msghdr_const` is to `msghdr`
2019-04-21std: improve msghdr definitiondaurnimator
2019-04-20fix heap allocators when shrinking an object but growing its alignmentRyan Liptak
2019-04-21compiler-rt: add aeabi_fcmp, comparesf2vegecode
2019-04-20Fixes DirectAllocator Windows implementation to call HeapFree when new_size == 0tgschultz
2019-04-20fixup and zig fmtAndrew Kelley
2019-04-20Merge branch 'dwarfy' of https://github.com/LemonBoy/zig into LemonBoy-dwarfyAndrew Kelley
2019-04-20Recover symbol infos from DWARF sectionsLemonBoy
2019-04-20fix DirectAllocator not unmapping unused pages on large alignmentsRyan Liptak
Fixes #2306
2019-04-19zig-fmt: allow comptime blocks in containers (#2308)Raul Leal
* zig-fmt: allow comptime blocks in containers * add test for comptime block in container
2019-04-19Fix parseFormValueConstantLemonBoy
Signed/unsigned confusion made the code fail an assertion sometimes.
2019-04-16stage1 is now a hybrid of C++ and ZigAndrew Kelley
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
2019-04-16Revert "DirectAllocator: on windows, use HeapFree instead of HeapReAlloc to ↵Andrew Kelley
free memory." This reverts commit 71bb8cd5370f52b5fef3b107069d4879b434e108. This broke the CI on Windows.
2019-04-16Merge pull request #2286 from shritesh/wasm_allocAndrew Kelley
WasmAllocator: WebAssembly Memory Allocator
2019-04-16WasmAllocator: cleanupShritesh Bhattarai
2019-04-16DirectAllocator: on windows, use HeapFree instead of HeapReAlloc to free memory.Sahnvour
2019-04-16fmt wasm_allocatorShritesh Bhattarai
2019-04-16wasm: add WasmAllocatorShritesh Bhattarai
2019-04-15wasm: WasmAllocator that uses fixed 64kb pagesShritesh Bhattarai
2019-04-15update std.os.page_size for WebAssemblyAndrew Kelley
2019-04-15wasi: switch to "standard" wasi_unstable module fnShritesh Bhattarai
2019-04-13wasi: better commentsShritesh Bhattarai
2019-04-13support extern "wasi" functionsShritesh Bhattarai
2019-04-13wasi: sigabrt at panicShritesh Bhattarai
2019-04-13wasi: use __wasi_proc_exit instead of posix.exitShritesh Bhattarai
2019-04-13WIP: hello worldShritesh Bhattarai