Andrew Kelley
b5ac079f88
Merge pull request #4191 from Vexu/non-exhaustive-enums
...
Implement non-exhaustive enums
2020-01-17 14:26:12 -05:00
Vexu
df03fcf5f0
implement `@bitSizeOf`
2020-01-16 13:13:45 -05:00
Andrew Kelley
fbe6af81fd
Merge remote-tracking branch 'origin/master' into llvm10
2020-01-16 13:01:36 -05:00
Vexu
d84569895c
turn panics into compile errors, require at least 1 field in non-exhaustive enum
2020-01-16 09:04:11 +02:00
Vexu
02e5cb1cd4
add non-exhaustive enum to langref
2020-01-15 23:05:52 +02:00
Vexu
0ea96c11ef
disallow multiline strings in test and library names
2020-01-15 14:20:48 -05:00
Shritesh
4c87281b5c
[docs] Add libc dependency to sentinel-term ptr example
...
Fixes "dependency on library c must be explicitly specified in the build command" error
2020-01-14 13:07:08 -05:00
Emilio G. Cota
2be12b24bc
doc/langref: mention that x is the sentinel in [N:x]T
...
Without looking at the example it is not possible to know
whether N or x is the sentinel value. Fix it.
2020-01-13 11:49:46 -05:00
hryx
c4770e7aa5
docs: update grammar to remove C strings and add anon literals
2020-01-12 04:35:45 -05:00
data-man
860d88037a
Correct TypeId docs
2020-01-11 15:59:00 -05:00
LemonBoy
5ab5de89c0
New @export() handling
...
Use a struct as second parameter to be future proof (and also allows to
specify default values for the parameters)
Closes #2679 as it was just a matter of a few lines of code.
2020-01-09 13:43:06 -05:00
data-man
02ace4569e
Correct @mulAdd's doc
2020-01-08 13:56:16 -05:00
Andrew Kelley
c0e8837ce9
update docs with regards to callconv
2020-01-06 18:26:20 -05:00
Andrew Kelley
be2483c576
fix test suite regressions
2020-01-06 18:20:31 -05:00
Andrew Kelley
0a9daeb37e
Merge branch 'cc-work' of https://github.com/LemonBoy/zig into LemonBoy-cc-work
2020-01-06 14:07:56 -05:00
Andrew Kelley
213ff939f1
fix comptime vector float ops and add test coverage
...
also rename `@ln` to `@log` to match libc convention.
2020-01-02 14:01:48 -05:00
LemonBoy
563d9ebfe5
Implement the callconv() annotation
2020-01-02 18:53:16 +01:00
Andrew Kelley
cb56b26900
fix float ops with respect to vectors
...
also remove the redundant type parameter
2020-01-01 23:27:43 -05:00
Andrew Kelley
73e535e112
Merge pull request #3683 from Vexu/atomic-float
...
Support floats with some atomic operations
2019-12-30 19:19:05 -05:00
Andrew Kelley
a3d04b9228
update readme tagline
2019-12-30 18:17:13 -05:00
MateuszOkulus
6c3ccea29b
Make it more obvious that ifs are expressions
2019-12-28 14:26:10 -05:00
Vexu
8bb1e04449
support some atomic operations with floats
2019-12-23 11:54:47 +02:00
Nathan Michaels
f389e5e61f
Clarify allowzero's interaction with optional pointers.
2019-12-17 15:44:34 -05:00
xackus
cb5a5ebb20
langref table of contents in a separate column on large displays
2019-12-16 12:25:56 -05:00
Andrew Kelley
b3cbf290c8
remove misleading documentation
2019-12-16 12:07:05 -05:00
LemonBoy
19ddbd9e9e
Make sure the address is aligned for intToPtr ops
...
Closes #773
2019-12-15 14:41:05 -05:00
Jonathan Marler
4cb4148b35
Document sentinel type in langref
2019-12-12 19:01:22 -05:00
Robin Voetter
30715560c8
Rename @typeOf to @TypeOf in the language reference
2019-12-10 11:09:41 -05:00
Andrew Kelley
a3f6a58c77
remove var args from the language
...
closes #208
2019-12-09 15:27:27 -05:00
Andrew Kelley
f205d23e65
implement async function call with `@call`
...
this removes the last usage of var args in zig std lib
2019-12-09 15:27:26 -05:00
Andrew Kelley
8b3c0bbeee
update docgen to new format API
2019-12-09 00:18:01 -05:00
Andrew Kelley
03396b3caa
update docs to new fmt API
2019-12-08 23:46:50 -05:00
Andrew Kelley
525b1e8fb4
Merge pull request #3856 from ziglang/builtin-call
...
introduce `@call` and remove other builtin calls
2019-12-06 15:49:47 -05:00
Andrew Kelley
656cc33f8d
allow calling with a new stack to regress a bit
...
Calling with a new stack, with a runtime-known stack pointer (e.g.
not a global variable) is regressed with this branch. It is now a
compile-error, due to the Runtime Hint system not being smart enough
to mix a compile-time modifier field with a runtime stack field.
I'm OK with this regression because this feature is flawed (see #3268 )
and may be deleted from the language.
2019-12-06 15:25:00 -05:00
Andrew Kelley
71b7f4b47f
remove `@newStackCall` from zig
2019-12-06 14:52:09 -05:00
Andrew Kelley
343987cd05
remove `@inlineCall` from zig
2019-12-06 14:12:01 -05:00
Andrew Kelley
ef83358eb6
remove `@noInlineCall` from zig
2019-12-05 17:37:29 -05:00
xackus
cb96a096cb
docs: fix duplicate closing tag generation
2019-12-05 22:56:56 +01:00
xackus
71354498c9
docs: add html lang and minor fixes
2019-12-05 22:40:58 +01:00
xackus
ba78d71b09
docs: fix assembly example
2019-12-05 22:40:47 +01:00
yvt
3c6c317424
Update the docs to use `@as`
2019-12-03 19:56:50 +09:00
Andrew Kelley
37caa56fbc
fix docs regressions
2019-12-01 21:27:55 -05:00
Andrew Kelley
a438a615e6
docs: this statement was in the wrong section
2019-11-29 12:41:07 -05:00
Andrew Kelley
f8a2dec243
docs: update references to wasm_allocator
2019-11-25 19:30:41 -05:00
Andrew Kelley
cb38bd0a14
rename std.heap.direct_allocator to std.heap.page_allocator
...
std.heap.direct_allocator is still available for now but it is marked
deprecated.
2019-11-25 17:25:06 -05:00
Andrew Kelley
29e438fd1f
more sentinel-terminated pointers std lib integration
...
See #3767
2019-11-25 00:43:36 -05:00
Andrew Kelley
4c7b52503b
all tests passing
2019-11-24 02:14:21 -05:00
Andrew Kelley
2dd20aa04a
langref: update for sentinel-terminated types
2019-11-23 22:29:12 -05:00
Andrew Kelley
6b623b5ea2
update docs for null terminated stuff
2019-11-21 20:43:42 -05:00
Vexu
314cb707fc
fix containerdoccomment not handled in docgen.zig
2019-11-15 18:44:29 +02:00
Andrew Kelley
c806de8ae7
README: update the short description of what zig is
2019-11-13 13:44:19 -05:00
Andrew Kelley
0237e7a701
std.io.getStdOut and related fns no longer can error
...
Thanks to the Windows Process Environment Block, it is possible to
obtain handles to the standard input, output, and error streams without
possibility of failure.
2019-11-13 04:01:40 +00:00
Andrew Kelley
8bae70454d
Merge pull request #3675 from Vexu/atomic-store
...
Add @atomicStore builtin
2019-11-13 03:06:55 +00:00
Andrew Kelley
37318bf151
fn parameters participate in result location semantics
...
See #3665
2019-11-12 18:55:17 -05:00
Vexu
110ef2e528
add @atomicStore builtin
2019-11-13 00:25:44 +02:00
Andrew Kelley
0c315e7f76
update docs for anonymous struct/list literals
2019-11-11 19:57:57 -05:00
Andrew Kelley
3cf5c2c62b
fix regressed tests and update docs to use "type coercion"
2019-11-08 15:57:25 -05:00
Andrew Kelley
aef04aff0c
initial docs for `@as`
2019-11-08 15:57:25 -05:00
Brendan Hansknecht
c1e8fdf812
add token for parsing pointer dereference
2019-11-06 14:03:21 -05:00
xackus
8960e8090e
make implicit cast of tagged unions to enums easier to find in docs
2019-10-27 21:35:22 +01:00
Maximilian Hunt
dc080573d1
Add documentation on function parameter type inference.
2019-10-22 15:28:21 -04:00
Andrew Kelley
e839250c51
Merge branch 'stratact-no-dir-allocators'
...
closes #2885
closes #2886
closes #2888
closes #3249
2019-10-21 23:54:29 -04:00
Vexu
2550cb4638
remove pub syntax for container fields
2019-10-21 23:04:19 -04:00
stratact
e78d3750c5
Use 8192 sized buffers and remove allocator parameters
2019-10-19 14:04:51 -04:00
Andrew Kelley
406b70aa56
Merge pull request #3390 from nrdmn/unicode_character_literals
...
unicode character literals
2019-10-09 13:25:41 -04:00
Nick Erdmann
ae7392e504
unicode character literals
2019-10-07 08:18:16 +02:00
Matt Keeter
e706cc24f0
Fix typo in docs
2019-10-07 02:03:57 -04:00
Andrew Kelley
8e2c441b2e
stage1 parser supports doc comments
2019-10-06 16:39:27 -04:00
Andrew Kelley
2f4dad04e0
langref: no viewport
2019-10-04 14:06:55 -04:00
Andrew Kelley
edef35bb57
docs: use the updated png favicon
2019-10-03 11:15:55 -04:00
Andrew Kelley
6f10e3fda6
llvm 9.0.0 => llvm 10.0.0
2019-10-02 02:11:46 -04:00
Andrew Kelley
5026db1d31
langref: add 0.5.0 docs link
2019-09-30 12:13:51 -04:00
Andrew Kelley
e0eb045b5f
remove unhelpful/outdated/unused doc file
2019-09-30 08:33:04 -04:00
Andrew Kelley
0e9f86b1db
docs: docgen supports release safe exe code examples
...
and make the type names of `@hasDecl` and `@hasField` consistent
2019-09-29 17:28:30 -04:00
Andrew Kelley
ec545859b9
docgen: support code examples for riscv target
2019-09-29 14:03:49 -04:00
Andrew Kelley
b89a09af4b
docgen: add "process terminated by signal" to exe_err
2019-09-26 13:11:07 -04:00
Andrew Kelley
94e9b9c625
docs: mention release-small along with release-fast
2019-09-26 12:05:49 -04:00
Michael Dusan
efea7958f8
doc: usingnamespace imports only public decls
2019-09-26 10:55:13 -04:00
Andrew Kelley
568c183d2a
docgen: slightly better caching
2019-09-25 17:59:52 -04:00
Andrew Kelley
993d5bc9c9
add docs for usingnamespace
...
closes #1589
2019-09-24 21:23:12 -04:00
Andrew Kelley
56b1818beb
docgen: test blocks support linking libc
2019-09-24 11:41:19 -04:00
Andrew Kelley
c0b937ba12
docgen: slightly cleaner display of libc cli args
2019-09-24 11:36:59 -04:00
Euan Torano
8a15537c6e
Fix #3272 - update docs
2019-09-22 11:23:00 -04:00
Andrew Kelley
ee200aaa8c
fix typo in docs
...
closes #3267
2019-09-20 11:48:35 -04:00
Andrew Kelley
b76d16c7c7
update remaining llvm 8.0.0 references to 9.0.0
2019-09-19 20:55:02 -04:00
Andrew Kelley
8a30edcde8
Merge remote-tracking branch 'origin/master' into llvm9
2019-09-19 17:02:32 -04:00
Shawn Landden
ff9f3275de
docs: clarify @clz and @ctz terminology to not be endian-specific.
...
This was brought up in IRC a few days ago.
2019-09-19 11:47:02 -04:00
Andrew Kelley
28c7fe60b6
add docs for `@splat`
2019-09-19 11:14:42 -04:00
Andrew Kelley
380c8ec2c9
implement runtime `@byteSwap` and other fixups
...
* update docs for `@byteSwap`.
* fix hash & eql functions for ZigLLVMFnIdBswap not updated to
include vector len. this was causing incorrect bswap function
being called in unrelated code
* fix `@byteSwap` behavior tests only testing comptime and not
runtime operations
* implement runtime `@byteSwap`
* fix incorrect logic in ir_render_vector_to_array and
ir_render_array_to_vector with regards to whether or not to bitcast
* `@byteSwap` accepts an array operand which it will cast to vector
* simplify `@byteSwap` semantic analysis code and various fixes
2019-09-19 00:59:04 -04:00
Andrew Kelley
2038f4d45a
rework the implementation
...
* update documentation
- move `@shuffle` to be sorted alphabetically
- remove mention of LLVM
- minor clarifications & rewording
* introduce ir_resolve_vector_elem_type to avoid duplicate compile
error message and duplicate vector element checking logic
* rework ir_analyze_shuffle_vector to solve various issues
* improve `@shuffle` to allow implicit cast of arrays
* the shuffle tests weren't being run
2019-09-18 16:15:19 -04:00
Shawn Landden
193604c837
stage1: add @shuffle() shufflevector support
...
I change the semantics of the mask operand, to make it a little more
flexible. There is no real danger in this because it is a compile-error
if you do it the LLVM way (and there is an appropiate error to tell you
this).
v2: avoid problems with double-free
2019-09-18 11:26:45 -04:00
Andrew Kelley
185cb13278
Merge remote-tracking branch 'origin/master' into llvm9
2019-09-10 13:00:35 -04:00
Andrew Kelley
0a3c6dbda9
implement `noasync` function calls
...
See #3157
2019-09-05 21:55:32 -04:00
Vesa Kaihlavirta
847a262efd
Shorten @field documentation and add an example
2019-09-05 13:07:04 -04:00
LemonBoy
fabf45f5fc
Add the noinline keyword for function declarations
2019-09-05 13:04:58 -04:00
Andrew Kelley
ac7703f65f
fixups and add documentation for `@Type`
2019-09-04 11:12:14 -04:00
Sahnvour
f08c6e4fe6
changing occurrences of HashMap with []const u8 as keys for StringHashMap
2019-09-03 23:53:05 +02:00
Andrew Kelley
058050f22c
Merge remote-tracking branch 'origin/master' into llvm9
2019-09-02 20:56:31 -04:00
Andrew Kelley
a223063923
`@typeOf` now guarantees no runtime side effects
...
related: #1627
2019-08-31 11:00:31 -04:00
Andrew Kelley
5f3d59f0ac
Merge branch 'master' into llvm9
2019-08-20 19:09:52 -04:00