Commit Graph

1429 Commits (ac8898e68150fc9cd2bc04ee6c4ef4d3005b8c27)

Author SHA1 Message Date
Andrew Kelley ac8898e681
std.build.Builder: mutable env_map 2018-11-07 21:23:09 -05:00
kristopher tate 5d014d4b37 os.crypto: support for HmacBlake2s256 variety; 2018-11-03 15:03:48 -04:00
Andrew Kelley 1554dd9697
support building static self hosted compiler on macos
* add a --system-linker-hack command line parameter to work around
   poor LLD macho code. See #1535
 * build.zig correctly handles static as well as dynamic dependencies
   when building the self hosted compiler.
   - no more unnecessary libxml2 dependency
   - a static build on macos produces a completely static self-hosted
     compiler for macos (except for libSystem as intended).
2018-11-02 00:54:34 -04:00
Andrew Kelley 0f3e7387bf
cleanups 2018-10-31 10:44:05 -04:00
Andrew Kelley b04c6cee60
Merge branch 'add-test-for-atomic-Queue-dump' of https://github.com/winksaville/zig into winksaville-add-test-for-atomic-Queue-dump 2018-10-31 10:29:49 -04:00
emekoi c7799ff2b2 fixed comments 2018-10-27 12:58:40 -05:00
Andrew Kelley 2b395d4ede
remove @minValue,@maxValue; add std.math.minInt,maxInt
closes #1466
closes #1476
2018-10-26 15:01:51 -04:00
tgschultz 63f9769e80 fix "std" not found error in meta/trait 2018-10-24 01:47:52 -04:00
tgschultz 65b9fae4f8 fix error where "std" isn't found in meta/trait 2018-10-24 01:47:52 -04:00
Jimmi Holst Christensen 65b7d85524 Fixed code still using old ptr syntax 2018-10-20 17:59:06 +02:00
Jimmi Holst Christensen db3b768eab Ran fmt on last PR 2018-10-19 23:27:16 +02:00
tgschultz 2a3fdd52ce Add std.meta (#1662)
Implement std.meta
2018-10-19 17:19:22 -04:00
Andrew Kelley eeb4f376a3
std.io: fix compile error when InStream has empty error set 2018-10-16 12:48:38 -04:00
Andrew Kelley 49bc33efe1 fix windows 2018-10-15 21:38:01 -04:00
Andrew Kelley d5648d2640
remove implicit cast from T to *const T
closes #1465
2018-10-15 18:23:47 -04:00
Jimmi Holst Christensen 378d3e4403
Solve the return type ambiguity (#1628)
Changed container and initializer syntax
* <container> { ... } -> <container> . { ... }
* <exrp> { ... } -> <expr> . { ...}
2018-10-15 09:51:15 -04:00
Andrew Kelley 3e72411db0
C ABI and compiler rt improvements for ARM
* add __multi3 compiler rt function. See #1290
* compiler rt includes ARM functions for thumb and aarch64 and
  other sub-arches left out. See #1526
* support C ABI for returning structs on ARM. see #1481
2018-10-13 15:18:00 -04:00
Marc Tiehuis 67fb4d1359 Improve time.sleep api 2018-10-11 11:57:59 -04:00
emekoi a22d9daaec added math.pow support for integer types. resolves #1637 (#1642)
added math.powi for integers; pow now handles ints
2018-10-10 10:50:23 -04:00
Andrew Kelley 84690ee05e
std/special/bootstrap: inline some functions to improve stack traces 2018-10-09 13:16:50 -04:00
Andrew Kelley 5a3c02137e
support building static libraries
closes #1493
closes #54
2018-10-09 13:15:14 -04:00
Andrew Kelley d40c4e7c89
Merge pull request #1429 from shawnl/arm64
initial arm64 support
2018-10-06 00:11:39 -04:00
Shawn Landden 2d27341724 arm64: respond to code review 2018-10-06 03:31:52 +00:00
emekoi 31469daca3 removed unneeded dll extension 2018-10-04 11:43:53 -04:00
Andrew Kelley 3f13a59cbc
better mutex implementation
based on Ulrich Drepper's "Futexes are tricky" paper, Mutex, Take 3

also includes tests
2018-10-03 14:55:12 -04:00
Andrew Kelley 66cb75d114
std.Mutex: implement blocking mutexes on linux
closes #1463

Thanks to Shawn Landden for the original pull request.
This commit is based on that code.
2018-10-03 13:19:10 -04:00
Andrew Kelley acefcdbca5
add std.os.linux.vfork and std.os.linux.exit_group 2018-10-02 14:08:32 -04:00
Wink Saville cd211bcc20 Add doc comment for tokenLocationPtr (#1618)
The algorithm seemed unusual and I had spent some effort understanding
it, so I thought I'd add a comment.
2018-10-02 00:51:53 -04:00
Andrew Kelley af229c1fdc
std lib (breaking): posixRead can return less than buffer size
closes #1414

std.io.InStream.read now can return less than buffer size
introduce std.io.InStream.readFull for previous behavior

add std.os.File.openWriteNoClobberC
rename std.os.deleteFileWindows to std.os.deleteFileW
remove std.os.deleteFilePosix
add std.os.deleteFileC

std.os.copyFile no longer takes an allocator
std.os.copyFileMode no longer takes an allocator
std.os.AtomicFile no longer takes an allocator

add std.os.renameW
add windows support for std.os.renameC

add a test for std.os.AtomicFile
2018-10-01 13:50:55 -04:00
Andrew Kelley d1ec8377d1
std lib: flesh out the async I/O streaming API a bit 2018-10-01 10:53:39 -04:00
Andrew Kelley 9d4eaf1e07
update std lib API for I/O
std.io.FileInStream -> std.os.File.InStream
std.io.FileInStream.init(file) -> file.inStream()
std.io.FileOutStream -> std.os.File.OutStream
std.io.FileOutStream.init(file) -> file.outStream()

remove a lot of error code possibilities from os functions

std.event.net.socketRead -> std.event.net.read
std.event.net.socketWrite -> std.event.net.write
add std.event.net.readv
add std.event.net.writev
add std.event.net.readvPosix
add std.event.net.writevPosix
add std.event.net.OutStream
add std.event.net.InStream

add std.event.io.InStream
add std.event.io.OutStream
2018-09-30 17:28:35 -04:00
Andrew Kelley 57c4d38c55
rename std.event.tcp to std.event.net 2018-09-30 10:37:58 -04:00
emekoi 623f5085f1 merged windows dll apis 2018-09-30 01:05:13 -05:00
emekoi d3bf267136 added dynamic library loading for windows 2018-09-30 01:05:13 -05:00
Jimmi Holst Christensen 1428ef3b07 Expose failing_allocator as *Allocator instead of const FailingAllocator 2018-09-30 01:23:05 +02:00
Josh Wolfe e7d9d00ac8 overhaul api for getting random integers (#1578)
* rand api overhaul
* no retry limits. instead documented a recommendation
  to call int(T) % len directly.
2018-09-27 00:35:38 -04:00
Andrew Kelley 9485043b3c
fix implicit casting to *c_void
closes #1588

also some small std lib changes regarding posix sockets
and one doc typo fix
2018-09-26 11:06:09 -04:00
Wink Saville 0e6c18c820 Remove StrLitKind enum
I was looking at the tokenizer specifically fn testTokenize and the
this statement looked odd:

  if (@TagType(Token.Id)(token.id) != @TagType(Token.Id)(expected_token_id)) {

I then saw the TODO and thought I'd remove StrLitKind figuring that
would make testTokenize simpler. It did so I thought I'd prepare this PR.

The tests are still working and stage2 zig seems to work, it compiles and
I was able to use the fmt command.
2018-09-24 19:28:46 -04:00
Wink Saville a170a64776 Fix typo in argsAlloc comment
Changed freeArgs to argsFree.
2018-09-23 13:12:57 -04:00
Andrew Kelley 7c5e3e1f8e
fixups 2018-09-21 14:15:58 -04:00
Andrew Kelley 073f7ebb0e
fix formatInt to handle upcasting to base int size 2018-09-20 13:46:20 -04:00
Andrew Kelley 15301504e2
Merge remote-tracking branch 'origin/llvm7' 2018-09-19 12:57:58 -04:00
Christian Wesselhoeft 5eeef1f5ed std/index.zig: Fix import
BufferOutStream is defined in io.zig
2018-09-18 19:01:35 -04:00
Andrew Kelley 6dd93ee5d9
fix regression from previous commit 2018-09-18 18:56:29 -04:00
Andrew Kelley 21328e0036
zig fmt: handle shebang lines
closes #1546
2018-09-18 18:36:39 -04:00
Andrew Kelley 275b4100c0
remove unnecessary setFloatMode calls
Now that Strict is the default, these calls only add noise.
2018-09-18 15:15:03 -04:00
Andrew Kelley 4b2719b51d
Merge remote-tracking branch 'origin/master' into llvm7 2018-09-18 15:05:47 -04:00
Andrew Kelley 15e59eb142
remove deprecated, unused windows functions
* `CryptAcquireContextA`
 * `CryptReleaseContext`
 * `CryptGenRandom`

See https://github.com/ziglang/zig/issues/534#issuecomment-422208368
2018-09-17 20:07:48 -04:00
Andrew Kelley 4c6f1e614a
remove `zig build --init`. add `zig init-lib` and `zig init-exe`
init-lib creates a working static library with tests, and
init-exe creates a working hello world with a `run` target.

both now have test coverage with the new "cli tests" file.

closes #1035
2018-09-17 17:11:18 -04:00
Andrew Kelley a2abdb185f
Merge remote-tracking branch 'origin/master' into llvm7 2018-09-16 10:51:58 -04:00