| Age | Commit message (Collapse) | Author |
|
|
|
* CLI: `-target [name]` instead of `--target-*` args.
This matches clang's API.
* `builtin.Environ` renamed to `builtin.Abi`
- likewise `builtin.environ` renamed to `builtin.abi`
* stop hiding the concept of sub-arch. closes #1526
* `zig targets` only shows available targets. closes #438
* include all targets in readme, even those that don't
print with `zig targets` but note they are Tier 4
* refactor target.cpp and make the naming conventions
more consistent
* introduce the concept of a "default C ABI" for a given
OS/Arch combo. As a rule of thumb, if the system compiler
is clang or gcc then the default C ABI is the gnu ABI.
|
|
Add float parsing support to std
|
|
This is not intended to be the long-term implementation as it doesn't
provide various properties that we eventually will want (e.g.
round-tripping, denormal support). It also uses f64 internally so the
wider f128 will be inaccurate.
|
|
See #1059
|
|
Previously, std.debug.assert would `@panic` in test builds,
if the assertion failed. Now, it's always `unreachable`.
This makes release mode test builds more accurately test
the actual code that will be run.
However this requires tests to call `std.testing.expect`
rather than `std.debug.assert` to make sure output is correct.
Here is the explanation of when to use either one, copied from
the assert doc comments:
Inside a test block, it is best to use the `std.testing` module
rather than assert, because assert may not detect a test failure
in ReleaseFast and ReleaseSafe mode. Outside of a test block, assert
is the correct function to use.
closes #1304
|
|
|
|
|
|
|
|
|
|
|
|
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
|
|
Changed container and initializer syntax
* <container> { ... } -> <container> . { ... }
* <exrp> { ... } -> <expr> . { ...}
|
|
initial arm64 support
|
|
|
|
|
|
closes #1283
|
|
From IEEE-754 standard:
Conversion of a quiet NaN in a supported format to an external character sequence
shall produce a language-defined one of “nan” or a sequence that is equivalent except
for case (e.g., “NaN”), with an optional preceding sign. (This standard does not interpret
the sign of a NaN.)
|
|
* zig fmt
* use canonical parameter order. memcpy has dest first and
the base64 code follows the pattern.
* pass correct radix to charToDigit
|
|
Depends on #1454 being implemented;
|
|
Co-Authored-By: Shawn Landden <shawn@git.icu>
|
|
\x00 was printed as 0 and \x0E was printed as E;
\x00 now correctly prints 00 and \x0E correctly prints 0E;
|
|
|
|
Supports {x} for lowercase and {X} for uppercase;
|
|
|
|
* Handle unions differently in std.fmt
Print the active tag's value in tagged unions. Untagged unions considered unsafe to print and treated like a pointer or an array.
|
|
|
|
Caused by struct printing behavior. Enums are different enough from structs and unions that the field iteration behavior doesn't do what we want even if @memberName didn't error on enums.
|
|
Also adds support for printing structs via reflection.
The case when structs have pointers to themselves is not
handled yet.
closes #1380
|
|
If fmt was called on with a [*]u8 or [*]const u8 argument, but the fmt string did not specify 's' to treat it as a string, it produced a compile error due to accessing index 1 of a 0 length slice.
|
|
|
|
closes #1285
|
|
|
|
This is akin to channels in Go, except:
* implemented in userland
* they are lock-free and thread-safe
* they integrate with the userland event loop
The self hosted compiler is changed to use a channel for events,
and made to stay alive, watching files and performing builds when
things change, however the main.zig file exits after 1 build.
Note that nothing is actually built yet, it just parses the input
and then declares that the build succeeded.
Next items to do:
* add windows and macos support for std.event.Loop
* improve the event loop stop() operation
* make the event loop multiplex coroutines onto kernel threads
* watch source file for updates, and provide AST diffs
(at least list the top level declaration changes)
* top level declaration analysis
|
|
|
|
* add `@intCast`
* add `@floatCast`
* add `@floatToInt`
* add `@intToFloat`
See #1061
|
|
this commit does not have all tests passing
|
|
is for saftey. (#1092)
|
|
See #1023
This also renames Nullable/Maybe to Optional
|
|
|
|
* add assertion for trying to do @typeInfo on global error set
* remove TypeInfo.Slice
* add TypeInfo.Pointer.Size with possible values
- One
- Many
- Slice
See #770
|
|
* enable slicing for single-item ptr to arrays
* disable slicing for other single-item pointers
* enable indexing for single-item ptr to arrays
* disable indexing for other single-item pointers
see #770
closes #386
|
|
tgschultz-zig-custom-format
I removed the code that checks for type signature and type.
A function named `format` is enough for zig to give it a try.
|
|
See #770
To help automatically translate code, see the
zig-fmt-pointer-reform-2 branch.
This will convert all & into *. Due to the syntax
ambiguity (which is why we are making this change),
even address-of & will turn into *, so you'll have
to manually fix thes instances. You will be guaranteed
to get compile errors for them - expected 'type', found 'foo'
|
|
|
|
|
|
|
|
|
|
|
|
See #1003
|