Commit Graph

9205 Commits

Author SHA1 Message Date
LeRoyce Pearson
fffd59e6c4 Remove file handle from CacheHash
A file handle is not the same thing as an inode index number.
Eventually the inode will be checked as well, but there needs to be
a way to get the inode in `std` first.
2020-05-25 13:48:43 -04:00
LeRoyce Pearson
21d7430696 Replace ArrayList in write_manifest with an array 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
061c1fd9ab Use readAllAlloc
Now that the memory leak mentioned in #4656 has been fixed.
2020-05-25 13:48:43 -04:00
LeRoyce Pearson
4f709d224a Make hash digest same size as in the c API 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
8e4b80522f Return base64 digest instead of using an out variable 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
e75a6e5144 Rename cache_file -> addFile 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
50cbf1f3aa Add slice and array support to add method 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
fde188aadc Make type specific add functions
Basically, move type specific code into their own functions instead
of making `add` a giant function responsible for everything.
2020-05-25 13:48:43 -04:00
LeRoyce Pearson
4173dbdce9 Rename cache functions to add 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
27bf1f781b Store fs.Dir instead of path to dir 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
55a3925ab7 Rename CacheHashFile -> File 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
c8062321b3 Use fs.File 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
86fe88bbcb Use std.fs.base64_encoder in std.cache_hash 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
8c8813a5cf Add filesystem base64 decoder 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
ce5b2286f1 Support caching bools; make caching values infallible 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
de341b8fb8 Fix memory leak in cache_hash 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
8a77c1c637 Add cache method; add support for caching integers 2020-05-25 13:48:43 -04:00
LeRoyce Pearson
3158dc424e Partially implement cache hash API in zig 2020-05-25 13:48:43 -04:00
data-man
0ecdbdb3cb Support comptime floats in std.fmt 2020-05-25 12:48:59 -04:00
Andrew Kelley
0fd77c2de3
Merge pull request #5431 from alexnask/build_step_ids
Added and id and a cast function to build steps
2020-05-25 11:24:15 -04:00
Alexandros Naskos
65d827183b Added custom build step id, made tests.zig steps use it 2020-05-25 11:36:12 +03:00
Alexandros Naskos
d268e0cf2e Added and id and a cast function to build steps 2020-05-25 11:20:31 +03:00
Andrew Kelley
3052fd84c8 fix regression in std.os.windows.fromSysTime 2020-05-25 00:37:47 -04:00
Andrew Kelley
c693c3ae50 Merge branch 'leroycep-feature-nano-timestamp'
closes #5237
2020-05-24 21:40:23 -04:00
Andrew Kelley
53d011fa1a (breaking) std.time fixups and API changes
Remove the constants that assume a base unit in favor of explicit
x_per_y constants.

nanosecond calendar timestamps now use i128 for the type. This affects
fs.File.Stat, std.time.nanoTimestamp, and fs.File.updateTimes.

calendar timestamps are now signed, because the value can be less than
the epoch (the user can set their computer time to whatever they wish).

implement std.os.clock_gettime for Windows when clock id is
CLOCK_CALENDAR.
2020-05-24 21:40:08 -04:00
LeRoyce Pearson
c6e7d0fcfd Use better names for darwin timestart 2020-05-24 21:40:08 -04:00
LeRoyce Pearson
b85a191398 Fix compile errors for MacOS 2020-05-24 21:40:08 -04:00
LeRoyce Pearson
2dfe798217 Use once to init _timestart in thread safe way 2020-05-24 21:40:08 -04:00
LeRoyce Pearson
7586ce0023 Implement a faster way to get nanoseconds on darwin 2020-05-24 21:40:08 -04:00
LeRoyce Pearson
bb46894115 Add std.time.nanoTimestamp function 2020-05-24 21:40:08 -04:00
Jethro Nederhof
4b1a846471
target: Implement running OS version detection for FreeBSD (#5416)
* target: Implement OS version detection for FreeBSD

Fixes #4582

* freebsd version: handle errors explicitly
2020-05-24 20:52:13 -04:00
Noam Preil
07472fb453 [Stage2/Codegen] Properly handle arch in genCall 2020-05-24 20:49:29 -04:00
data-man
db0c30446a Supports vectors in mem.zeroes 2020-05-24 20:48:29 -04:00
data-man
b13dd3cf61 Treat vectors as indexable 2020-05-24 20:44:17 -04:00
Andrew Kelley
dd05f2be80 run zig fmt on std lib 2020-05-24 10:04:09 -04:00
Andrew Kelley
1c0b7ddda8 fix regression in AST node iteration
the new iteration code caused an integer underflow for function
prototypes with no parameters. now fixed.
2020-05-24 10:03:26 -04:00
Andrew Kelley
2ff3995a70
Merge pull request #5378 from ziglang/speed-up-stage2-parsing
improve std.zig.parse performance using flat arrays for AST nodes and tokens
2020-05-24 09:44:08 -04:00
Andrew Kelley
8a3cd82b85 translate-c: fix a use-after-free bug 2020-05-23 23:15:58 -04:00
Andrew Kelley
882921b5dd
Merge pull request #5415 from jethron/freebsd-bits
Freebsd bits
2020-05-23 20:54:09 -04:00
Andrew Kelley
2952604d5d update docgen to new ast API 2020-05-23 20:40:09 -04:00
Andrew Kelley
c432811d96 fix regression in compile errors 2020-05-23 20:27:09 -04:00
Andrew Kelley
f771545a7e revert std.zig.ast iterator changes back to master branch API 2020-05-23 20:14:38 -04:00
Jethro Nederhof
f83fd47b14 os/bits/freebsd audit 2020-05-24 10:08:43 +10:00
Jethro Nederhof
b504169fef FreeBSD: missing networking constants 2020-05-24 10:08:43 +10:00
Andrew Kelley
c78a2e2e8d translate-c: emit local typedefs 2020-05-23 19:59:26 -04:00
Andrew Kelley
395786fd50 translate-c: fix regression in param name mangling 2020-05-23 19:28:14 -04:00
Andrew Kelley
88f5e3a60d translate-c: fix regression in switch statement 2020-05-23 17:58:35 -04:00
Andrew Kelley
f67b8c68a0 translate-c: fix regression on array initialization 2020-05-23 17:52:46 -04:00
Andrew Kelley
32c27daae4 translate-c: fix decl statement regression 2020-05-23 17:50:35 -04:00
Andrew Kelley
46f50ee76c translate-c: fix regression in do-while loop 2020-05-23 17:25:13 -04:00