aboutsummaryrefslogtreecommitdiff
path: root/std
AgeCommit message (Collapse)Author
2018-08-23MacOS stack traces use the already mmapped executableAndrew Kelley
...rather than trying to find the executable on the file system. Also use a more robust PIE offset calculation based on the available metadata. And for the last function, use the data that tells the end rather than assuming 4K. Also they print in a consistent way with Linux stack traces.
2018-08-23Merge pull request #1402 from ziglang/default-fp-ieee-strictAndrew Kelley
Default to strict IEEE floating point
2018-08-23Default to strict IEEE floating pointMarc Tiehuis
Closes #1227.
2018-08-22rename std.debug.ElfStackTrace to std.debug.DebugInfoAndrew Kelley
2018-08-23std/mem.zig: test writing u64 integers;kristopher tate
2018-08-21fix selfExePath on macosxAndrew Kelley
2018-08-21fix linuxAndrew Kelley
* error.BadFd is not a valid error code. it would always be a bug to get this error code. * merge error.Io with existing error.InputOutput * merge error.PathNotFound with existing error.FileNotFound. Not all OS's support both. * add os.File.openReadC * add error.BadPathName for windows file operations with invalid characters * add os.toPosixPath to help stack allocate a null terminating byte * add some TODOs for other functions to investigate removing the allocator requirement * optimize some implementations to use the alternate functions when a null byte is already available * add a missing error.SkipZigTest * os.selfExePath uses a non-allocating API * os.selfExeDirPath uses a non-allocating API * os.path.real uses a non-allocating API * add os.path.realAlloc and os.path.realC * convert many windows syscalls to use the W versions (See #534)
2018-08-21fix windowsAndrew Kelley
2018-08-21*WIP* std.os assumes comptime-known max path sizeAndrew Kelley
this allows us to remove the requirement of allocators for a lot of functions See #1392
2018-08-20Merge branch 'path_max' of https://github.com/shawnl/zig into shawnl-path_maxAndrew Kelley
2018-08-20refactor std.os.makePath to use a switch instead of ifAndrew Kelley
2018-08-20std.fmt.format: handle non-pointer struct/union/enumAndrew Kelley
Also adds support for printing structs via reflection. The case when structs have pointers to themselves is not handled yet. closes #1380
2018-08-19do not use an allocator when we don't need to because of the existance of ↵Shawn Landden
PATH_MAX
2018-08-18Add secureZero functionMarc Tiehuis
This is identical to `mem.set(u8, slice, 0)` except that it will never be optimized out by the compiler. Intended usage is for clearing secret data. The resulting assembly has been manually verified in --release-* modes. It would be valuable to test the 'never be optimized out' claim in tests but this is harder than initially expected due to how much Zig appears to know locally. May be doable with @intToPtr, @ptrToInt to get around known data dependencies but I could not work it out right now.
2018-08-14fixed handling of [*]u8 when no format specifier is settgschultz
If fmt was called on with a [*]u8 or [*]const u8 argument, but the fmt string did not specify 's' to treat it as a string, it produced a compile error due to accessing index 1 of a 0 length slice.
2018-08-10rb: some style fixesShawn Landden
avoid @import("std") as is the custom compare function name
2018-08-10Merge pull request #1294 from ziglang/async-fsAndrew Kelley
introduce std.event.fs for async file system functions
2018-08-10windows: call CancelIo when canceling an fs watchAndrew Kelley
2018-08-09windows fs watching: fix not initializing table valueAndrew Kelley
2018-08-09windows: only create io completion port onceAndrew Kelley
2018-08-09initial windows implementation of std.event.fs.WatchAndrew Kelley
2018-08-08std.event.fs.preadv windows implementationAndrew Kelley
2018-08-08std.event.fs.pwritev windows implementationAndrew Kelley
also fix 2 bugs where the function didn't call allocator.shrink: * std.mem.join * std.os.path.resolve
2018-08-07fix linux regressionsAndrew Kelley
2018-08-07std.event.fs.Watch distinguishes between Delete and CloseWrite on darwinAndrew Kelley
TODO: after 1 event emitted for a deleted file, the file is no longer watched
2018-08-07implement std.event.fs.Watch for macosAndrew Kelley
2018-08-07mem: use pub on Compare (#1352)Shawn Landden
fixes rb /home/shawn/git/zig/std/rb.zig:133:37: error: 'Compare' is private compare_fn: fn(*Node, *Node) mem.Compare,
2018-08-07Merge pull request #1338 from shawnl/masterAndrew Kelley
std: add red-black tree implementation
2018-08-07mem: add mem.compare(), and use it for mem.lessThan()Shawn Landden
2018-08-07mem: move enum Compare from rb to memShawn Landden
2018-08-06std: add red-black tree implementationShawn Landden
This is to be used with @fieldParentPtr(); Example: const rb = @import("std").rb; const Number = struct { node: rb.Node, value: i32, }; fn number(node: *rb.Node) *Number { @fieldParentPtr(Number, "node", node); } fn compare(l: *rb.Node, r: *rb.Node) rb.Compare { var left = number(l); var right = number(r); if (left.value < right.value) { return rb.Compare.LessThan; } else if (left.value == right.value) { return rb.Compare.Equal; } else if (left.value > right.value) { return rb.Compare.GreaterThan; } unreachable; } -- A version that caches rb.Tree.first() could be added in the future.
2018-08-07fix hash map testAndrew Kelley
2018-08-07std.event.fs support for macosAndrew Kelley
The file I/O stuff is working, but the fs watching stuff is not yet.
2018-08-06merge @kristate's std lib changes to darwinAndrew Kelley
2018-08-06std.HashMap.autoHash: use xor instead of wrapping multAndrew Kelley
2018-08-06fix Thread impl on Linux and add docsAndrew Kelley
2018-08-06separate os.Thread.Id and os.Thread.Handle because of windowsAndrew Kelley
2018-08-06fix std.os.Thread.getCurrentId for linuxAndrew Kelley
2018-08-06Merge branch 'threadid' of https://github.com/mdsteele/zig into ↵Andrew Kelley
mdsteele-threadid
2018-08-06More type cast fixesAndrea Orru
2018-08-06Fix castsAndrea Orru
2018-08-06Merge branch 'master' into zen_stdlibAndrea Orru
2018-08-04Don't compare ?Thread.Id == Thread.Id in the testMatthew D. Steele
It doesn't work, because of issue #1332.
2018-08-04Merge branch 'master' into llvm7Andrew Kelley
2018-08-04zig/std/os/index.zig: clean-up thread id; (#1)kristopher tate
Ref #1316 #1330
2018-08-03Add thread ID support to std.os.Thread (fixes #1316)Matthew D. Steele
2018-08-03Merge remote-tracking branch 'origin/master' into async-fsAndrew Kelley
2018-08-03when decls don't change, don't regenerate themAndrew Kelley
2018-08-03self-hosted: watch files and trigger a rebuildAndrew Kelley
2018-08-03Fix a type error in std.os.linux.getpid() (#1326)Matthew D. Steele
syscall0() returns usize, but we were trying to @bitCast to i32.