| Age | Commit message (Collapse) | Author |
|
|
|
See #37
|
|
See #37
|
|
* 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
|
|
fixes tests when targeting darwin
|
|
* 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
e726925e802eddab53cbfd9aacbc5eefe95c356f.
See #37
|
|
Zig now depends on LLVM 5.0.0.
For the latest version that supports LLVM 4.0.1, use
2a49c876be76dc98996a3251310728ad32b22363.
Unfortunately we had to embed LLD into Zig due to some
MACH-O related LLD bugs. One of them is already upstream
and another is awaiting feedback on the llvm-dev mailing
list.
You can use cmake option -DZIG_FORCE_EXTERNAL_LLD=ON to
still use external LLD if you want to live with the MACH-O
bugs or if your system LLD is patched.
Closes #273
|
|
|
|
* try some macos travis stuff
* put c in the link libs for macos since we always link with libSystem
* for non-native targets on macos, allow runtime symbol resolution
- it's causing an infinite loop in LLD.
* for macos, always build compiler_rt and turn on LinkOnce because
compiler_rt on darwin is missing some stuff.
|
|
see #37
|
|
closes #396
|
|
|
|
See #396
|
|
closes #394
|
|
closes #395
|
|
|
|
closes #430
|
|
closes #428
Thanks Marc Tiehuis for diagnosing this bug
|
|
previously we used the bigfloat abstraction to do all
compile-time float math. but runtime code and comptime code
are supposed to get the same result. so now if you add a
f32 to a f32 at compile time it does it with f32 math
instead of the bigfloat. float literals still get the
bigfloat math.
closes #424
|
|
|
|
* 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
|
|
|
|
closes #418
also make clz, ctz return smaller integer bit widths
and use smaller integer bit widths for enum tag types
|
|
* add u128 and i128 integer types
* add f128 floating point type
* implement big integer multiplication (See #405)
|
|
Before:
* << is left shift, not allowed to shift 1 bits out
* <<% is left shift, allowed to shift 1 bits out
* >> is right shift, allowed to shift 1 bits out
After:
* << is left shift, allowed to shift 1 bits out
* >> is right shift, allowed to shift 1 bits out
* @shlExact is left shift, not allowed to shift 1 bits out
* @shrExact is right shift, not allowed to shift 1 bits out
Closes #413
|
|
closes #415
|
|
closes #407
The mangling strategy replaces bytes outside the alphabet
with "_xx_" where xx is the hex code of the byte.
|
|
|
|
|
|
See #393 for details
|
|
closes #390
|
|
also add bitCast builtin function. closes #387
|
|
|
|
Before, if you did something like:
```
const hi1 = "hi";
const hi2 = hi1;
```
This would create the "hi" data twice in the built object.
But since the value is const we don't have to duplicate the
data, now we take advantage of this fact.
closes #336
|
|
|
|
|
|
* skip installing std/rand_test.zig as it's not needed beyond running
the std lib tests
* add std.math.floor function
* add setFloatMode builtin function to choose between
builtin.FloatMode.Optimized (default) and builtin.FloatMode.Strict
(Optimized is equivalent to -ffast-math in gcc)
|
|
closes #373
|
|
...of special syntax.
partially reverts 41144a8566a6fbd779403f6b69424bb640c94a7f
closes #306
|
|
good riddance
|
|
to be consistent with other c primitive type names
|
|
* 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
|
|
See #38
|
|
closes #288
|
|
|
|
See #226
Closes #220
|
|
closes #328
|
|
this reverts 5c04730534ea7933855429c5fc5dc7b22eba7bc2.
sadly the quality of the intel dialect in llvm's assembly
parser has many frustrating bugs, and generally has unfortunate
syntax.
the plan is to use AT&T for now since it at least works,
and eventually zig will have its own assembly parser for
x86 and it will be as close to NASM as possible.
|
|
See #298
|
|
fixes missing frame for unwrapping an error
closes #345
|