| Age | Commit message (Collapse) | Author |
|
that's all this commit does. further commits will fix cli flags and
such.
see #2221
|
|
|
|
|
|
|
|
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> . { ...}
|
|
|
|
|
|
add pointer arithmetic for unknown length pointer
|
|
See #770
Currently it does not have any different behavior than `*`
but it is now recommended to use `[*]` for unknown length
pointers to be future-proof.
Instead of [ * ] being separate tokens as the proposal
suggested, this commit implements `[*]` as a single token.
|
|
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
|
|
* move std.io.File to std.os.File
* add `zig fmt` to self hosted compiler
* introduce std.io.BufferedAtomicFile API
* introduce std.os.AtomicFile API
* add `std.os.default_file_mode`
* change FileMode on posix from being a usize to a u32
* add std.os.File.mode to return mode of an open file
* std.os.copyFile copies the mode from the source file instead of
using the default file mode for the dest file
* move `std.os.line_sep` to `std.cstr.line_sep`
|
|
Before we accepted a nullable allocator for some stuff like
opening files. Now we require an allocator.
Use the mem.FixedBufferAllocator pattern if a bound on the amount
to allocate is known.
This also establishes the pattern that usually an allocator is the
first argument to a function (possibly after "self").
fix docs for std.cstr.addNullByte
self hosted compiler:
* only build docs when explicitly asked to
* clean up main
* stub out zig fmt
|
|
|
|
The purpose of this is:
* Only one way to do things
* Changing a function with void return type to return a possible
error becomes a 1 character change, subtly encouraging
people to use errors.
See #632
Here are some imperfect sed commands for performing this update:
remove arrow:
```
sed -i 's/\(\bfn\b.*\)-> /\1/g' $(find . -name "*.zig")
```
add void:
```
sed -i 's/\(\bfn\b.*\))\s*{/\1) void {/g' $(find ../ -name "*.zig")
```
Some cleanup may be necessary, but this should do the bulk of the work.
|
|
See #632
now we have 1 less sigil
|
|
See #632
better fits the convention of using keywords for control flow
|
|
Now the self-hosted compiler re-uses the same C++ code for interfacing
with LLVM as the C++ code.
It also links against the same LLD library files.
|
|
self hosted compiler parser tests do some fuzz testing
|
|
instead of last statement being expression value
closes #629
|
|
|
|
|
|
See #359
|
|
Old:
```
while (condition; expression) {}
```
New:
```
while (condition) : (expression) {}
```
This is in preparation to allow nullable and
error union types as the condition. See #357
|
|
See #329
Supporting work:
* move std.cstr.Buffer0 to std.buffer.Buffer
* add build.zig to example/shared_library/ and add an automated test
for it
* add std.list.List.resizeDown
* improve std.os.makePath
- no longer recursive
- takes into account . and ..
* add std.os.path.isAbsolute
* add std.os.path.resolve
* reimplement std.os.path.dirname
- no longer requires an allocator
- handles edge cases correctly
|
|
closes #272
|
|
* remove setFnTest builtin
* add test "name" { ... } syntax
* remove --check-unused argument. functions are always lazy now.
|
|
|
|
|
|
|
|
* comptime fn call
* is_comptime doesn't count as an instruction dependency
* update more std code to latest zig
|
|
|
|
* add `setFnTest`, `setFnVisible`, `setFnStaticEval`,
`setFnNoInline` builtin functions to replace previous
directive functionality
* add `coldcc` and `nakedcc` as keywords which can be used as part
of a function prototype.
* `setDebugSafety` builtin can be used to set debug safety features
at a per block scope level.
* closes #169
|
|
closes #140
|
|
each address is contained within
also fix a bug having to do with codegen for enum value
initialization expressions
|
|
|
|
and fix ability to take address of variables
from other namespaces
|
|
Closes #62.
|
|
|