6889 Commits

Author SHA1 Message Date
LemonBoy
0107b19124 Resolve lazy values when checking for definedness
Fixes #3154
2019-09-05 13:09:43 -04:00
Jonathan Marler
9a358d2d33 Add Array support to @Type 2019-09-05 13:08:45 -04:00
Vesa Kaihlavirta
847a262efd Shorten @field documentation and add an example 2019-09-05 13:07:04 -04:00
Michael Dusan
fe153ad2a4 stage1 enhance IR print
- print fn name in pass1
- replace scalar with enum IrPass for clarity
2019-09-05 13:06:10 -04:00
LemonBoy
fabf45f5fc Add the noinline keyword for function declarations 2019-09-05 13:04:58 -04:00
Andrew Kelley
a7fd14096c
fix typo with tls initialization
I tested that hello world cross compiles to armv7 now.

closes #3167
2019-09-04 14:44:16 -04:00
Andrew Kelley
090f2ffb82
Merge pull request #3152 from Snektron/arm-support-improvement
Arm support improvement (part 1)
2019-09-04 14:39:36 -04:00
Timon Kruiper
e540e5b8ec
Implicit cast from enum literal to optional enum and implicit cast to payload of error union 2019-09-04 12:30:23 -04:00
Robin Voetter
df06976e73 Only check for TLS support on arm if TLS segment exists 2019-09-04 17:48:01 +02:00
Andrew Kelley
53a6aea216
Merge branch 'marler8997-typeBuiltin' 2019-09-04 11:12:24 -04:00
Andrew Kelley
ac7703f65f
fixups and add documentation for @Type 2019-09-04 11:12:14 -04:00
Robin Voetter
77d04c03e3 Implement remaining requested changes
- Replace @intCast with a checked version (std/debug.zig)
- Replace @intCast with i64() when casting from a smaller type (std/fs/file.zig)
- Replace `nakedcc` with appropriate calling convention for linking with c (std/os/linux/arm-eabi.zig)
- Only check if hwcap contains TLS when the hwcap field actually exists (std/os/linux/tls.zig)
2019-09-04 16:23:25 +02:00
Robin Voetter
6a76298740 Add missing clobbers on arm-eabi and arm64 syscall conventions 2019-09-04 15:59:51 +02:00
Robin Voetter
5308eb7045 Merge remote-tracking branch 'upstream/master' into arm-support-improvement 2019-09-04 15:55:54 +02:00
Jonathan Marler
b728cb6d4e Add @Type builtin 2019-09-03 22:50:29 -06:00
Andrew Kelley
77a5f888be
emit a compile error if a test becomes async
See #3117
2019-09-03 22:09:47 -04:00
Andrew Kelley
6b27290c68
Merge branch 'Vexu-comment-in-array' 2019-09-03 21:51:23 -04:00
Andrew Kelley
8a7e2e3479
Merge branch 'comment-in-array' of https://github.com/Vexu/zig into Vexu-comment-in-array 2019-09-03 21:49:35 -04:00
Sahnvour
ce14c543d1 error message and test for alignment of variables of zero-bit types 2019-09-03 21:14:40 -04:00
Andrew Kelley
a4ce10df80
Merge pull request #3169 from Sahnvour/string_hash_map
Using StringHashMap everywhere it's needed
2019-09-03 20:30:26 -04:00
Andrew Kelley
42cc4a406b
Merge branch 'marler8997-fixSegfault' 2019-09-03 18:26:10 -04:00
Andrew Kelley
1862075652
fix union field ptr ir instruction 2019-09-03 18:25:00 -04:00
Andrew Kelley
a81e4351a2
Merge branch 'fixSegfault' of https://github.com/marler8997/zig into marler8997-fixSegfault 2019-09-03 18:15:01 -04:00
Sahnvour
9d6f236728 add fastpath for std.mem.eql and simplify std.hash_map.eqlString
this should also be friendlier to the optimizer
2019-09-03 23:56:04 +02:00
Sahnvour
f08c6e4fe6 changing occurrences of HashMap with []const u8 as keys for StringHashMap 2019-09-03 23:53:05 +02:00
Andrew Kelley
fc0f8d0359
zig build: make install prefix available to build.zig and
prevent accident of '/' showing up in application/library names
2019-09-03 16:19:10 -04:00
Andrew Kelley
be17a4b6c1
fix compiler crash in struct field pointers
when the llvm type has not been fully analyzed. This is a regression
from lazy values.
2019-09-03 14:51:34 -04:00
Andrew Kelley
e673d865fb
fix stack traces on macos when passing absolute path to root source file
The comment added by this commit is copied here:

For macOS stack traces, we want to avoid having to parse the compilation unit debug
info. As long as each debug info file has a path independent of the compilation unit
directory (DW_AT_comp_dir), then we never have to look at the compilation unit debug
info. If we provide an absolute path to LLVM here for the compilation unit debug info,
LLVM will emit DWARF info that depends on DW_AT_comp_dir. To avoid this, we pass "."
for the compilation unit directory. This forces each debug file to have a directory
rather than be relative to DW_AT_comp_dir. According to DWARF 5, debug files will
no longer reference DW_AT_comp_dir, for the purpose of being able to support the
common practice of stripping all but the line number sections from an executable.

closes #2700
2019-09-03 13:46:08 -04:00
Vesa Kaihlavirta
e9530ce97b Fix addition direction, remove superfluous loop counter, add tests 2019-09-03 13:45:02 -04:00
Andrew Kelley
bdac2ba9dd
Merge branch 'mikdusan-issue.2485'
closes #2544
2019-09-03 10:09:26 -04:00
Andrew Kelley
aba67ecf44
rename test-compare-panic to test-stack-traces 2019-09-03 10:08:39 -04:00
Andrew Kelley
1fd24791a7
rename compare-panic to compare-stack-traces 2019-09-03 10:05:19 -04:00
Michael Dusan
a19e73d8ae
test: add compare-panic
`zig build test-compare-panic`

Create basic tests to compare panic output. The address field
is replaced by a symbolic constant and each expected output is
specific to os. Tests will only run for explicitly defined
platforms.

see also #2485
2019-09-03 09:59:43 -04:00
Andrew Kelley
d74b8567cf
omit prefix data for async functions sometimes
When `@frameSize` is never called, and `@asyncCall` on a runtime-known
pointer is never used, no prefix data for async functions is needed.

Related: #3160
2019-09-02 21:31:26 -04:00
Michael Dusan
00d82e34df cmake: improve building without git repository
- quiet `fatal: not a git repository` message
- if git probe fails skip ZIG_VERSION modification
2019-09-02 21:36:16 -04:00
Andrew Kelley
058050f22c
Merge remote-tracking branch 'origin/master' into llvm9 2019-09-02 20:56:31 -04:00
Andrew Kelley
4a5b0cde13
fix const result loc, runtime if cond, else unreachable
Closes #2791. See that issue for more details; I documented the
debugging process quite thoroughly on this one.
2019-09-02 20:28:25 -04:00
Nick Erdmann
5e874a89b9
std/os/uefi: fix ordering of packed bit fields 2019-09-02 22:31:59 +02:00
Nick Erdmann
8db41b7adb
std/os/uefi: add support for getting memory map 2019-09-02 22:10:50 +02:00
Andrew Kelley
ab4cba14c8
fix recursive call of await @asyncCall with struct return type 2019-09-02 14:35:41 -04:00
Nick Erdmann
03abc6edf4
std/os/uefi: add global_variable guid 2019-09-02 20:34:00 +02:00
Andrew Kelley
d291d3c8c0
fix using @typeOf on a generic function call 2019-09-02 13:07:44 -04:00
Andrew Kelley
0fe28855c5
add ability to specify darwin framework search dirs 2019-09-02 11:48:06 -04:00
Andrew Kelley
0c4d47c6d5
add regression test for already fixed bug
closes #2692
2019-09-01 23:35:58 -04:00
Robin Voetter
d62f7c6b60 Merge remote-tracking branch 'upstream/master' into arm-support-improvement 2019-09-01 23:45:51 +02:00
Robin Voetter
e7912dee9b Fix up preadv, preadv2, pwritev and pwritev2 2019-09-01 16:10:36 +02:00
Robin Voetter
e9d795b025 Fix up seteuid and setegid 2019-09-01 12:08:02 +02:00
Robin Voetter
e39c93a2f3 Replace legacy 16-bit syscalls with 32-bit versions when appropriate 2019-09-01 11:54:57 +02:00
Andrew Kelley
8b1900e5df
Revert "Merge pull request #2991 from emekoi/mingw-ci"
This reverts commit ec7d7a5b14540ea3b2bab9f11318630338467965, reversing
changes made to 81c441f8855d4c58f0b2ff86d3d007cf0bf395d3.

It looks like this broke colors in Windows Command Prompt (#3147)
and this method of detecting native C ABI isn't working well (#3121).
2019-09-01 00:33:02 -04:00
Andrew Kelley
ec6f15b0f5
fix @typeOf an async function call of generic fn with error union type 2019-09-01 00:27:22 -04:00