Commit Graph

2592 Commits (0e2d858d69ee1595bb58d936f83f0e0248d54d68)

Author SHA1 Message Date
Loris Cro 7fec5b3def pwritev
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:41 +02:00
Loris Cro 7a07c62a07 pwrite
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:21 +02:00
Loris Cro 18f6629bd8 writev
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:03 +02:00
Loris Cro 9075f8e5a1 write
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:05:41 +02:00
Loris Cro 59ecdaea12 preadv
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:04:43 +02:00
Loris Cro bd9f2369d5 pread
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:04:05 +02:00
Loris Cro bc35435ca6 readv
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:03:12 +02:00
Loris Cro 08364ac773 read
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:00:55 +02:00
Loris Cro 730428bfd6 connect
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 21:56:27 +02:00
Loris Cro e85c89630e accept
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 21:56:27 +02:00
Frank Denis bd89bd6fdb Revamp crypto/aes
* Reorganize crypto/aes in order to separate parameters, implementations and
modes.
* Add a zero-cost abstraction over the internal representation of a block,
so that blocks can be kept in vector registers in optimized implementations.
* Add architecture-independent aesenc/aesdec/aesenclast/aesdeclast operations,
so that any AES-based primitive can be implemented, including these that don't
use the original key schedule (AES-PRF, AEGIS, MeowHash...)
* Add support for parallelization/wide blocks to take advantage of hardware
implementations.
* Align T-tables to cache lines in the software implementations to slightly
reduce side channels.
* Add an optimized implementation for modern Intel CPUs with AES-NI.
* Add new tests (AES256 key expansion).
* Reimplement the counter mode to work with any block cipher, any endianness
and to take advantage of wide blocks.
* Add benchmarks for AES.
2020-09-24 13:16:00 -04:00
Frank Denis c8cd6145ac Move PBKDF2 to a pwhash category, clarify what that category is
Password hashing functions are not general-purpose KDFs, and KDFs
don't have to satisfy the same properties as a PHF.

This will allow fast KDFs such as the HKDF construction to be in a
category of their own, while clarifying what functions are suitable
for using passwords as inputs.
2020-09-24 00:02:31 -04:00
Andrew Kelley 7bbd152dcc nobody likes my std.process.cleanExit idea
it's appropriate for the self-hosted compiler though, so this commit
moves it from std lib to stage2 src code.
2020-09-23 20:52:33 -07:00
Andrew Kelley b08fd0e8fc stage2: building musl libc from source 2020-09-23 20:48:47 -07:00
Andrew Kelley f4dde4d109 test_runner: fix missing newline in log 2020-09-23 11:15:10 -07:00
Andrew Kelley c0b774fbc6 stage2: support passing extra C flags to C source files
closes #3508
2020-09-23 10:22:44 -07:00
Timon Kruiper bbff6bd675 Eventloop: Enable basic event loop test, fixed by previous commit
Closes #4922
2020-09-23 18:38:28 +02:00
Timon Kruiper 0eed7ec9d5 Eventloop: Fix deadlock in linux event loop implementation
A simple empty main with evented-io would not quit, because some
threads were still waiting to be resumed (by the os). The os.write to
the eventfd only wakes up one thread and thus there are multiple writes
needed to wake up all the other threads.
2020-09-23 11:41:31 +02:00
Andrew Kelley 800a4a6ceb eliminate dependency of libzigcpp.a on libzigstage1.a
This allows us to create a build of self-hosted with LLVM extensions
enabled but without the stage1 backend.
2020-09-23 00:00:24 -07:00
Andrew Kelley 0638a020cf stage2: implement --pkg-begin and --pkg-end CLI args 2020-09-22 23:00:33 -07:00
Andrew Kelley c2b1cd7c45 stage2: implement zig build
As part of this:

 * add std.process.cleanExit. closes #6395
   - use it in several places
 * adjust the alignment of text in `zig build --help` menu
 * Cache: support the concept of "unhit" so that we properly keep track
   of the cache when we find out using the secondary hash that the cache
   "hit" was actually a miss. Use this to fix false negatives of caching
   of stage1 build artifacts.
 * fix not deleting the symlink hash for stage1 build artifacts causing
   false positives.
 * implement support for Package arguments in stage1 build artifacts
 * update and add missing usage text
 * add --override-lib-dir and --enable-cache CLI options
   - `--enable-cache` takes the place of `--cache on`
 * CLI supports -femit-bin=foo combined with --enable-cache to do an
   "update file" operation. --enable-cache without that argument
   will build the output into a cache directory and then print the path
   to stdout (matching master branch behavior).
 * errors surfacing from main() now print "error: Foo" instead of
   "error: error.Foo".
2020-09-22 22:18:19 -07:00
Andrew Kelley 250664bea4 build runner: allow for a bit longer -D options
so they can display in the --help menu without getting squished.
2020-09-22 14:56:52 -07:00
Andrew Kelley 0c70bb4fce Merge remote-tracking branch 'origin/master' into stage2-zig-cc 2020-09-21 21:16:46 -07:00
LemonBoy 58ee5f4e61 std: Fix metadata corruption in HeapAllocator
HeapAllocator stores the pointer returned by HeapAlloc right after the
data block and, after the recent allocator refactoring, the space for
this pointer was not taken into account in the calculation of the final
block size.

Fixes #5830
2020-09-20 01:21:29 -04:00
zenith391 4fbf9f7f79 Add "emit_docs" field to LibExeObjStep. 2020-09-19 00:39:43 +03:00
Lachlan Easton 4496a6c9cc zig fmt: Special case un-indent comma after multiline string in param list 2020-09-18 20:34:00 +10:00
Lachlan Easton 1aacedf6e1 zig fmt: Fix regression in ArrayInitializers 2020-09-18 20:34:00 +10:00
Lachlan Easton 40b6e86a99 zig fmt: fix #6171 2020-09-18 20:34:00 +10:00
Lachlan Easton c06674e701 zig fmt: Small cleanup 2020-09-18 20:34:00 +10:00
Lachlan Easton 206a8cf670 zig fmt: fix comments and multiline literals in function args 2020-09-18 20:34:00 +10:00
Lachlan Easton 291482a031 zig fmt: Don't consider width of expressions containing multiline string literals when calculating padding for array initializers. fixes #3739
Changes some of the special casing for multiline string literals.
2020-09-18 20:34:00 +10:00
Lachlan Easton e1bd271192 zig fmt: Allow trailing comments to do manual array formatting. close #5948 2020-09-18 20:34:00 +10:00
Lachlan Easton 9f0821e688 zig fmt: Fix erroneously commented out code, add passing test case to close #5722 2020-09-18 20:34:00 +10:00
Lachlan Easton ea6181aaf6 zig fmt: Add test for nesting if expressions 2020-09-18 20:34:00 +10:00
Andrew Kelley 333b12a8f9 std: start: use std.log instead of stderr
When main returns an error code.
2020-09-18 01:58:16 -07:00
Ryan Liptak fbde15fdf4 Fix compile error in os.renameatW
Introduced in 5e3fa0e94f

Whoops!
2020-09-17 18:49:06 -04:00
Andrew Kelley f125288c9b
Merge pull request #6336 from Rocknest/pbkdf2
Some changes to #6326 (pbkdf2)
2020-09-17 17:31:58 -04:00
Ryan Liptak 5e3fa0e94f Add rename to std.fs API
- Moves fs.rename functions to fs.renameAbsolute to match other functions outside of fs.Dir
- Adds fs.Dir.rename that takes two paths relative to the given Dir
- Adds fs.rename that takes two separate Dir's that the given paths are relative to (for renaming across directories without having to make the second path relative to a single directory)
- Fixes FileNotFound error return in std.os.windows.MoveFileExW
- Returns error.RenameAcrossMountPoints from renameatW
  + Matches the RenameAcrossMountPoints error return in renameatWasi/renameatZ
2020-09-17 17:22:26 -04:00
LemonBoy 27adb82fda std: Respect user-specified alignment when formatting ints
This implementation tries to do the right thing (TM) by treating the
sign as part of the number itself, therefore the alignment parameter
applies to both the sign and the digits.

In other words the format string `{:>4}` with -1 as input will not
output `-  1` but `  -1`.

And let's default to right alignment for everything as that's what users
want, especially when printing numbers. Many implementations use
different defaults for numeric vs non-numeric types, let's strive for a
consistent behaviour here.
2020-09-17 00:53:08 +02:00
LemonBoy bb9a4ad6e9 std: Fix {*} printing of non-pointer types
Fixes a regression introduced in #6246.
Adds a test to make sure this won't happen again.
2020-09-16 13:45:54 +02:00
Andrew Kelley 281fc10ec5 std.crypto siphash: fix assertion on the size of output buffer
the logic was backwards
2020-09-16 02:24:36 -07:00
Andrew Kelley 16bd0c63b4 Merge remote-tracking branch 'origin/master' into stage2-zig-cc
Pulling in the changes to libc_installation.zig
2020-09-15 18:04:37 -07:00
Rocknest c35703825f Add an error set 2020-09-16 01:58:48 +03:00
Andrew Kelley f82b1831f7 std: handle sharing violation when deleting a file on windows 2020-09-15 15:24:13 -07:00
Andrew Kelley b3cc36857e
Merge pull request #6340 from Vexu/fix
Fixes
2020-09-15 14:28:16 -04:00
LemonBoy c1c3212500 std: Fix typo in ELF section header iterator
The code accidentally used the phdr offset instead of the shdr one while
iterating over the section headers.

Fixes #6338
2020-09-15 18:14:06 +03:00
Andrew Kelley 5d8fec3d4c Merge remote-tracking branch 'origin/master' into stage2-zig-cc 2020-09-14 21:57:01 -07:00
Andrew Kelley dffdb2844e track all TODO comments in BRANCH_TODO file
Before merging, do this for every item in the file:
 * solve the issue, or
 * convert the task to a github issue and update the comment
   to link to the issue (and remove "TODO" text from the comment).
Then delete the file.

Related: #363
2020-09-14 18:06:19 -07:00
Vexu a3624e94f8
translate-c: determine sizeof using std.meta.sizeof 2020-09-14 23:53:38 +03:00
Vexu 29fd0c6d61
fix meta.cast behavior; add exhaustive tests 2020-09-14 23:21:26 +03:00
Andrew Kelley 778bb4bc9c move std.cache_hash from std to stage2
The API is pretty specific to the implementationt details of the
self-hosted compiler. I don't want to have to independently support
and maintain this as part of the standard library, and be obligated
to not make breaking changes to it with changes to the implementation of
stage2.
2020-09-14 11:05:51 -07:00
Veikka Tuominen d073836894
Merge pull request #6172 from tadeokondrak/@Type(.Union)
Implement @Type for Union
2020-09-14 16:43:49 +03:00
Andrew Kelley c49435f76b
Merge pull request #6331 from mattnite/bpf-helper-defs
BPF: helper definitions
2020-09-14 04:00:00 -04:00
Andrew Kelley 2a8fc1a18e stage2: caching system integration & Module/Compilation splitting
* update to the new cache hash API
 * std.Target defaultVersionRange moves to std.Target.Os.Tag
 * std.Target.Os gains getVersionRange which returns a tagged union
 * start the process of splitting Module into Compilation and "zig
   module".
   - The parts of Module having to do with only compiling zig code are
     extracted into ZigModule.zig.
   - Next step is to rename Module to Compilation.
   - After that rename ZigModule back to Module.
 * implement proper cache hash usage when compiling C objects, and
   properly manage the file lock of the build artifacts.
 * make versions optional to match recent changes to master branch.
 * proper cache hash integration for compiling zig code
 * proper cache hash integration for linking even when not compiling zig
   code.
 * ELF LLD linking integrates with the caching system. A comment from
   the source code:

   Here we want to determine whether we can save time by not invoking LLD when the
   output is unchanged. None of the linker options or the object files that are being
   linked are in the hash that namespaces the directory we are outputting to. Therefore,
   we must hash those now, and the resulting digest will form the "id" of the linking
   job we are about to perform.
   After a successful link, we store the id in the metadata of a symlink named "id.txt" in
   the artifact directory. So, now, we check if this symlink exists, and if it matches
   our digest. If so, we can skip linking. Otherwise, we proceed with invoking LLD.

 * implement disable_c_depfile option
 * add tracy to a few more functions
2020-09-13 19:29:07 -07:00
Andrew Kelley 1baa56a25f std.cache_hash: break up the API and improve implementation
into smaller exposed components and expose all of them. This makes it
more flexible.

`*const Cache` is now passed in with an open manifest dir handle which
the caller is responsible for managing.

Expose some of the base64 stuff.

Extract the hash helper functions into `HashHelper` and add some more
methods such as addOptional and addListOfFiles.

Add `CacheHash.toOwnedLock` so that you can deinitialize everything
except the open file handle which represents the file system lock on the
build artifacts.

Use ArrayListUnmanaged, saving space per allocated CacheHash.

Avoid 1 memory allocation in hit() with a static buffer.

hit() returns a bool; caller code is responsible for calling final() in
either case. This is a simpler and easier to use API.

writeManifest() is no longer called from deinit() with errors ignored.
2020-09-13 18:04:52 -07:00
Rocknest 988fc6f9d1 flip condition 2020-09-14 02:27:09 +03:00
Rocknest 73863cf72b fix build 2020-09-13 23:59:36 +03:00
LemonBoy 61e9e82bdc std: Make the CRC32 calculation slightly faster
Speed up a little the slicing-by-8 code path by replacing the
(load+shift+xor)*4 sequence with a single u32 load plus a xor.

Before:

```
iterative:  1018 MiB/s [000000006c3b110d]
small keys:  1075 MiB/s [0035bf3dcac00000]
```

After:

```
iterative:  1114 MiB/s [000000006c3b110d]
small keys:  1324 MiB/s [0035bf3dcac00000]
```
2020-09-13 16:32:21 -04:00
Rocknest f6195be997 fix ref 2020-09-13 23:31:59 +03:00
LemonBoy 5e50d145d9 std: Limit the read/write size on Darwin
It turns out that the kernel won't read or write more than 0x7fffffff
bytes in a single call, failing with EINVAL when trying to do so.

Adjust the limit and curse whoever is responsible for this.

Closes #6332
2020-09-13 16:31:21 -04:00
Rocknest d75cbb01db Reference all crypto declarations 2020-09-13 23:00:33 +03:00
Rocknest b6385870d0 Convert asserts to errors, make sure nothing overflows 2020-09-13 22:39:54 +03:00
Rocknest a6d947191e
Merge pull request #2 from rnapier/pbkdf2
Pbkdf2
2020-09-13 22:09:45 +03:00
Matt Knight 88dacd3b70
changed to opaque 2020-09-13 09:53:20 -07:00
Matt Knight 1afbf4fb21
removed all those kern aliases 2020-09-13 09:43:49 -07:00
Rob Napier 85366771ea pbkdf2 offset into dk should be usize, not u64. 2020-09-13 12:36:32 -04:00
Matt Knight cb5f76bb1c
got booleans wrong 2020-09-13 09:24:56 -07:00
Rocknest dcd229be92
Merge pull request #1 from rnapier/pbkdf2
Pbkdf2
2020-09-13 19:11:29 +03:00
Rob Napier 2f9c9662ba Use comptime to expose public method to doc system 2020-09-13 11:17:58 -04:00
Rob Napier 8a1a40276f Extract kdf.zig to provide namespace documentation 2020-09-13 11:08:06 -04:00
Rob Napier 257c5b5348 Explicitly reference std.crypto.kdf in test case 2020-09-13 10:50:46 -04:00
Rob Napier 0f85b85acb Improve doc text 2020-09-13 09:59:36 -04:00
Matt Knight b043a31889
added helper definitions 2020-09-12 23:45:35 -07:00
Rob Napier 17156e1775 pbkdf2 "very large dklen test" should just check for crashes 2020-09-12 18:33:53 -04:00
Rob Napier 3f450b7e93 Replace Hash function with Prf. Correct offset bit-width. 2020-09-12 18:17:04 -04:00
Rob Napier 37db93e426 Review comments from pbkdf2.zig
Move block definitions inside while loop.
Use usize for offset. (This still crashes on overflow)
Remove unneeded slice syntax.
Add slow test for Very large dkLen
2020-09-12 15:03:42 -04:00
Andrew Kelley af4cc20ce2 Merge remote-tracking branch 'origin/master' into stage2-zig-cc
Master branch added in the concept of library versioning being optional
to main.cpp. It will need to be re-added into this branch before merging
back into master.
2020-09-12 10:48:38 -07:00
Andrew Kelley 8374be1a1c std.cache_hash: bump up the base64 digest len to avoid '==' 2020-09-12 00:50:37 -07:00
LemonBoy 9fe4c89230 std: Add a gzip decoder 2020-09-11 20:02:41 -04:00
Andrew Kelley 1edf097871
Merge pull request #6323 from LemonBoy/fast-zlib
std: Make the DEFLATE decompression routine 3x faster
2020-09-11 17:25:18 -04:00
Rob Napier c2b02d01d5 Add crypto.kdf.pbkdf2 2020-09-11 17:10:27 -04:00
Andrew Kelley 1eaf0691f9
Merge pull request #6320 from ifreund/prctl
std: add prctl and securebits definitions for linux/C
2020-09-11 16:33:57 -04:00
Isaac Freund 1078810cef
std: add prctl definition when linking libc 2020-09-11 22:32:23 +02:00
Isaac Freund b6f4601545
std: add securebits definitions for linux 2020-09-11 22:32:23 +02:00
Isaac Freund 744b73ab46
std: add prctl wrapper to std.os 2020-09-11 22:32:23 +02:00
Isaac Freund 7b961a876b
std: add prctl definition for linux 2020-09-11 22:32:22 +02:00
Andrew Kelley 42c32dbc7b
Merge pull request #6315 from ifreund/optional-shlib-version
std, stage1: make shared library versioning optional
2020-09-11 16:07:13 -04:00
LemonBoy 4b851c7255 Re-enable a compression test
It somehow got commented out...
2020-09-11 21:04:08 +02:00
LemonBoy 41f244bd2f std: Make the DEFLATE decompression routine 3x faster
A profiler run showed that the main bottleneck was the naive decoding of
the Huffman codes, replacing it with a nice trick borrowed by Zlib gave
a substantial speedup.
Replacing a `%` with a `and (mask-1)` gave another significant
improvement (yay for low hanging fruits).

A few numbers obtained by decompressing a 22M file:

Before:
```
./decompress  2,39s user 0,00s system 99% cpu 2,400 total
```

After:
```
./decompress  0,79s user 0,00s system 99% cpu 0,798 total
````
2020-09-11 21:00:15 +02:00
Isaac Freund 0a76a9bd73
std, stage1: make shared library versioning optional
This commit changes the behavior of stage1 to emit libfoo.so instead
of libfoo.so.0.0.0 when none of the --ver-major, --ver-minor, or
--ver-patch flags are set.

It also makes it possible to create unversioned shared libraries
using the zig build system, changing the version parameter of
addSharedLibrary() to a tagged union.
2020-09-11 10:46:37 +02:00
Isaac Freund 68bf29c31e std: allow overriding install dir of artifacts
This is necessary when, for example, writing a PAM module which should
be installed to lib/security/module_name.so.
2020-09-11 04:32:36 -04:00
Andrew Kelley c41cd3e13a std.fs.File: fix typo in writeFileAll 2020-09-10 18:53:20 -07:00
Andrew Kelley 800c5de2ae update the stack trace test case for lines added to start.zig 2020-09-10 14:40:33 -07:00
Andrew Kelley 2315331d23
Merge pull request #5527 from shawnanastasio/ppc64le
Implement support for powerpc64{,le}
2020-09-10 15:56:27 -04:00
Christian Wesselhoeft ea9b38c93c fs/file.zig: Update reader to use type alias
This is a minor cosmetic change which updates `reader` and `inStream`
to match `writer` and `outStream` below.
2020-09-10 15:42:24 -04:00
Isaac Freund 13b8c63834 std: complete C definitions for uid/gid setters
Also:
- correct the definition of setgid
- update the existing definitions to use the uid_t/gid_t types
2020-09-10 15:41:52 -04:00
Isaac Freund bb9773f695 std: fix errorset of std.os.seteuid/setegid 2020-09-10 15:41:21 -04:00
Isaac Freund 486a774e5f std: add option to use single-threaded event loop
std.event.Loop does not yet work in single threaded builds. However,
using evented io on a single thread can be very convenient. This commit
allows settind @import("root").event_loop_mode to .single_threaded
in order to allow this without reimplementing the startup code in
start.zig
2020-09-10 15:40:38 -04:00
Isaac Freund 4170f3f77f std: fix bitrot in process.posixGetUserInfo() 2020-09-10 14:30:07 -04:00
Literally Void 78baa16da0 Fix issue #6303: iterating empty PriorityQueue crashes 2020-09-10 12:00:53 +03:00
Andrew Kelley 4056bb92e6 stage2: more progress moving `zig cc` to stage2
* std.cache_hash exposes Hasher type
 * std.cache_hash makes hasher_init a global const
 * std.cache_hash supports cloning so that clones can share the same
   open manifest dir handle as well as fork from shared hasher state
 * start to populate the cache_hash for stage2 builds
 * remove a footgun from std.cache_hash add function
 * get rid of std.Target.ObjectFormat.unknown
 * rework stage2 logic for resolving output artifact names by adding
   object_format as an optional parameter to std.zig.binNameAlloc
 * support -Denable-llvm in stage2 tests
 * Module supports the use case when there are no .zig files
 * introduce c_object_table and failed_c_objects to Module
 * propagate many new kinds of data from CLI into Module and into
   linker.Options
 * introduce -fLLVM, -fLLD, -fClang and their -fno- counterparts.
   closes #6251.
   - add logic for choosing when to use LLD or zig's self-hosted linker
 * stub code for implementing invoking Clang to build C objects
 * add -femit-h, -femit-h=foo, and -fno-emit-h CLI options
2020-09-09 09:28:05 -07:00
Lachlan Easton 601331833a Add passing test. close #5343 2020-09-09 21:54:42 +10:00
Lachlan Easton 283d441c19 zig fmt: fix #3978, fix #2748 2020-09-09 21:54:42 +10:00
Jakub Konka 7d487a4162
Merge pull request #6289 from kubkon/macho
macho: fix bug where __text section would get overwritten
2020-09-09 09:00:24 +02:00
Zachary Meadows edc40157eb Switch type of HashMap's count from usize to u32 (#6262) 2020-09-09 00:33:14 -04:00
Jakub Konka 9306dbd619
Fix bug where __text section would get overwritten
Fixes a bug where the last written load command would accidentally
override the beginning of the __text section. Also defines missing
MachO constants and relocation structs/enums.

Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-09-08 20:55:06 +02:00
Mark Barbone 42b1b6be90 Add resize for arena allocator 2020-09-08 13:04:14 -04:00
Jens Goldberg 5bf3e54018 Add the Linux TCP socket options 2020-09-08 13:00:07 -04:00
Andrew Kelley f6f0e09456
Merge pull request #6267 from mattnite/btf
BPF: add BTF
2020-09-08 12:59:31 -04:00
xackus b8b68cb279 std: clean up bitrotten imports in crypto 2020-09-08 12:54:28 -04:00
Timon Kruiper 61cd9099e2 Zlib: Make deinit function public 2020-09-08 12:21:49 -04:00
LemonBoy 2328f40b7a std: Add DEFLATE and zlib decompressors 2020-09-07 14:59:46 -07:00
Matt Knight a496f94be9 added map create, update, delete, and prog load 2020-09-07 15:42:41 -04:00
Matthew Knight db7a238297
BPF: add some more documentation (#6268)
* added documentation for ringbuffers, which context type maps to which program type, and added some formatting
2020-09-07 15:41:29 -04:00
Andrew Kelley f96f3265b5
Merge pull request #6265 from mattnite/bpf-finish-insns
BPF: Implement rest of pseudo instructions
2020-09-07 15:39:42 -04:00
Matt Knight b878a64a5f
added license comments 2020-09-07 12:26:41 -07:00
Vincent Rischmann 533bfc68bf big int: fix Managed.dump() 2020-09-07 20:44:01 +03:00
Peter Spiess-Knafl eca20b5e03 Fix compile when using EFI target (Fixes #6275) 2020-09-07 20:40:11 +03:00
Matt Knight cf3194804e
changed enums to lower case 2020-09-07 07:17:21 -07:00
Tadeo Kondrak 771f35c593
Use less inefficient method of replacing TypeInfo.UnionField.enum_field 2020-09-07 06:23:27 -06:00
Tadeo Kondrak ac19ccf595
Update standard library for removal of TypeInfo.UnionField.enum_field 2020-09-07 06:23:26 -06:00
Tadeo Kondrak ff2ed966bb
Implement @Type for Union
This removes TypeInfo.UnionField.enum_field, which is redundant with
TypeInfo.Union.tag_type.
2020-09-07 06:23:24 -06:00
Matt Knight e7547eeefa
fixed missing 'packed' keyword 2020-09-06 22:31:35 -07:00
Matt Knight caaa9ad2af
added btf 2020-09-06 21:44:16 -07:00
Matt Knight 67817b230f
fixed improper builtin import 2020-09-06 17:09:25 -07:00
Matt Knight cf06817768
improved compile error message 2020-09-06 16:21:05 -07:00
Andrew Kelley d7268cbb24
Merge pull request #6232 from LemonBoy/fix-readall
std: Don't trust stat() size in readAllAlloc fns
2020-09-06 19:19:57 -04:00
Matt Knight a993c7dd1b
removed redundant pseudo insn 2020-09-06 16:19:49 -07:00
Matt Knight 295f09eadc
implemented and testing op codes for instructions documented in the unofficial bpf insn reference 2020-09-06 16:12:27 -07:00
Daniel Ludwig a8a806e925 std.ChildProcess: use "\Device\Null" on Windows 2020-09-06 18:25:33 -04:00
Andrew Kelley 32a77a6047
Merge pull request #6239 from pfgithub/patch-1
Support allocating 0 bit types
2020-09-06 01:16:33 -04:00
Veikka Tuominen 41bbadbb9a
Merge pull request #6246 from Vexu/field
Remove deprecated fields on `type`
2020-09-05 13:58:02 +03:00
Andrew Kelley cff14dc2c6
Merge pull request #6247 from alexnask/stage2_pe
Added a basic Portable Executable linker to stage2
2020-09-04 16:05:58 -04:00
Andrew Kelley 209a3da4f7 provide default implementation of std.log on freestanding
closes #6252
2020-09-04 13:00:10 -07:00
Vexu 09c861b829
update rest of tests 2020-09-04 22:49:14 +03:00
yettinmoor 0c43b6ef5c
document how to escape curly braces in fmt.format 2020-09-04 22:11:09 +03:00
LemonBoy 3c8e1bc25b std: Fix for 32bit systems 2020-09-04 12:48:36 +02:00
LemonBoy 90743881cf std: Minor changes to the fs module
* Add a size_hint parameter to the read{toEnd,File}AllocOptions fns
* Rename readAllAlloc{,Options} to readToEndAlloc{,Options} as they
  don't rewind the file before reading
* Fix missing rewind in test case
2020-09-04 10:17:00 +02:00
Alexandros Naskos e9807418e7 Added .pe ObjectFormat
MachO linker no longer collects unused dwarf debug information
2020-09-04 05:22:26 +03:00
Alexandros Naskos e9b137f23a Completed basic PE linker for stage2
Added std.coff.MachineType
Added image characteristic and section flag valued to std.coff
Added std.Target.Cpu.Arch.toCoffMachine
Fixed stage2 --watch flag on windows
2020-09-04 05:15:03 +03:00
pfg abe672956e
Test 0 bit allocation 2020-09-03 16:33:47 -07:00
Felix (xq) Queißner 88724b2a89 Introduces a space after the ellipsis for test and progress. 2020-09-03 18:07:30 -04:00
Andrew Kelley 1034459170
Merge pull request #6243 from ifreund/uid-gid-cleanup
std: clean up usage of uid_t/gid_t, add seteuid/setegid to std.os
2020-09-03 18:05:59 -04:00
Andrew Kelley f2bbd8a548
Merge pull request #6242 from Vexu/stage2
Stage2: slicing and split container scope from file scope
2020-09-03 17:22:57 -04:00
Lachlan Easton 2a58e30bd5 std meta: fix use of alignOf in meta.cast 2020-09-03 14:11:04 -04:00
Andrew Kelley 39a80cf59e
Merge pull request #6238 from Aransentin/master
Add the "sync" family of functions
2020-09-03 14:07:36 -04:00
Kenta Iwasaki 50e3906951
os: return error.SocketNotListening for EINVAL on accept (#6226) 2020-09-03 13:57:08 -04:00
LemonBoy 969547902b std: Fix silent overflow in float parsing code
A u64 can only hold 19 decimal digits, adjust the limit.
2020-09-03 18:14:19 +03:00
Vexu 1df0f3ac24
update uses of deprecated type field access 2020-09-03 18:10:40 +03:00
Isaac Freund d0d6647fdb
std: add seteuid/setegid to std.os
Currently these are only implemented for linux.
2020-09-03 15:22:43 +02:00