17 Commits

Author SHA1 Message Date
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
Andrew Kelley
bdf3680be1
zig fmt 2019-11-25 13:53:13 -05:00
daurnimator
1a84bcefb6
std: fix mismatched doc-comment/argument names in fifo.rewind 2019-11-25 09:26:33 +11:00
daurnimator
94485b2a58
std: clean up fifo.readableSliceMut 2019-11-25 09:26:33 +11:00
daurnimator
b4091e3aec
std: fifo.deinit didn't need to take a pointer 2019-11-25 09:26:33 +11:00
daurnimator
3062e0e932
std: add fifo.writeItem 2019-11-25 09:26:33 +11:00
daurnimator
c393969a20
std: fix bug in fifo.unget if rewinding doesn't wrap around 2019-11-25 09:26:33 +11:00
daurnimator
61179a4d52
std: follow zig standard library convention and have fifo.read number of items 2019-11-25 09:26:33 +11:00
daurnimator
6037f89212
std: fifo rename from FixedSizeFifo to LinearFifo 2019-11-25 09:26:33 +11:00
daurnimator
cd749e0416
std: fifo now has 3 modes: Static, Slice and Dynamic 2019-11-25 09:26:32 +11:00
daurnimator
c0e47cb645
std: fix fifo for non-u8 types 2019-11-25 09:26:32 +11:00
daurnimator
e810f485ab
std: add optimization to fifo if size is power of two 2019-11-25 09:26:32 +11:00
daurnimator
01b2a56225
std: move auto_align constant to top of comptime function
At a later point in time this might be made into a parameter
2019-11-25 09:26:32 +11:00
daurnimator
52645d06e1
std: fix unfinished doc-comment in fifo 2019-11-25 09:26:32 +11:00
schroffl
6109e49c5b Fix FixedSizeFifo buffer type
Update the `.buf` property to be a slice of the type that is given as a parameter.
2019-11-24 14:42:56 -05:00
Andrew Kelley
e0db54e89d
update the codebase to use @as 2019-11-08 15:57:24 -05:00
daurnimator
1657bead46 std: Add fifo useful for buffers 2019-11-04 17:44:01 -05:00