| Age | Commit message (Collapse) | Author |
|
|
|
|
|
and rename LinkType->LinkMode, OutType->OutputMode
|
|
|
|
|
|
|
|
Having ConstGlobalRefs be a pointer in ZigValue was a hack that caused
plenty of bugs. It was used to work around difficulties in type coercing
array values into slices.
However, after #3787 is merged, array values no longer type coerce into
slices, and so this provided an opportunity to clean up the code.
This has the nice effect of reducing stage1 peak RAM usage during the
std lib tests from 3.443 GiB to 3.405 GiB (saving 39 MiB).
There is one behavior test failing in this branch, which I plan to debug
after merging #3787.
|
|
Improved support for exporting variables
|
|
- merge const_void_val → intern.x_void
- move const_zero_byte → intern.zero_byte
- wrap intern access
|
|
|
|
|
|
|
|
|
|
recursively
otherwise they wouldn't be included when only a struct contains them
|
|
|
|
- extracted functions
- factorised extern "C" into a block containing all function prototypes instead of writing macros all over the place
- using intermediate buffers instead of writing directly to the output file
|
|
|
|
See #3731
|
|
|
|
this also deletes C string literals from the language, and then makes
the std lib changes and compiler changes necessary to get the behavior
tests and std lib tests passing again.
|
|
as well as `@typeInfo` and `@Type`
|
|
Fixes #3681
|
|
This removes the remaining hack in the implementation of anonymous
struct literals, and they can now therefore now have greater than 16
fields/elements.
|
|
in the implementation of anonymous struct literals
|
|
Add @atomicStore builtin
|
|
closes #3667
|
|
See #3665
|
|
|
|
found this trying to build oxid
|
|
This commit also hooks up type coercion (previously called implicit
casting) into the result location mechanism, and additionally hooks up
variable declarations, maintaining the property that:
var a: T = b;
is semantically equivalent to:
var a = @as(T, b);
See #1757
|
|
|
|
Closes #3607
|
|
|
|
|
|
|
|
|
|
|
|
d91fc0fdd8f42dc8c38347e1a0ec87fd583c1d3d changed zig's behavior to
disable the SSE feature when cross compiling for i386-freestanding.
This commit does the same when compiling C Code.
|
|
|
|
|
|
This was already fixed when doing `@cImport`, but not yet when
running `zig translate-c`.
|
|
src/codegen.cpp:7713:33: error: unused variable 'global_linkage_values' [-Werror,-Wunused-const-variable]
static const GlobalLinkageValue global_linkage_values[] = {
|
|
Clang does not support -march=native for all targets.
Arguably it should always work, but in reality it gives:
error: the clang compiler does not support '-march=native'
If we move CPU detection logic into Zig itelf, we will not need this,
instead we will always pass target features and CPU configuration explicitly.
For now, we simply avoid passing the flag when it is known to not be
supported.
|
|
|
|
* All the data types from `@import("builtin")` are moved to
`@import("std").builtin`. The target-related types are moved
to `std.Target`. This allows the data types to have methods, such as
`std.Target.current.isDarwin()`.
* `std.os.windows.subsystem` is moved to
`std.Target.current.subsystem`.
* Remove the concept of the panic package from the compiler
implementation. Instead, `std.builtin.panic` is always the panic
function. It checks for `@hasDecl(@import("root"), "panic")`,
or else provides a default implementation.
This is an important step for multibuilds (#3028). Without this change,
the types inside the builtin namespace look like different types, when
trying to merge builds with different target settings. With this change,
Zig can figure out that, e.g., `std.builtin.Os` (the enum type) from one
compilation and `std.builtin.Os` from another compilation are the same
type, even if the target OS value differs.
|
|
closes #3469
|
|
|
|
|
|
* use erase rest of line escape code.
* use `stderr.supportsAnsiEscapeCodes` rather than `isTty`.
* respect `--color off`
* avoid unnecessary recursion
* add `Progress.log`
* disable the progress std lib test since it's noisy and uses
`time.sleep()`.
* enable/integrate progress printing with the default test runner
|
|
|