8522 Commits

Author SHA1 Message Date
Andrew Kelley
c2e8788259
Merge branch 'daurnimator-less-buffer'
closes #4665
2020-04-01 13:44:19 -04:00
Andrew Kelley
2e806682f4
(breaking) std.Buffer => std.ArrayListSentineled(u8, 0)
This new name (and the fact that it is a function returning a type) will
make it more clear which use cases are better suited for ArrayList and
which are better suited for ArrayListSentineled.

Also for consistency with ArrayList,
 * `append` => `appendSlice`
 * `appendByte` => `append`

Thanks daurnimator for pointing out the confusion of std.Buffer.
2020-04-01 13:30:07 -04:00
Andrew Kelley
553f0e0546
fixups and revert a few things 2020-04-01 11:56:39 -04:00
daurnimator
7eb938c909
Use length field as passed in stage2 libc_installation instead of relying on zero termination 2020-04-01 10:36:38 -04:00
daurnimator
e535057364
std: use std.ArrayList(u8).OutStream instead of std.Buffer.OutStream 2020-04-01 10:36:38 -04:00
daurnimator
3fb030e78a
std: use std.ArrayList(u8) instead of std.Buffer in src-self-hosted/translate_c.zig 2020-04-01 10:36:38 -04:00
daurnimator
37e6a64690
std: use Buffer.outStream in std/child_process.zig 2020-04-01 10:36:38 -04:00
daurnimator
ecbc235403
std: use std.ArrayList(u8) instead of std.Buffer in std/build.zig 2020-04-01 10:36:38 -04:00
daurnimator
bb5383cf00
std: don't return sentinel slices from cross_target functions 2020-04-01 10:36:38 -04:00
daurnimator
0ee2462a31
std: add std.ArrayList(u8).outStream() 2020-04-01 10:36:38 -04:00
Andrew Kelley
e8a1e2a1d8
Merge pull request #4894 from LemonBoy/netbsd-p2
More NetBSD bits
2020-04-01 10:24:54 -04:00
Andrew Kelley
0628c2e2ba
Merge pull request #4895 from vrischmann/fix-io-tests
Fix io tests
2020-04-01 10:21:27 -04:00
Andrew Kelley
d23f9a164e
Remove unneeeded address-of operator 2020-04-01 10:21:17 -04:00
Vincent Rischmann
748b2c72a3
io: fix COutStream test 2020-04-01 13:13:47 +02:00
LemonBoy
5047cd3d78 Workaround for #4789 2020-04-01 12:46:16 +02:00
Vincent Rischmann
f46121b8fc
io: fix serialization compilation and tests 2020-04-01 12:37:02 +02:00
Vincent Rischmann
eddf491bf4
io: fix PeekStream compilation 2020-04-01 12:26:49 +02:00
Vincent Rischmann
318abaad02
io: test all files under std/io 2020-04-01 12:24:09 +02:00
LemonBoy
4209ab90a8 std: Use the versioned libc symbols if needed
Many symbols on NetBSD and some on OSX require the definition of an
alias.
2020-04-01 12:23:18 +02:00
LemonBoy
070ace4b22 std: Fix more NetBSD bits
Fix some more libc definitions.
2020-04-01 12:11:19 +02:00
Michaël Larouche
a5af78c376 Fix porting of zlib alder32 with large input 2020-03-31 20:08:42 -04:00
Michael Dusan
e3d12471a2 add compile-error test for #2687
Issue fixed by an unknown commit.

closes #2687
2020-03-31 20:08:00 -04:00
Timon Kruiper
9e019ed26b Fix possible unaligned ptr from getauxval
This caused SIGILL on armv7a-linux
2020-03-31 15:26:06 -04:00
Andrew Kelley
c7a3796734
ci: export master branch version for update-download-page 2020-03-31 14:54:13 -04:00
Bodie Solomon
9bb76f8ce0 Use correct compiler flags in MSVC bootstrap builds of Zig
https://github.com/ziglang/zig/issues/4877

The CMake build of Zig from C++ uses hand-set compiler flags which are
not compatible with the Microsoft C/C++ Optimizing Compiler (cl.exe)
used by Visual Studio.

This commit attempts to conform them to match the Clang/GCC options
under MSVC builds.

Note that CL does not have a concept of C99 or "-O3", and may imply
other optimizations in "/O2" than are implied by Clang/GCC "-O3".

Visual Studio 2019 documentation for cl.exe's optimization options:
https://docs.microsoft.com/en-us/cpp/build/reference/o-options-optimize-code?view=vs-2019

Visual Studio 2019 doc for cl.exe's C++ standard options:
https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2019
2020-03-31 14:23:34 -04:00
Andrew Kelley
d34a3c66b3
Merge pull request #4543 from daurnimator/cleanup-json
std.json improvements
2020-03-31 12:07:25 -04:00
Andrew Kelley
28b7306a31
Merge pull request #4880 from daurnimator/use-spanZ
Take advantage of mem.spanZ accepting null
2020-03-31 11:57:31 -04:00
Andrew Kelley
d9d8c42426
remove unnecessary inline
works around a bug triggered by previous commit
2020-03-31 11:18:11 -04:00
Andrew Kelley
47a0e3ec5e
Merge pull request #4871 from boothby/issue4769
Address bugs when //, /// or //! are immediately followed by EOF
2020-03-31 10:56:21 -04:00
daurnimator
3cf302a71d
Tidy up some mem.spanZ use-sites now that null is accepted 2020-04-01 01:50:34 +11:00
Andrew Kelley
6d25e45123
Merge branch 'LemonBoy-more-cache' 2020-03-31 10:49:06 -04:00
Andrew Kelley
0e372ccff5
clean up the duplicate export logic for __clear_cache 2020-03-31 10:48:48 -04:00
daurnimator
b1eb831aba
std: fix mem.span* when an optional pointer is passed 2020-04-01 01:44:55 +11:00
LemonBoy
e9c49f423d
compiler-rt: More clear_cache implementations 2020-03-31 10:36:12 -04:00
Tetralux
d57b5205c6 Fix std.fifo.LinearFifo
- Fix undeclared variable in 'writeItem'
- Clarify docs of `read` regarding bytes vs. items
- Normalize 'writeable' to 'writable' (the more common parlance)
2020-03-31 10:18:58 -04:00
daurnimator
63409cf422 std: linux syscall numbers are now an extensible enum 2020-03-31 10:16:20 -04:00
Andrew Kelley
839d85e440 fixes to 32-bit handling, to support 32-bit arm 2020-03-31 10:10:31 -04:00
daurnimator
7a3d700fd9
std: introduce json.WriteStream.stringify 2020-04-01 00:13:00 +11:00
daurnimator
42cabe4366
std: use json.StringifyOptions.Whitespace from json.WriteStream 2020-04-01 00:12:59 +11:00
daurnimator
a32d88f12c
std: add support to std.json.stringify for null literals 2020-04-01 00:12:59 +11:00
daurnimator
62fbb6b874
std: allow picking between serialising []u8 as string or array 2020-04-01 00:12:59 +11:00
daurnimator
edf487b126
std: add options to std.json.stringfy to control escaping 2020-04-01 00:12:59 +11:00
daurnimator
17f5d04bed
std: use json.stringify logic in some json.WriteStream code paths 2020-04-01 00:12:59 +11:00
daurnimator
5a053247e2
std: use stringify from Value.dump; remove other dump helpers 2020-04-01 00:12:59 +11:00
daurnimator
e88543a504
std: add jsonStringify trait to json Value objects 2020-04-01 00:07:31 +11:00
daurnimator
48e7c6cca6
std: add whitespace control to json.stringify 2020-03-31 23:57:00 +11:00
daurnimator
3a0875d9e8
std: have json tests take options parameter 2020-03-31 23:19:24 +11:00
Ali Ahmed
45dc2587a3 Fix Readme to point to llvm for brew commands
* Homebrew has updated llvm to point to llvm@10
2020-03-30 23:21:40 -04:00
Andrew Kelley
1df85d1509
Merge branch 'FireFox317-clear-cache' 2020-03-30 23:15:33 -04:00
Andrew Kelley
83ff94b1cc
compiler-rt: don't export __clear_cache when no impl available 2020-03-30 23:15:07 -04:00