LemonBoy
cc774c603b
compiler-rt: Add __divtf3
2020-03-24 18:08:53 +01:00
LemonBoy
4e95662a4a
std: Add qNaN constants
2020-03-24 18:08:53 +01:00
Andrew Kelley
39589cffe0
compiler-rt: fix __clear_cache on aarch64 darwin
2020-03-24 11:51:13 -04:00
Andrew Kelley
03013e5176
compiler-rt: aarch64 implementation of __clear_cache
2020-03-24 10:33:23 -04:00
Andrew Kelley
93c7fa105f
Merge remote-tracking branch 'origin/llvm10'
...
LLVM 10 was released today
2020-03-24 09:57:09 -04:00
LeRoyce Pearson
1a6c3aeec9
Block until file is unlocked on windows
2020-03-23 23:20:17 -06:00
LeRoyce Pearson
8bec1304c3
Fix compile error on windows
2020-03-23 22:34:00 -06:00
LeRoyce Pearson
113b217593
Merge branch 'master' into feature-file-locks
2020-03-23 21:39:16 -06:00
Joachim Schmidt
5acc8afb5f
Use math.Order for comparing bigints instead of i8 ( #4791 )
2020-03-23 23:16:57 -04:00
LeRoyce Pearson
0b93932a21
Add O_SHLOCK and O_EXLOCK to freebsd and netbsd
2020-03-23 21:07:50 -06:00
LeRoyce Pearson
5b278fb606
Use locking open flags if they are defined
2020-03-23 20:59:09 -06:00
LemonBoy
c3f93be00c
std: Tell pthread the guard page size is zero
...
On NetBSD this is needed to avoid crashes in pthread_join as the default
value for the guard page size is not ignored even though a custom stack
address is specified.
2020-03-23 23:26:34 +01:00
LemonBoy
d6739b1397
std: Fix undefined field error
2020-03-23 23:26:21 +01:00
LemonBoy
b21d3535a5
std: Fix parameters for pthread_attr_setstack
...
The guard page size shouldn't be taken into account, pthread is only
interested in the usable area.
2020-03-23 20:12:10 +01:00
LemonBoy
09a5f172f8
std: Different thread stack allocation for NetBSD
...
* NetBSD is stricter than other OSs and doesn't allow mprotect to mark a
non-accessible region as RW
* Fix mprotect call over the whole stack, oops
2020-03-23 19:50:29 +01:00
LemonBoy
cda73c3c18
std: Add missing C bits and defines for NetBSD
2020-03-23 18:55:45 +01:00
LemonBoy
761602e3e8
std: Use getdents on all the BSDs
...
* Use the correct versioned libc calls to avoid nasty surprises
2020-03-23 18:54:14 +01:00
LemonBoy
336ed03f0f
debug: Accept relative paths in mapWholeFile
2020-03-23 18:51:49 +01:00
LemonBoy
27344464ed
std: Add missing C defines for NetBSD
2020-03-23 18:47:40 +01:00
Andrew Kelley
13d04f9963
Merge pull request #4741 from momumi/master
...
allow `_` separators in number literals (stage 1)
2020-03-23 00:54:54 -04:00
Andrew Kelley
e5e5196d8e
Merge remote-tracking branch 'origin/master' into llvm10
2020-03-22 20:48:21 -04:00
momumi
2d18178c27
minor fixes and more tests for _ separators
...
* Make the tokenizer spit out an Invalid token on the first invalid
character found in the number literal.
* More parsing and tokenizer tests for number literals
* fix invalid switch statement in ir.zig
2020-03-23 09:21:34 +10:00
LemonBoy
9d19d9008e
debug: Correct version check in debug_line parser
...
Version 3 is similar to version 2 plus more opcodes.
2020-03-22 19:19:41 -04:00
Andrew Kelley
23c263776c
Merge remote-tracking branch 'origin/master' into llvm10
2020-03-22 15:09:29 -04:00
momumi
8de45e5143
update parsing of int literals in self-hosted
...
* update std.math.big.Int.setString() to ignore underscores and make it
case insensitive
* fix issue in ir.zig with leading zeroes in integer literals
2020-03-22 13:59:14 +10:00
dbandstra
a8fa1ecd89
fix build.zig addBuildOption function for stream refactor
2020-03-21 23:18:09 -04:00
momumi
29324e6f39
fix formatting in tokenizer tests
2020-03-22 12:41:11 +10:00
momumi
138dab4524
add number _
separators for stage 2 tokenizer
2020-03-22 10:35:19 +10:00
LemonBoy
28dbc58837
Address review comments
2020-03-21 09:54:49 +01:00
LemonBoy
128e70ff3a
ir: Allow errdefer with payload
...
Closes #1265
2020-03-21 09:54:49 +01:00
Andrew Kelley
3a2c490889
"generate .h files" feature is no longer supported in stage1
2020-03-20 18:33:36 -04:00
Andrew Kelley
ef69e4efa0
Merge branch 'mt-panic' of https://github.com/LemonBoy/zig into glibc-add-ld
2020-03-20 13:02:19 -04:00
LemonBoy
541e763010
ir: Peer type resolution between ?[]T and *[N]T
...
Closes #4767
2020-03-20 12:23:05 -04:00
Andrew Kelley
53b5aa812b
Merge remote-tracking branch 'origin/master' into llvm10
2020-03-19 22:19:24 -04:00
Andrew Kelley
28a6c136e9
revert std.mem.span to prefer len over sentinel; add spanZ
2020-03-19 19:30:09 -04:00
Andrew Kelley
dc04e97098
Merge pull request #4752 from ziglang/slice-array
...
slicing with comptime start and end indexes results in pointer-to-array
2020-03-19 18:06:16 -04:00
Andrew Kelley
6b6f2fcf96
std.net: remove the hack from earlier in the branch
2020-03-19 15:09:52 -04:00
Andrew Kelley
f614d94faa
update std lib to take advantage of slicing with comptime indexes
2020-03-19 14:48:47 -04:00
Andrew Kelley
555a2c0328
(breaking) std.fs.copyFile now integrates with Dir
...
Removed:
* `std.fs.updateFile`
* `std.fs.updateFileMode`
* `std.fs.copyFile`
* `std.fs.copyFileMode`
Added:
* `std.fs.Dir.copyFile`
* `std.fs.copyFileAbsolute`
* `std.fs.updateFileAbsolute`
Moved:
* `std.fs.Dir.UpdateFileOptions` => `std.fs.CopyFileOptions`
Deprecated:
* `std.fs.deleteDir`
* `std.fs.deleteDirC`
* `std.fs.deleteDirW`
* `std.fs.readLink`
* `std.fs.readLinkC`
2020-03-19 14:43:41 -04:00
Andrew Kelley
1d7861a36e
fix incorrect sentinel check
2020-03-19 13:18:14 -04:00
Andrew Kelley
61266d2621
test & docs fixups to work with new semantics
2020-03-19 09:53:55 -04:00
Andrew Kelley
7fa88cc0a6
std lib fixups for new semantics
...
std lib tests are passing now
2020-03-19 09:53:55 -04:00
Andrew Kelley
b5dba702ff
fixes to std.meta
...
behavior tests are passing now
2020-03-19 09:53:55 -04:00
Andrew Kelley
8ea0a00f40
improve std lib code for the new semantics
2020-03-19 09:53:54 -04:00
Andrew Kelley
8d0ac6dc4d
@ptrCast
supports casting a slice to pointer
2020-03-19 09:53:54 -04:00
Andrew Kelley
0707be8de8
fixes in semantic analysis needed to support this feature
2020-03-19 09:53:54 -04:00
Andrew Kelley
46ffc798b6
fix swapped logic for Windows
...
Remove `std.fs.deleteTree`. Callers instead should use
`std.fs.cwd().deleteTree`.
Add `std.fs.deleteTreeAbsolute` for when the caller has an absolute
path.
2020-03-18 16:42:47 -04:00
Andrew Kelley
27affde592
(breaking) clarify openDir API
...
* remove deprecated `std.fs.Dir` APIs
* `std.fs.Dir.openDir` now takes a options struct with bool fields for
`access_sub_paths` and `iterate`. It's now much more clear how
opening directories works.
* fixed the std lib and various zig code calling the wrong openDir
function.
* the runtime safety check for dir flags is removed in favor of the
cheaper option of putting a comment on the same line as handling
EBADF / ACCESS_DENIED, since that will show up in stack traces.
2020-03-18 16:10:57 -04:00
LemonBoy
c45fe2759f
build: Fix silly bug in directory traversal
2020-03-18 13:45:52 -04:00
LemonBoy
e15605e1c1
std: Safety check for iterate()
...
Calling iterate() on a Dir object returned by openDirTraverse is always
an error.
2020-03-18 13:45:52 -04:00