LemonBoy
2f465761bb
stage1: Implement @intCast between vectors
...
Explicit and implicit integer casts on vector types are now supported
and follow the same rules as their scalar counterparts.
Implicit float casts are accidentally supported, `@floatCast` is still
not vector-aware.
2020-10-19 20:05:09 +02:00
LemonBoy
2a256d5ea0
stage1: Fix type-checking of unary neg for vector types
...
Validate the vector element type as done for the scalar case.
Fixes #6708
2020-10-17 21:08:39 -04:00
Andrew Kelley
9052e0b137
Merge pull request #6713 from jprudil/close-6697
...
Make std.meta.Int accept a signedness parameter
2020-10-17 18:55:25 -04:00
Andrew Kelley
0011def2b2
fix compilation error when building with io_mode evented
...
The merge of #5613 introduced a regression when building with io_mode
evented, fixed in this commit.
closes #6715
2020-10-17 15:46:36 -07:00
Jan Prudil
132813849c
Convert remaining call sites
2020-10-17 14:50:26 +02:00
Andrew Kelley
245d98d32d
Merge pull request #6291 from pixelherodev/cbe_arithmetic
...
CBE: addition and subtraction
2020-10-17 01:00:38 -04:00
vegecode
2545f44db0
byteOffsetOf add fields to non-packet struct to maintain symmetry
2020-10-16 20:04:42 -07:00
vegecode
0456b2145d
byteOffsetOf rounds up using bit offset in host integer
2020-10-16 20:04:42 -07:00
Isaac Freund
0e4c3934a0
zig fmt: write modified files to stdout not stderr
2020-10-16 20:23:18 -04:00
LemonBoy
2a62d4b20b
stage1: Expand undefined struct/arrays when indexed
...
Fixes #6693
2020-10-16 17:13:38 +03:00
Andrew Kelley
d87bd3d8af
fixups regarding windows wide strings
...
* remove GetModuleHandleA from kernel32.zig. use of A functions
considered harmful.
* make it a compile error to expose WinMain instead of wWinMain. same
thing.
* start code declares wWinMainCRTStartup instead of WinMainCRTStartup
when it has the choice.
2020-10-15 19:37:55 -07:00
Andrew Kelley
c7c38e7279
Merge branch '5002-fix-entrypoint-with-winmain' of https://github.com/AnthonyYoManz/zig into AnthonyYoManz-5002-fix-entrypoint-with-winmain
2020-10-15 18:22:12 -07:00
Andrew Kelley
d91e75f5ca
getExternalExecutor fixups regarding dynamic linker
...
* std.Target.standardDynamicLinkerPath: macOS has a dynamic linker
* no need to override the default dynamic linker in the macos
CrossTarget initialization in the tests
* in getExternalExecutor, when validating the dynamic linker path, take
into account the standard dynamic linker path.
2020-10-15 16:44:16 -07:00
Jakub Konka
0e1afee732
Enable stage2 end-to-end tests on macOS run natively
...
This commit enables stage2 end-to-end tests to run natively on macOS
(where and when applicable). Since QEMU on macOS doesn't support
the same type of architecture emulation as it does on linux (i.e.,
there is no `qemu-x86_64` for instance), this commit ensures that we
specify a path to dynamic linker on macOS (`/usr/lib/dyld`) which
is then checked for existence in `std.CrossTarget.getExternalExecutor()`
function, and if exists, we can run the test natively.
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-10-15 15:59:16 -07:00
LemonBoy
ab585c680b
stage1: Off-by-one error in int to float conversion
...
The base is 2^64 and not 2^64-1.
Closes #6683
2020-10-15 21:25:59 +03:00
Jakub Konka
68b31c59a6
Merge pull request #6650 from kubkon/macho-incremental
...
stage2: enable incremental MachO linking
2020-10-14 08:20:33 +02:00
LemonBoy
0570df69b1
stage1: Fix missing runtime safety check for intToPtr
...
Elide the alignment check if the pointer alignment is one, the null
check must be preserved as it depends on the pointer type.
Fixes #6667
2020-10-14 00:05:50 -04:00
Jakub Konka
951721343f
Reuse text blocks; enable all incremental tests
2020-10-13 08:38:17 +02:00
Jakub Konka
cf2aea7b41
Enable incremental testcase for macOS
2020-10-13 08:38:17 +02:00
Vignesh Rajagopalan
2ab0c7391a
Rename .macosx to .macos
2020-10-12 18:56:25 -04:00
Tadeo Kondrak
0e57f220fb
stage1: Disallow arrays in function parameters or return types
...
Closes #6535 .
2020-10-08 04:17:32 -04:00
Andrew Kelley
95a37373e9
Merge pull request #6421 from tadeokondrak/opaque-syntax
...
Add opaque syntax that allows declarations
2020-10-07 16:58:50 -04:00
pfg
ae161863db
stage1: improve error messages for missing try statements
2020-10-07 03:50:11 -04:00
Noam Preil
de093879cc
Fix peer type resolution
2020-10-07 02:31:47 -04:00
Tadeo Kondrak
bf4bfe54ac
Update compile error test for field access of opaque type
2020-10-06 22:08:30 -06:00
Tadeo Kondrak
d71f339395
stage1: disallow fields in opaque types
2020-10-06 22:08:27 -06:00
Tadeo Kondrak
2b4b03d301
Update zig files for opaque type syntax
2020-10-06 22:08:25 -06:00
Tadeo Kondrak
069fbb3c01
Add opaque type syntax
2020-10-06 22:08:24 -06:00
Noam Preil
ea7b2750c8
CBE: addition and subtraction
2020-10-06 15:09:57 -04:00
Vexu
58502b8bfe
translate-c: respect C operator precedence in macros
2020-10-05 22:26:11 -04:00
LemonBoy
22b5e47839
stage1: Implement @reduce builtin for vector types
...
The builtin folds a Vector(N,T) into a scalar T using a specified
operator.
Closes #2698
2020-10-05 04:51:45 -04:00
Andrew Kelley
da596b7e4f
Merge pull request #6255 from joachimschmidt557/stage2-arm
...
stage2 ARM: more instructions, return values, parameters
2020-10-04 19:49:18 -04:00
Andrew Kelley
6aa668e020
Merge pull request #6476 from kubkon/macho-exe
...
Link basic MachO executables with stage2
2020-10-04 19:05:45 -04:00
Andrew Kelley
302a69f127
Merge pull request #6295 from Vexu/stage2
...
Stage2: basic imports
2020-10-04 18:00:21 -04:00
Jakub Konka
f8dd48bcd2
Fix after rebase and enable stage2 tests for macOS
...
Also, rewrites codegen section to store symbol address in a register
to then later invoke `callq` on the register.
2020-10-04 15:31:47 +02:00
joachimschmidt557
fb58fb2d8d
stage2 ARM: add testcases for non-leaf fns, parameters, return values
2020-10-03 12:52:04 +02:00
Alexandros Naskos
e31cc80130
Merge pull request #6427 from tadeokondrak/enums-explicit-tag-type-extern-allowed
...
Allow enums with explicit extern-allowed tag types in extern types
2020-10-03 12:51:39 +03:00
Tadeo Kondrak
65016dff32
Add test for implicit extern-allowed enum tag type in extern struct
2020-10-01 18:10:20 -06:00
Tadeo Kondrak
cae49b1b9d
Add tests for enums with explicit extern-allowed tag types in extern types
2020-10-01 18:09:47 -06:00
Tadeo Kondrak
96a151d4b8
Skip @Type/@typeInfo Fn/BoundFn tests on wasm32/wasm64
2020-10-01 18:01:40 -06:00
Tadeo Kondrak
e18fdc12b0
stage1: Implement @Type for Fn and BoundFn
2020-10-01 18:01:38 -06:00
Tadeo Kondrak
97ab720d84
stage1: Add alignment to TypeInfo.Fn
2020-10-01 17:59:42 -06:00
Tadeo Kondrak
e187ac09cb
Update compile error tests for alignment in StructField/UnionField
2020-10-01 15:06:21 -06:00
Tadeo Kondrak
70c507911a
Update @Type tests for alignment field in UnionField and StructFIeld
2020-10-01 15:01:27 -06:00
Tadeo Kondrak
c2ee66108c
Add tests for alignment field in UnionField and StructFIeld
2020-10-01 15:01:26 -06:00
Vexu
d819da4350
stage2: support multiple files in tests
2020-09-30 17:00:57 +03:00
Tadeo Kondrak
e903b00eec
stage1: Fix @Type(.Enum) with invalid tag_type
...
Fixes https://github.com/ziglang/zig/issues/6459
2020-09-30 07:02:38 -06:00
Andrew Kelley
14d6d07af2
fix the cli test expected string to support native path separators
2020-09-30 01:31:08 -04:00
Andrew Kelley
b811a99af9
Merge remote-tracking branch 'origin/master' into stage2-zig-cc
2020-09-29 14:53:48 -07:00
LemonBoy
cbbcf60968
stage1: Allow comparison with comptime-known vectors
...
Since comptime_{int,float} vectors are not allowed (thanks $DEITY) we
can use the element type infos to determine the minimum operand size.
2020-09-28 17:16:57 +02:00