aboutsummaryrefslogtreecommitdiff
path: root/std
AgeCommit message (Collapse)Author
2019-02-14fix implicit cast error unions with non-optional to optional pointerAndrew Kelley
and update self hosted compiler for C pointers See #1059
2019-02-14Add parseFloat support to json.zigMarc Tiehuis
2019-02-14Add parseFloat to std.fmtMarc Tiehuis
This is not intended to be the long-term implementation as it doesn't provide various properties that we eventually will want (e.g. round-tripping, denormal support). It also uses f64 internally so the wider f128 will be inaccurate.
2019-02-13Add f128 support for fabs, isinf, isnan, inf and nan functionsMarc Tiehuis
2019-02-13compiler-rt: Add __addtf3, __subtf3 and __truncdfhf2Marc Tiehuis
Allows addition/subtraction of f128 and narrowing casts to f16 from larger float types.
2019-02-11add C pointer type to @typeInfoAndrew Kelley
See #1059
2019-02-11zig fmt: support C pointersAndrew Kelley
See #1059
2019-02-10testing.expectEqual use expected type as the type of actualJimmi HC
This allows for impl casts
2019-02-09zig fmt: support threadlocalAndrew Kelley
2019-02-08std.debug.assert: remove special case for test buildsAndrew Kelley
Previously, std.debug.assert would `@panic` in test builds, if the assertion failed. Now, it's always `unreachable`. This makes release mode test builds more accurately test the actual code that will be run. However this requires tests to call `std.testing.expect` rather than `std.debug.assert` to make sure output is correct. Here is the explanation of when to use either one, copied from the assert doc comments: Inside a test block, it is best to use the `std.testing` module rather than assert, because assert may not detect a test failure in ReleaseFast and ReleaseSafe mode. Outside of a test block, assert is the correct function to use. closes #1304
2019-02-07Make ThreadSafeFixedBufferAllocator alias FixedBufferAllocator when ↵John Schmidt
--single-threaded Fixes #1910
2019-02-07fixupsAndrew Kelley
2019-02-07Merge branch 'zig-backport-std.mem.join' of https://github.com/kristate/zig ↵Andrew Kelley
into kristate-zig-backport-std.mem.join
2019-02-07fixups, and modify std.mem.join and std.os.path.resolve APIAndrew Kelley
* zig fmt * std.mem.join takes a slice of slices instead of var args * std.mem.join takes a separator slice rather than byte, and always inserts it. Previously it would not insert the separator if there already was one, violating the documented behavior. * std.mem.join calculates exactly the correct amount to allocate and has no call to allocator.shrink() * bring back joinWindows and joinPosix and the corresponding tests. it is intended to be able to call these functions from any OS. * rename std.os.path.resolveSlice to resolve (now resolve takes a slice of slices instead of var args)
2019-02-06Merge branch 'zig-backport-std.os.path' of https://github.com/kristate/zig ↵Andrew Kelley
into kristate-zig-backport-std.os.path
2019-02-06Merge pull request #1924 from ziglang/tlsAndrew Kelley
Implement Thread Local Variables
2019-02-06implement Thread Local Storage on WindowsAndrew Kelley
2019-02-06require running std lib tests coherentlyAndrew Kelley
this should actually improve CI times a bit too See the description at the top of std/os/startup.zig (deleted in this commit) for a more detailed understanding of what this commit does.
2019-02-06thread local storage working for linux x86_64Andrew Kelley
2019-02-06Fixed Serializer and BitOutStream when used with streams that have empty ↵tgschultz
error sets.
2019-02-05Typo: use the joined path to try executables available from PATH.Sahnvour
2019-02-05Notify failure to create a process when the executable is not found even in ↵Sahnvour
PATH.
2019-02-04adjustments to std.mem split / separateAndrew Kelley
* rename std.mem.split to std.mem.tokenize * add future deprecation notice to docs * (unrelated) add note to std.os.path.resolve docs * std.mem.separate - assert delimiter.len not zero * fix implementation of std.mem.separate to respect the delimiter * separate the two iterators to different structs
2019-02-04Merge branch 'zig-backport-std.mem.separate' of ↵Andrew Kelley
https://github.com/kristate/zig into kristate-zig-backport-std.mem.separate
2019-02-03`std.mem.Allocator.create` replaced with better APIAndrew Kelley
`std.mem.Allocator.createOne` is renamed to `std.mem.Allocator.create`. The problem with the previous API is that even after copy elision, the initalization value passed as a parameter would always be a copy. With the new API, once copy elision is done, initialization functions can directly initialize allocated memory in place. Related: * #1872 * #1873
2019-02-01introduce --single-threaded build optionAndrew Kelley
closes #1764 This adds another boolean to the test matrix; hopefully it does not inflate the time too much. std.event.Loop does not work with this option yet. See #1908
2019-02-01add compile errror for @bitCast when bit counts mismatchAndrew Kelley
fixes invalid LLVM IR from previous commit
2019-02-01Merge pull request #1775 from tgschultz/stdlib-serializationAndrew Kelley
Added serialization, bitstreams, traits for int sign, TagPayloadType, some fixes to std
2019-02-01fixupsAndrew Kelley
2019-02-01Merge branch 'windows-mutex' of https://github.com/emekoi/zig into ↵Andrew Kelley
emekoi-windows-mutex
2019-01-31darwin: fix incorrect timeval struct typeAndrew Kelley
closes #1648 I also added some more extern functions for darwin time functions, although nothing depends on them currently.
2019-01-30introduce vector type for SIMDAndrew Kelley
See #903 * create with `@Vector(len, ElemType)` * only wrapping addition is implemented This feature is far from complete; this is only the beginning.
2019-01-30darwin time code: don't cast to int until the endAndrew Kelley
See #1648
2019-01-29backport copy elision changesAndrew Kelley
This commit contains everything from the copy-elision-2 branch that does not have to do with copy elision directly, but is generally useful for master branch. * All const values know their parents, when applicable, not just structs and unions. * Null pointers in const values are represented explicitly, rather than as a HardCodedAddr value of 0. * Rename "maybe" to "optional" in various code locations. * Separate DeclVarSrc and DeclVarGen * Separate PtrCastSrc and PtrCastGen * Separate CmpxchgSrc and CmpxchgGen * Represent optional error set as an integer, using the 0 value. In a const value, it uses nullptr. * Introduce type_has_one_possible_value and use it where applicable. * Fix debug builds not setting memory to 0xaa when storing undefined. * Separate the type of a variable from the const value of a variable. * Use copy_const_val where appropriate. * Rearrange structs to pack data more efficiently. * Move test/cases/* to test/behavior/* * Use `std.debug.assertOrPanic` in behavior tests instead of `std.debug.assert`. * Fix outdated slice syntax in docs.
2019-01-18Hopefully fixed #1503 (at least improved) line accuracy of stack traces on ↵Sahnvour
windows.
2019-01-18removed unnecessary castSahnvour
2019-01-14fix incorrect parameter names for std.math.atan2Andrew Kelley
2019-01-11fixed type signatureemekoi
2019-01-11fixed initializer and typosemekoi
2019-01-11removed nullablesemekoi
2019-01-11changed pointer typesemekoi
2019-01-11fixed mutex on windowsemekoi
2019-01-11moved to InitializeCriticalSection to initemekoi
2019-01-11switching back to EnterCriticalSectionemekoi
2019-01-11switching from EnterCriticalSection to TryEnterCriticalSectionemekoi
2019-01-11updated structsemekoi
2019-01-11added mutex for windowsemekoi
2019-01-05freebsd: fix wrong call to clock_getres (#1871)Marcio
Reported-by: daurnimator
2019-01-04freebsd: add sockaddr structsMarcio Giaxa
2019-01-04freebsd: implement clock related functionsMarcio Giaxa
- clock_gettime - clock_getres