| Age | Commit message (Collapse) | Author |
|
closes #1953
only needed for freestanding targets.
also adds safety for `@intToPtr` when the address is zero.
|
|
see #683
|
|
Previously, global assembly was parsed expecting it to have
the template syntax. However global assembly has no inputs,
outputs, or clobbers, and thus does not have template syntax.
This is now fixed.
This commit also adds a compile error for using volatile
on global assembly, since it is meaningless.
closes #1515
|
|
|
|
closes #1047
|
|
|
|
See #1059
|
|
See #1059
|
|
|
|
This commit contains everything from the copy-elision-2
branch that does not have to do with copy elision directly,
but is generally useful for master branch.
* All const values know their parents, when applicable, not
just structs and unions.
* Null pointers in const values are represented explicitly,
rather than as a HardCodedAddr value of 0.
* Rename "maybe" to "optional" in various code locations.
* Separate DeclVarSrc and DeclVarGen
* Separate PtrCastSrc and PtrCastGen
* Separate CmpxchgSrc and CmpxchgGen
* Represent optional error set as an integer, using the 0 value.
In a const value, it uses nullptr.
* Introduce type_has_one_possible_value and use it where applicable.
* Fix debug builds not setting memory to 0xaa when storing
undefined.
* Separate the type of a variable from the const value of a variable.
* Use copy_const_val where appropriate.
* Rearrange structs to pack data more efficiently.
* Move test/cases/* to test/behavior/*
* Use `std.debug.assertOrPanic` in behavior tests instead of
`std.debug.assert`.
* Fix outdated slice syntax in docs.
|
|
This accomplishes the same goal, but with less changes, so that
I can backport copy elision stuff easier.
|
|
|
|
|
|
add zig fmt support for this syntax
closes #1152
|
|
|
|
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> . { ...}
|
|
See #1121
|
|
closes #1283
|
|
* clean up parser code
* fix stage2 parse and render code
* remove redundant test
* make stage1 compile tests leaner
|
|
|
|
Tracking Issue #1296 ;
|
|
closes #803
|
|
use the `zig-fmt-optional-default` branch to have zig fmt
automatically do the changes.
closes #1023
|
|
See #1023
This also renames Nullable/Maybe to Optional
|
|
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'
|
|
start using zig-fmt-pointer-reform branch build of zig fmt
to fix code to use the new syntax
all of test/cases/* are processed, but there are more left
to be done - all the std lib used by the behavior tests
|
|
See #770
|
|
* you can label suspend blocks
* labeled break supports suspend blocks
See #803
|
|
|
|
|
|
closes #857
|
|
closes #817
|
|
* instead of `async(allocator) call()`, now it is
`async<allocator> call()`.
* Fixes syntax ambiguity when leaving off the allocator
* Fixes parse failure when call is a field access
This sets a precedent for using `<` to pass arguments
to a keyword. This will affect `enum`, `union`, and
`fn` (see #661)
|
|
closes #813
|
|
closes #779
|
|
|
|
See #727
|
|
See #727
|
|
See #727
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|