| Age | Commit message (Collapse) | Author |
|
closes #248
|
|
previously, we had lazy analysis of top level declarations,
but if a declaration was referenced within a compile-time
if or switch statement, that would still add the top
level declaration to the resolution queue.
now we have a declref ir instruction, which is only resolved
if we analyze the instruction. this takes into account comptime
branching.
closes #270
|
|
* remove setFnTest builtin
* add test "name" { ... } syntax
* remove --check-unused argument. functions are always lazy now.
|
|
This adds an rpath entry for each used dynamic library directory.
This is necessary on some systems such as NixOS.
|
|
|
|
See #104
|
|
closes #264
|
|
|
|
before, when we initialized a variable by copying the
initialization value, it made the internal const value
references point to a duplicate value, resulting in
a phony duplicate global value being updated instead of
the real on. now the behavior is as expected.
thanks to hoppetosse for pointing out this bug on IRC.
|
|
also introduce the _ identifier which you can assign to
to discard a return value
closes #219
|
|
|
|
|
|
adds compile error when passing pointer that is byte-aligned
at the beginning but not the end to a function expecting
a fully byte aligned pointer
closes #261
|
|
See #261
|
|
see #261
|
|
See #261
Still need to do:
* reading a field that has bit offset 0 but still needs to
shift and truncate
* writing a field
|
|
|
|
See #261
|
|
closes #260
|
|
* `@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.
|
|
See #257
|
|
cleanup from the decision in commit 8a859afd580f438f549ee69a
to remove "unnecessary if statement" error
|
|
* add `@compileLog(...)` builtin function
- Helps debug code running at compile time
- See #240
* fix crash when there is an error on the start value of a slice
* add implicit cast from int and float types to int and float
literals if the value is known at compile time
* make array concatenation work with slices in addition to
arrays and c string literals
* fix compile error message for something not having field access
* fix crash when `@setDebugSafety()` was called from a
function being evaluated at compile-time
* fix compile-time evaluation of overflow math builtins.
* avoid debug safety panic handler in builtin.o and compiler_rt.o
since we use no debug safety in these modules anyway
* add compiler_rt functions for division on ARM
- Closes #254
* move default panic handler to std.debug so users can
call it manually
* std.io.printf supports a width in the format specifier
|
|
See #37
|
|
* Only use Cold Calling Convention on x86
* Add the cold attribute to functions marked with coldcc
|
|
* instead of emitting a breakpoint for a debug safety crash,
zig calls a panic function which prints an error message
and a stack trace and then calls abort.
* on freestanding OS, this panic function has a default
implementation of a simple infinite loop.
* users can override the panic implementation by providing
`pub fn panic(message: []const u8) -> unreachable { }`
* workaround for LLVM segfaulting when you try to use cold
calling convention on ARM.
closes #245
|
|
|
|
|
|
|
|
|
|
|
|
it outputs a number that is unique to each instance of the asm
statement in the entire compilation.
useful when creating local labels and referring to them multiple
times in a single template that generates multiple
assembler instructions
|
|
See #238
|
|
closes #238
|
|
..section in the initialization expression
|
|
|
|
See #238
We can revisit how volatile will work later - for now
here's a builtin function to do it.
|
|
closes #241
|
|
|
|
|
|
|
|
|
|
|
|
closes #235
|
|
See #167
Need to troubleshoot when we send 2 slices to printf. It goes
into an infinite loop.
This commit introduces 4 builtin functions:
* `@isInteger`
* `@isFloat`
* `@canImplictCast`
* `@typeName`
|
|
See #77
|
|
|
|
closes #221
|
|
closes #222
|
|
|