* add alignment capability for fn protos
* add @alignCast
* fix some ast rendering code
* fix some ir rendering code
* add error for pointer cast increasing alignment
* update allocators in std to correctly align
See #37
* remove `@setGlobalAlign`
* add align keyword for setting alignment on functions and
variables.
* loads and stores use alignment from pointer
* memcpy, memset use alignment from pointer
* add syntax for pointer alignment
* slices can have volatile
* add u2, i2 primitives
* ignore preferred align and use abi align everywhere
* back to only having alignOf builtin.
preferredAlignOf is too tricky to be useful.
See #432. Partial revert of
e726925e80.
See #37
* add u3, u4, u5, u6, u7 and i3, i4, i5, i6, i7
* shift operations shift amount parameter type is
integer with log2 bit width of other param
- This enforces not violating undefined behavior on
shift amount >= bit width with the type system
* clean up math.log, math.ln, math.log2, math.log10
closes#403
* add `@divTrunc` and `@divFloor` functions
* add `@rem` and `@mod` functions
* add compile error for `/` and `%` with signed integers
* add `.bit_count` for float primitive types
closes#217
Old:
```
while (condition; expression) {}
```
New:
```
while (condition) : (expression) {}
```
This is in preparation to allow nullable and
error union types as the condition. See #357
* add std.os.deleteTree
* add std.os.deleteDir
* add std.os.page_size
* add std.os API for iterating over directories
* refactor duplication in build.zig
* update documentation on how to run tests
* Fix assertion failure when switching on type.
Closes#310
* Update zig build system to support user defined options.
See #204
* fmt.format supports {sNNN} to set padding for a buffer arg.
* add std.fmt.bufPrint and std.fmt.allocPrint
* std.hash_map.HashMap.put returns the previous value
* add std.mem.startsWith
* `zig build --export [obj|lib|exe]` changed to `zig build_obj`,
`zig build_lib` and `zig build_exe` respectively.
* `--name` parameter is optional when it can be inferred from the
root source filename. closes#207
* `zig build` now looks for `build.zig` which interacts with
`std.build.Builder` to describe the targets, and then the zig
build system prints TODO: build these targets. See #204
* add `@bitcast` which is mainly used for pointer reinterpret
casting and make explicit casting not do pointer reinterpretation.
Closes#290
* fix debug info for byval parameters
* sort command line help options
* `std.debug.panic` supports format string printing
* add `std.mem.IncrementingAllocator`
* fix const ptr to a variable with data changing at runtime.
closes#289
* `@truncate` builtin allows casting to the same size integer.
It also performs two's complement casting between signed and
unsigned integers.
* The idiomatic way to convert between bytes and numbers is now
`mem.readInt` and `mem.writeInt` instead of an unsafe cast.
It works at compile time, is safer, and looks cleaner.
* Implicitly casting an array to a slice is allowed only if the
slice is const.
* Constant pointer values know if their memory is from a compile-
time constant value or a compile-time variable.
* Cast from [N]u8 to []T no longer allowed, but [N]u8 to []const T
still allowed.
* Fix inability to pass a mutable pointer to comptime variable at
compile-time to a function and have the function modify the
memory pointed to by the pointer.
* Add the `comptime T: type` parameter back to mem.eql. Prevents
accidentally creating instantiations for arrays.
remove "unnecessary if statement" error
this "depends on compile variable" code is too hard to validate,
and has false negatives. not worth it right now.
std.str removed, instead use std.mem.
std.mem.eql and std.mem.sliceEql merged and do not require explicit
type argument.
* add `setFnTest`, `setFnVisible`, `setFnStaticEval`,
`setFnNoInline` builtin functions to replace previous
directive functionality
* add `coldcc` and `nakedcc` as keywords which can be used as part
of a function prototype.
* `setDebugSafety` builtin can be used to set debug safety features
at a per block scope level.
* closes#169
This replaces the current generic syntax for functions and replaces
it with the concept of inline parameters.
This paves the way for the "all structs anonymous" proposal.
Closes#151.