Commit 0b7123f41d regressed the
`include_path` option of ConfigHeader which is intended to set the path,
including subdirectories, that C code would pass to an include
directive.
For example if it passes
.include_path = "config/config.h",
Then the C code should be able to have
#include "config/config.h"
This regressed https://github.com/andrewrk/nasm/ but this commit fixes
it.
Previously, indentation was not being handled correctly in some cases,
causing examples such as `std.json.WriteStream` to be rendered with
improper list nesting.
Additionally, some more test cases have been added to ensure
indentation (or lack of indentation) is handled correctly in some other
constructs.
This field has not been referenced by compile steps since
e76ce2c1d0, all the way back in 2019.
To specify the language standard, pass `-std=[value]` as a regular
C flag instead.
Previously, `Step.Compile.installHeader` and friends would incorrectly
modify the default `install` top-level step, when the intent was for
headers to get bundled with and installed alongside an artifact. This
change set implements the intended behavior.
This carries with it some breaking changes; `installHeader` and
`installConfigHeader` both have new signatures, and
`installHeadersDirectory` and `installHeadersDirectoryOptions` have been
merged into `installHeaders`.
`{}` for decls
`{p}` for enum fields
`{p_}` for struct fields and in contexts following a `.`
Elsewhere, `{p}` was used since it's equivalent to the old behavior.
This is a breaking change.
This updates `std.zig.fmtId` to support conditionally escaping
primitives and the reserved `_` identifier via format specifiers:
- `{}`: escape invalid identifiers, identifiers that shadow primitives
and the reserved `_` identifier.
- `{p}`: same as `{}`, but don't escape identifiers that
shadow primitives.
- `{_}`: same as `{}`, but don't escape the reserved `_` identifier.
- `{p_}` or `{_p}`: only escape invalid identifiers.
(The idea is that `p`/`_` mean "allow primitives/underscores".)
Any other format specifiers will result in compile errors.
Additionally, `isValidId` now considers `_` a valid identifier. If this
distinction is important, consider combining existing uses of this
function with the new `isUnderscore` function.
While iterating over all files in tarball set root_dir in diagnostic if
there is single root in tarball. Will be used in package manager with
strip_components = 0 to find the root of the fetched package.
The 64-bit backend supports printing all floats up to 64-bits. The
128-bit continues to be used for larger values.
This backend is approximately ~3x faster. Code size is a little smaller
in the full table case and much smaller if using the samll tables.
The implementation uses the same code-paths, parameterized by a set of
tables and their pow5 implementations. We continue to use the same
rounding/formatting mechanisms. Initially I explored a separate
implementation, as upstream does this and has specific optimizations for
these paths but for simplicity we don't. The performance loss is small
enough at this point and keeping them combined keeps them in sync.
Closes#19264.
- Changed `modf_result` to `Modf` to better fit naming conventions
- Reworked `modf` to be far simpler and support all floating point types (as well as vectors) (I have done benchmarks and can confirm that the performance is roughly equivalent to the old implementation)
- Added more descriptive tests for modf
- Deprecated `modf32_result` and `modf64_result` in favor of `Modf(f32)` and `Modf(f64)` respectively
Now that `-femit-docs` includes all modules, including the builtin
module, in the generated source tarball, it makes sense to apply the
same logic to the std-docs server. std-docs constructs its own tarball,
so a different approach is needed to achieve the same end result.