| Age | Commit message (Collapse) | Author |
|
See #3157
|
|
|
|
which heap allocate their own frames
related: #1006
|
|
|
|
|
|
|
|
|
|
|
|
It used to be that usingnamespace was only allowed at top level. This
made it OK to put the state inside the AST node data structure. However,
now usingnamespace can occur inside any aggregate data structure, and
therefore the state must be in the TopLevelDeclaration rather than in
the AST node.
There were two other problems with the usingnamespace implementation:
* It was passing the wrong destination ScopeDecl, so it could cause an
incorrect error such as "import of file outside package path".
* When doing `usingnamespace` on a file that already had
`pub usingnamespace` in it would "steal" the usingnamespace, causing
incorrect "use of undeclared identifier" errors in the target file.
closes #2632
closes #2580
|
|
|
|
|
|
|
|
|
|
|
|
|
|
old syntax: []i32{1, 2, 3}
new syntax: [_]i32{1, 2, 3}
closes #1797
|
|
|
|
See #2014
`use` syntax is still accepted for now. `zig fmt` automatically
updates code. After a release cycle the old syntax will be removed.
|
|
|
|
|
|
|
|
|
|
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'
|