| Age | Commit message (Collapse) | Author |
|
This is an attempt to save memory when building self-hosted.
before:
Total bytes allocated: 5.941 GiB, deallocated: 2.259 GiB, remaining: 3.681 GiB
after:
Total bytes allocated: 5.933 GiB, deallocated: 2.253 GiB, remaining: 3.680 GiB
|
|
|
|
|
|
|
|
|
|
|
|
implement @typeInfo for Frame and implement @Type for Frame, EnumLiteral, and ErrorSet
|
|
Make align expr on fns a compile error in Wasm
|
|
ir_assert_gen) (#5393)
|
|
In Wasm, specifying alignment of function pointers makes little sense
since function pointers are in fact indices to a Wasm table, therefore
any alignment check on those is invalid. This can cause unexpected
behaviour when checking expected alignment with `@ptrToInt(fn_ptr)`
or similar. This commit proposes to make `align` expressions a
compile error when compiled to Wasm architecture.
Some references:
[1] [Mozilla: WebAssembly Tables](https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format#WebAssembly_tables)
[2] [Sunfishcode's Wasm Ref Manual](https://github.com/sunfishcode/wasm-reference-manual/blob/master/WebAssembly.md#indirect-call)
|
|
|
|
|
|
stage1: fix assert fail on opaque fn ptr param
|
|
|
|
|
|
|
|
|
|
Closes https://github.com/ziglang/zig/issues/3066
|
|
|
|
Changing the pointer length from Unknown to Single/C now resets the
sentinel value too.
Closes #5134
|
|
Applying the wrong ABI is slightly better than using the Zig ABI, the
whole thing is so wrong it should be burned to the ground.
|
|
Closes #5005
|
|
|
|
The codegen would sometimes change the LLVM type for some constants to
an unnamed structure in order to accomodate extra padding. This is fine
as long as the alignment of each field is still respected and it was not
the case for structure types, leading to ill-formed constants being
generated.
Optional types suffer from this to a lower extent as their layout is
quite lucky, the only missing piece was the tail padding.
Closes #4530
Closes #4594
Closes #4295
Closes my will to live
|
|
Extend the logic used for function definitions to variables.
Closes #4947
|
|
Before, type_has_one_possible_value would return false for the value
`.{1}`. But actually, that type is a tuple with a single comptime field.
Such a type, in fact, has one possible value.
This plus the corresponding adjustment to get_the_one_possible_value
solves #3878.
|
|
In some cases the compiler was actually emitting an 64 bit signed
multiplication, instead of a 32 bit unsigned one.
|
|
Make fallthrough an error when compiler supports it. This requires a new
macro that is defined with such compilers to be used as a statement, at
all fallthrough sites:
switch (...) {
case 0:
...
ZIG_FALLTHROUGH;
case 1:
...
break;
default:
...
break;
}
If we ever move to C++17 as minimal requirement, then the macro can be
replaced with `[[fallthrough]];` at statement sites.
|
|
Throughout the stage1 code it is assumed that these have the same layout,
but that was not the case. This caused an issue on 32-bit hardware.
|
|
closes #4786
|
|
|
|
|
|
|
|
implements #863
|
|
* Don't add an extra slot for the sentinel. Most of the code keeps using
the constant value from the type descriptor, let's harmonize all the
code dealing with sentinels.
* Properly write out sentinel values when reinterpreting pointers at
comptime.
* Allow the reading of the 0th element in a `[0:S]T` type.
|
|
|
|
Zero-length array with a sentinel may not have zero size.
Closes #4749
|
|
fix failed assert on generic fn opaque return type
|
|
* Fix codegen for optional types that decay to a pointer, the type
behaves as a boolean
* Fix comptime evaluation of zero-sized arrays, always initialize the
internal array elements
Closes #4673
|
|
|
|
|
|
Anonymous containers have no struct_field->type AstNode set, let's
always use the field node itself to make the error messages consistent.
Closes #4691
|
|
|
|
Now it will emit a compile error rather than crashing when the child
type has not been resolved properly.
Introduces `get_optional_type2` which should be used generally inside
ir.cpp.
Fix some std lib compile errors noticed by the provided test case.
Thanks @LemonBoy for the test case. Closes #4377.
Fixes #4374.
|
|
- regression was introduced by 371c21aa70fc61ef703e34079ce6de6c52ec91df
|
|
- use consistent allocator in `realloc_const_vals_ptrs()`
- unexport `create_fn_raw()`
|
|
And fix most of the fallout. This also makes optional pointers not
require resolving zero bits, because the comptime value struct layout no
longer depends on whether the type has zero bits.
Thanks to @LemonBoy for the behavior test case
Closes #4357
Closes #4359
|
|
introduce operating system version ranges as part of the target; self-host native dynamic linker detection and native glibc version detection
|
|
|
|
d2535c003c6188fcc362028e01ef9f7fb3356727
|