Andrew Kelley
56a024bbfc
disable stage2 zir tests on not-yet-supported archs
2020-05-01 06:47:20 -04:00
Andrew Kelley
6e6d0eb690
disable stage2 zir tests on not-yet-supported OS's
2020-05-01 06:47:20 -04:00
Andrew Kelley
2bae942800
add ZIR compare output test case to test suite
2020-05-01 06:47:20 -04:00
Jakub Konka
b23a87953a
Fast-forward std.os.bits.wasi to match preview1 snapshot ABI
...
`wasi_snapshot_preview1` introduced a couple of ABI changes. This
commit fast-forwards the types and consts defined in `std.os.bits.wasi`
to match those changes.
2020-04-30 13:28:50 -04:00
Vexu
7192ca14b7
Merge pull request #5216 from alexnask/windows_ansi_codes
...
Progress will now use ANSI escape codes on windows for terminals that support them
2020-04-30 18:35:55 +03:00
Vexu
155029b709
Merge pull request #5223 from iansimonson/translate_c_bool_to_int
...
Translate-C convert bools to int in complex expressions
2020-04-30 18:28:38 +03:00
Ian Simonson
a2c3ebb756
Use transCreateNodeInfixOp instead of maybeSuppressResult
2020-04-30 19:10:10 +10:00
Vexu
e72f45475d
Merge pull request #4683 from LakeByTheWoods/parser_test
...
Add visible newlines to parser_test output when there's a failure.
2020-04-30 12:04:23 +03:00
Vexu
611bd8e9f4
Merge pull request #5213 from tadeokondrak/evented-readv-fix
...
Fix std.event.Loop.readv
2020-04-30 11:00:27 +03:00
Vexu
87c9696121
move printWithVisibleNewlines to testing.expectEqualStrings
2020-04-30 10:34:18 +03:00
Vexu
2d06e731ec
rename diffIndex to indexOfDiff
2020-04-30 10:33:50 +03:00
Jakub Konka
611a1436f0
Update WASI snapshot to preview1
...
This commit updates the WASI imports to use `wasi_snapshot_preview1`
instead of the old `wasi_unstable`. There are some minor ABI
differences between the two, however, the main motivator for using
the latest "stable" snapshot (aka preview1) is that, at least in
Wasmtime, there has been a lot of improvement work put into preview1
and unfortunately I might add, the improvements were not (in full)
backported to `wasi_unstable` snapshot.
Also, this commit removes the optional bound on the pointer to
`environ_get` syscall.
2020-04-30 01:52:12 -04:00
Ian Simonson
e6fa0beb33
Translate-C convert bools to int in complex expressions
...
Pre-requisite for having a test case for #5062
In complex C statements which are outside of macros,
it is valid C to perform e.g. a bitor between an
integer and a boolean `5 | (8 == 9)`
Currently this results in a zig error after translating
as `c_int | bool` is invalid Zig.
Detects if a sub-expression of a numeric operator is
boolean and if so converts it to int
2020-04-30 12:48:27 +10:00
Michael Dusan
a08675723c
Merge pull request #5219 from mikdusan/qemu
...
ci linux: bump qemu 5.0.0-rc4 → 5.0.0
2020-04-29 19:20:20 -04:00
Michael Dusan
e97181e362
ci linux: bump qemu 5.0.0-rc4 → 5.0.0
2020-04-29 17:01:12 -04:00
Alexandros Naskos
61ba52b9e3
Add unreachable branch
2020-04-29 20:07:23 +03:00
Alexandros Naskos
273d2de099
Progress will now use ANSI escape codes on windows for terminals that support it
2020-04-29 19:49:02 +03:00
Tadeo Kondrak
07c1be80c2
Fix std.event.Loop.readv
2020-04-29 04:33:29 -06:00
Vexu
15141d865a
Merge pull request #5210 from tadeokondrak/IntType-to-Int
...
std.meta.IntType -> std.meta.Int
2020-04-29 11:01:19 +03:00
Tadeo Kondrak
350b2adacd
std.meta.IntType -> std.meta.Int
2020-04-28 19:11:31 -06:00
Tadeo Kondrak
eb183ad9fe
rename std.meta.IntType to std.meta.Int
...
Closes https://github.com/ziglang/zig/issues/5194
2020-04-28 19:11:18 -06:00
Andrew Kelley
5929e5ca0e
Merge pull request #5196 from tadeokondrak/@vector-to-@type-vector
...
`@Vector` -> `@Type(.Vector)`
2020-04-28 16:25:40 -04:00
Andrew Kelley
03dd1fca94
Merge pull request #5195 from tadeokondrak/opaquetype-to-type-opaque
...
@OpaqueType -> `@Type(.Opaque)
2020-04-28 16:21:07 -04:00
Vexu
db25c78413
Merge pull request #5201 from tadeokondrak/mangle-field-names-locally
...
Mangle field names with a local counter in records (translate-c)
2020-04-28 23:18:36 +03:00
Tadeo Kondrak
0cf129689e
Fix/add translate-c tests for previous commit
2020-04-28 08:45:52 -06:00
Tadeo Kondrak
83d2d7ab8a
Mangle field names with a local counter in records
...
See https://github.com/ifreund/river/issues/17 for an issue that occurs
because the field names are mangled globally. When using the generated
bindings, you have no choice but to use the unstable names or redeclare
the entire struct. This commit changes the behaviour to use a local
counter per record declaration, so the names are predictable each time.
2020-04-28 08:45:51 -06:00
Tadeo Kondrak
0673a8d576
Update language reference for std.meta.Vector
2020-04-28 00:47:14 -06:00
Tadeo Kondrak
f977155fdb
@Vector -> std.meta.Vector
2020-04-28 00:47:13 -06:00
Tadeo Kondrak
ee5b358d71
add std.meta.Vector to replace @Vector
2020-04-28 00:24:46 -06:00
Tadeo Kondrak
249938dde0
Validate vector types for @Vector
2020-04-28 00:24:45 -06:00
Tadeo Kondrak
2ef0795bfb
Update language reference for recent @Type changes
2020-04-28 00:02:14 -06:00
Tadeo Kondrak
17e41f6cd3
@OpaqueType -> @Type(.Opaque)
2020-04-28 00:02:13 -06:00
wozeparrot
01605a7742
add missing const to pkg dependencies
2020-04-27 18:29:55 -04:00
Andrew Kelley
ecdf75d04e
Merge pull request #5187 from ziglang/squeek502-windows-fmt-relative
...
zig fmt: Fix relative paths with . and .. on Windows as well as forward slashes
2020-04-27 18:28:53 -04:00
Tadeo Kondrak
45f4a1124f
implement @Type() for more types
2020-04-27 14:37:18 -04:00
Andrew Kelley
1e04e85200
std: support /
in Windows paths
2020-04-27 13:39:06 -04:00
Andrew Kelley
41e17106cd
zig fmt: still print the relative path
...
The previous commit made zig fmt print absolute paths; this commit keeps
the absolute path resolution but still prints the relative paths to
stdout.
2020-04-27 13:38:19 -04:00
Ryan Liptak
fdff381a56
fmt: Fix relative paths with . and .. on Windows
...
This is a band-aid fix due to NtCreateFile failing on paths with . or .. in them.
2020-04-27 13:35:59 -04:00
Auguste Rame
0df82889cf
Fix issue with std.json incorrectly replacing forward slashes with a backslash ( #5167 )
...
* fix breaking typo in json.zig
* add tests
2020-04-27 12:22:43 -04:00
George Roman
a17eb15e11
Add missing state to C object cache
2020-04-27 12:21:48 -04:00
Andrew Kelley
c22b54c9d8
stage2 zir: remove dead code
...
this was part of the live coding stream and I forgot to delete it before
committing
2020-04-26 17:37:04 -04:00
Henry Nelson
83b0f9c6f7
Fix unfortunate typo
2020-04-26 17:33:04 -04:00
Andrew Kelley
6aeceec1f2
add CLI option -Bsymbolic for binding global references locally
2020-04-26 15:30:52 -04:00
Nick Appleton
28c31a8429
Fix f64 variants of math.cosh and math.sinh to accept negative inputs. ( #5172 )
...
* add tests for negative inputs to cosh32 and cosh64. fix bug in cosh64 for negative inputs.
* fix problem with negative input with f64 sinh and add tests
2020-04-26 14:03:19 -04:00
Andrew Kelley
d44c9bdbd9
ir: elemptr and add instructions
2020-04-26 01:20:58 -04:00
Andrius Mitkus
6481b02fdc
std: fix posix Thread.spawn to accept all startFn types
2020-04-25 16:15:25 -04:00
George Roman
0c037a8561
Pass each target feature flag separately
2020-04-25 15:54:02 -04:00
LemonBoy
a7a8c433d0
stage1: Prevent the creation of illegal ptr types
...
Closes #5140
2020-04-24 15:55:32 -04:00
Andrew Kelley
7634e67ba5
Merge pull request #5158 from ziglang/zir-to-elf
...
beginnings of (non-LLVM) self-hosted machine code generation and linking
2020-04-24 15:37:21 -04:00
Andrew Kelley
9ebf25d145
link: change default executable mode to 0o777
...
Jonathan S writes:
On common systems with a 022 umask, this will still result in a
file created with 755 permissions, but it works appropriately if the
system is configured more leniently. (As another data point, C's fopen
seems to open files with the 666 mode.)
2020-04-24 15:36:08 -04:00