joachimschmidt557
f1360bee1c
Update docgen to new ArrayList API
2020-04-09 14:57:14 -04:00
markfirmware
c3afaa1f58
Update langref.html.in
2020-04-08 21:00:43 -04:00
xackus
b7f116a774
langref: small updates
2020-04-07 14:54:53 -04:00
daurnimator
e535057364
std: use std.ArrayList(u8).OutStream instead of std.Buffer.OutStream
2020-04-01 10:36:38 -04:00
Andrew Kelley
9e7ae06249
std lib API deprecations for the upcoming 0.6.0 release
...
See #3811
2020-03-30 14:23:22 -04:00
Andrew Kelley
463b90b977
ci: fix aarch64 linux
...
This patch adds a workaround for #4822 , disables one failing langref
example, and enables the rest of the test suite.
You win some, you lose some.
2020-03-26 19:42:28 -04:00
Andrew Kelley
93c7fa105f
Merge remote-tracking branch 'origin/llvm10'
...
LLVM 10 was released today
2020-03-24 09:57:09 -04:00
Andrew Kelley
13d04f9963
Merge pull request #4741 from momumi/master
...
allow `_` separators in number literals (stage 1)
2020-03-23 00:54:54 -04:00
Andrew Kelley
53b5aa812b
Merge remote-tracking branch 'origin/master' into llvm10
2020-03-19 22:19:24 -04:00
Andrew Kelley
61266d2621
test & docs fixups to work with new semantics
2020-03-19 09:53:55 -04:00
Andrew Kelley
46ffc798b6
fix swapped logic for Windows
...
Remove `std.fs.deleteTree`. Callers instead should use
`std.fs.cwd().deleteTree`.
Add `std.fs.deleteTreeAbsolute` for when the caller has an absolute
path.
2020-03-18 16:42:47 -04:00
momumi
7aac21c6f5
allow _
separators in number literals (stage 1)
...
* Underscores `_` may be placed between two digits in a int/float literal
* Consecutive underscores are not allowed
* Fixed parsing bug in exponents of hexadecimal float literals.
Exponents should always be base 10, but hex characters would be parsed
inside the exponent and everything after them would be ignored. eg:
`0x1.0p1ab1` would be parsed as `0x1.0p1`.
2020-03-15 12:38:35 +10:00
Andrew Kelley
faa3c40b54
fix docgen, which relied on stdout being path to binary
2020-03-14 00:46:40 -04:00
Andrew Kelley
656ba530d8
Merge remote-tracking branch 'origin/master' into llvm10
2020-03-13 15:17:53 -04:00
Andrew Kelley
f51bec321b
Merge pull request #4707 from Vexu/small-atomics
...
Support atomic operations with bools and non power of two integers
2020-03-12 18:55:16 -04:00
Vexu
ec906a9771
fix codegen, update docs
2020-03-11 13:55:52 +02:00
Andrew Kelley
2bff0dda79
fix regressions found by test suite
2020-03-10 20:22:30 -04:00
Andrew Kelley
96c07674fc
Merge remote-tracking branch 'origin/master' into llvm10
2020-03-07 12:18:41 -05:00
Andrew Kelley
0e5b48d1a2
fix @embedFile
docs
2020-03-06 16:01:26 -05:00
Andrew Kelley
116e2a93f1
update docs for @TypeOf
2020-03-04 18:05:14 -05:00
Andrew Kelley
3178807657
Merge remote-tracking branch 'origin/master' into llvm10
2020-03-04 15:35:46 -05:00
Andrew Kelley
8aaab75af0
docs: remove reference to deprecated builtins
...
closes #3959
2020-03-03 22:14:29 -05:00
Andrew Kelley
c4f81586f1
update docgen to new std.fs API
2020-03-03 16:01:09 -05:00
Andrew Kelley
d1cb16aace
Merge remote-tracking branch 'origin/master' into llvm10
2020-03-03 09:44:13 -05:00
Andrew Kelley
662b5f7c60
update docs to latest Target API
2020-02-28 14:51:55 -05:00
Andrew Kelley
70bf8874d7
update docgen to new Target API
2020-02-28 14:51:55 -05:00
Andrew Kelley
dbe4d72bcf
separate std.Target and std.zig.CrossTarget
...
Zig now supports a more fine-grained sense of what is native and what is
not. Some examples:
This is now allowed:
-target native
Different OS but native CPU, default Windows C ABI:
-target native-windows
This could be useful for example when running in Wine.
Different CPU but native OS, native C ABI.
-target x86_64-native -mcpu=skylake
Different C ABI but otherwise native target:
-target native-native-musl
-target native-native-gnu
Lots of breaking changes to related std lib APIs.
Calls to getOs() will need to be changed to getOsTag().
Calls to getArch() will need to be changed to getCpuArch().
Usage of Target.Cross and Target.Native need to be updated to use
CrossTarget API.
`std.build.Builder.standardTargetOptions` is changed to accept its
parameters as a struct with default values. It now has the ability to
specify a whitelist of targets allowed, as well as the default target.
Rather than two different ways of collecting the target, it's now always
a string that is validated, and prints helpful diagnostics for invalid
targets. This feature should now be actually useful, and contributions
welcome to further improve the user experience.
`std.build.LibExeObjStep.setTheTarget` is removed.
`std.build.LibExeObjStep.setTarget` is updated to take a CrossTarget
parameter.
`std.build.LibExeObjStep.setTargetGLibC` is removed. glibc versions are
handled in the CrossTarget API and can be specified with the `-target`
triple.
`std.builtin.Version` gains a `format` method.
2020-02-28 14:51:54 -05:00
Andrew Kelley
f33bf48af7
Merge remote-tracking branch 'origin/master' into llvm10
2020-02-25 16:30:40 -05:00
Vexu
d56115ef41
remove @IntType
and @ArgType
(mostly) from the compiler
2020-02-25 01:27:34 +02:00
Vexu
538d9a5dd8
remove uses of @ArgType
and @IntType
2020-02-24 23:39:03 +02:00
Vexu
3458fb891d
remove @typeId
, @memberCount
, @memberName
and @memberType
from the compiler
2020-02-24 23:21:11 +02:00
xackus
7664c3bc11
remove @bytesToSlice, @sliceToBytes from tests, docs
2020-02-23 18:03:50 +01:00
LemonBoy
eb5e6259aa
docs: Fix wrong extern fn definition
2020-02-18 18:18:29 -05:00
Andrew Kelley
cdc5070f21
Merge remote-tracking branch 'origin/master' into llvm10
2020-02-10 00:26:33 -05:00
Andrew Kelley
eddca50059
fix regression in docgen
...
I used the wrong function here
2020-02-08 00:03:06 -05:00
Andrew Kelley
4a60689309
more carefully calculate llvm field indexes
...
more correctly solves #4403
2020-02-07 14:54:58 -05:00
Andrew Kelley
d0b12d7726
Merge remote-tracking branch 'origin/master' into llvm10
2020-02-03 17:30:38 -05:00
Andrew Kelley
17c8f108a4
drop @newStackCall
...
this was causing unrelated behavior tests to fail.
if this commit is reverted, the docs are good, but `@newStackCall` is
already deprecated in favor of `@call`, supplying the `stack` property.
2020-01-30 17:51:55 -05:00
Andrew Kelley
a95dce15ae
Merge remote-tracking branch 'origin/master' into llvm10
2020-01-29 23:33:12 -05:00
Benjamin Feng
837877ea37
Update docs to reflect new testing.allocator usage
2020-01-29 22:22:01 -06:00
Benjamin Feng
b077f3ab7d
Promoted "leak_count_allocator" to the main testing.allocator
2020-01-29 22:22:00 -06:00
Benjamin Feng
c4e6e5fad6
Add explicit free to docs
2020-01-29 14:47:17 -06:00
Benjamin Feng
aa9caf5064
Create leak_count_allocator
2020-01-29 14:37:01 -06:00
Benjamin Feng
4d134a01f5
Move debug.global_allocator to testing.allocator
2020-01-29 12:21:29 -06:00
Zac
926a7adb3a
Update langref.html.in
...
Fix typo
2020-01-27 21:39:29 -05:00
Andrew Kelley
97b2ac598b
Merge remote-tracking branch 'origin/master' into llvm10
2020-01-22 12:12:36 -05:00
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