8 Commits

Author SHA1 Message Date
Robin Voetter
841a37ab59 Add std.sort.argMax and std.sort.argMin 2019-12-04 18:20:55 +01:00
Robin Voetter
0159fa284a Make std.sort.min and std.sort.max return ?T 2019-12-04 18:10:20 +01:00
Robin Voetter
65f57e4499 Make std.sort.max accept const slices and add tests 2019-12-04 16:42:18 +01:00
Robin Voetter
6bb0ee0bc4 Add std.sort.isSorted 2019-12-04 16:41:32 +01:00
Andrew Kelley
bf3ac66150
remove type coercion from array values to references
* Implements #3768. This is a sweeping breaking change that requires
   many (trivial) edits to Zig source code. Array values no longer
   coerced to slices; however one may use `&` to obtain a reference to
   an array value, which may then be coerced to a slice.

 * Adds `IrInstruction::dump`, for debugging purposes. It's useful to
   call to inspect the instruction when debugging Zig IR.

 * Fixes bugs with result location semantics. See the new behavior test
   cases, and compile error test cases.

 * Fixes bugs with `@typeInfo` not properly resolving const values.

 * Behavior tests are passing but std lib tests are not yet. There
   is more work to do before merging this branch.
2019-11-27 03:37:50 -05:00
Benjamin Feng
aca1367533 Optimize binary search algorithm 2019-11-26 13:09:58 -05:00
Andrew Kelley
e0db54e89d
update the codebase to use @as 2019-11-08 15:57:24 -05:00
Andrew Kelley
ed36dbbd9c
mv std/ lib/
that's all this commit does. further commits will fix cli flags and
such.

see #2221
2019-09-25 23:35:41 -04:00