Travis
960b5b518f
updated zig tokenizer to handle .*** and added tests
2020-10-29 12:03:45 -05:00
LemonBoy
b3314a8be6
stage1: Fix small bug in pointer type analysis
...
A flag meant to catch recursively-defined types was never reset, leading
the compiler to generate wrong answers when asked for its
type/alignment.
Closes #6850
2020-10-29 15:41:45 +02:00
LemonBoy
7bc9531698
stage1: Correctly generated optional constant values
...
Closes #6799
2020-10-28 21:56:28 +02:00
LemonBoy
6d2f103bfb
stage1: Fix crash in comptime struct value copy
...
Comptime fields are never materialized in the ZigValue so pay attention
when iterating over the fields array.
Fixes #6800
2020-10-28 21:13:32 +02:00
frmdstryr
1ce0994897
Fix @import of empty file
2020-10-26 13:29:32 -07:00
Andrew Kelley
e83334274f
add regression test for already fixed bug
...
closes #6781
2020-10-26 13:18:44 -07:00
Andrew Kelley
392e6da8a3
update stack trace test case
2020-10-22 21:57:30 -07:00
Andrew Kelley
e02655798f
Merge pull request #6743 from LemonBoy/someppc64stuff
...
Some ppc64 stuff
2020-10-22 17:39:26 -04:00
Andrew Kelley
e6ac082437
Merge pull request #6744 from LemonBoy/intcast-vec
...
stage1: Implement `@intCast` between vectors
2020-10-22 17:36:18 -04:00
LemonBoy
44f8e6a534
stage1: Fix edge case in Union ZigValue generation
...
Unions that passed the one_possible_value check were incorrectly
generated, none of their internal fields were initialized.
Fixes #6758
2020-10-21 22:42:03 -04:00
LemonBoy
39e34081ca
Update the stack-traces tests
2020-10-19 20:09:43 +02:00
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