Andrew Kelley
8e109aec6b
Merge pull request #2620 from LemonBoy/debug-stuff
...
Small changes to debug info emitter
2019-06-04 11:58:09 -04:00
LemonBoy
80cd142c96
Propagate DIFlags to LLVM
2019-06-04 09:05:33 +02:00
LemonBoy
ebe921e48f
Make void a signed type
...
Follow the convention set by C so that lldb stops complaining about it.
2019-06-04 09:05:12 +02:00
tgschultz
3eca5a42e6
fixed Deserializer.alignToByte() and added test coverage
2019-06-01 20:34:10 -04:00
Shritesh Bhattarai
6d73e5de05
doc: recommend optional pointers for nullptrs instead of allowzero
2019-05-31 02:26:19 -04:00
Andrew Kelley
0ccd91faea
Merge pull request #2593 from LemonBoy/aarch64-stuff
...
Fix some syscalls on arm64
2019-05-30 15:48:22 -04:00
Andrew Kelley
78f32259da
default struct field initialization expressions
...
closes #485
2019-05-30 15:46:11 -04:00
Andrew Kelley
7878f9660f
dep tokenizer: run zig fmt and move exports to canonical location
2019-05-30 12:07:55 -04:00
Andrew Kelley
5954d5235f
Merge pull request #2182 from mikdusan/issue.2046
...
new .d file parser for stage1 compiler
2019-05-30 11:53:08 -04:00
LemonBoy
51fc375b0d
Correct flag definitions for arm64
2019-05-30 17:05:39 +02:00
LemonBoy
477ee9c8b9
Fix some syscalls on arm64
2019-05-30 16:28:33 +02:00
Andrew Kelley
8ca294c430
update load dynamic library test for std lib changes
2019-05-30 00:04:11 -04:00
tgschultz
8eaf1387c7
Fix fmt.zig handling of slices of slices
...
Discovered while calling testing.expectError on an error union with payload [][]const u8. Even though the payload was not going to be printed, the current format handling caused a compile error anyway because it couldn't be casted to []const u8. The new handling treats a []u8 as a string but otherwise treats the slice as a pointer.
2019-05-29 20:46:08 -04:00
tgschultz
f9e7bd2682
std.meta/trait: def/definition => decl/declaration
...
TypeInfo: defs/Definition => decls/Declarations
2019-05-29 20:43:07 -04:00
Andrew Kelley
01a4897da5
improve the libc of wasm32-freestanding target
...
* introduce wasm32-freestanding-musl .h files to fix
conflicts with stddef.h and errno.h
* fix an issue with zig build system regarding installation of
webassembly libraries
* add implementations to zig's libc:
- strcmp
- strncmp
- strerror
- strlen
See #514
2019-05-29 20:32:27 -04:00
Shawn Landden
4188faeac5
stage1: AstNodes cannot be casted, but are rather accessed via a union.
...
Unlike IrInstruction[Foo]s, which all start with:
IrInstruction base;
AstNodes do not work like this, and instead use a pointer to their
specializations. The code assumed otherwise.
2019-05-29 20:21:07 -04:00
Timon Kruiper
4e1f3a9ba3
Correct formatting for multiline string in arrays
2019-05-29 19:56:28 -04:00
Andrew Kelley
7bfae39c5c
Merge branch 'NBonaparte-linuxdynlib'
2019-05-29 19:49:10 -04:00
NBonaparte
e716c9ba4b
build_examples: reenable load_dynamic_library
2019-05-29 19:48:36 -04:00
NBonaparte
dab1dc79a7
LinuxDynLib: remove MAP_LOCKED flag
2019-05-29 19:48:36 -04:00
Andrew Kelley
345501a72d
Merge pull request #2567 from emekoi/fix-dynlib
...
remove allocator from DynLib
2019-05-29 19:41:16 -04:00
Andrew Kelley
c66a747045
Merge pull request #2546 from LemonBoy/sigaltstack
...
Add sigaltstack syscall for Linux
2019-05-29 19:38:01 -04:00
Andrew Kelley
bfc86776d5
run zig fmt to update use to usingnamespace
2019-05-29 19:09:58 -04:00
Andrew Kelley
8a4ee5942b
zig fmt: fix 2 bugs of mangling source files
2019-05-29 19:09:58 -04:00
Andrew Kelley
b7a82288ad
change use to usingnamespace
...
See #2014
`use` syntax is still accepted for now. `zig fmt` automatically
updates code. After a release cycle the old syntax will be removed.
2019-05-29 19:09:58 -04:00
Andrew Kelley
9a7cf73b3b
main: set subsystem in zig builtin when explicitly provided
2019-05-29 18:18:18 -04:00
Andrew Kelley
6dbaae4c46
Merge branch 'emekoi-builtin-subsystem'
2019-05-29 17:14:34 -04:00
Andrew Kelley
3819654c39
codegen: initialize subsystem
2019-05-29 16:55:02 -04:00
Andrew Kelley
1ab0ac3ea2
cleanups for windows subsystem in builtin.zig
2019-05-29 16:55:02 -04:00
emekoi
b461e600e2
set subsystem to null if not on windows or uefi
2019-05-29 16:55:01 -04:00
emekoi
6bc5b07e3e
try to resolve TargetSubSystemAuto to actual subsystem
2019-05-29 16:55:01 -04:00
emekoi
fb5dc28921
added subsystem to builtin.zig
2019-05-29 16:54:59 -04:00
LemonBoy
b8d1060f0a
Add missing sigaltstack definition for darwin
2019-05-29 22:38:14 +02:00
LemonBoy
399e026cc0
Add sigaltstack wrapper in os.zig
2019-05-29 22:38:14 +02:00
Andrew Kelley
7017388e9e
Merge branch 'LemonBoy-use-struct-pt2'
2019-05-29 16:32:16 -04:00
Andrew Kelley
1ccbd1fb67
use works on unions and enums in addition to structs
2019-05-29 16:31:49 -04:00
Andrew Kelley
9891c4f30d
Merge branch 'use-struct-pt2' of https://github.com/LemonBoy/zig into LemonBoy-use-struct-pt2
2019-05-29 15:48:49 -04:00
Michael Dusan
2975bdc684
add review changes
...
- use std.heap.c_allocator
- use @panic instead of unreachable
- use extern enum for tokenizer result type
2019-05-29 14:39:13 -04:00
Andrew Kelley
f9ada1cfba
Merge pull request #2530 from gonzus/gonzus/improve-clang-zig
...
Add declarations missing from clang.zig
2019-05-29 10:47:23 -04:00
Andrew Kelley
b66438eb80
no "use of undeclared identifer" in dead comptime branches
2019-05-28 18:19:27 -04:00
LemonBoy
528c151a55
Reject undefined as type
...
Make analyze_type_expr behave like ir_resolve_type when the user tries
to use `undefined` as a type.
Closes #2436
2019-05-28 18:02:57 -04:00
LemonBoy
a169d844c7
Warn the user if run/test is paired with emit options
2019-05-28 17:50:28 -04:00
LemonBoy
048169cbea
Avoid a crash when there are no namespace components
...
Fixes #2500
2019-05-28 17:49:37 -04:00
Andrew Kelley
9d16839420
fix invalid LLVM IR generated for ?*void const casts
...
closes #2578
2019-05-28 16:11:36 -04:00
Andrew Kelley
508fdfea72
link to contributing in readme
2019-05-28 14:53:01 -04:00
Andrew Kelley
a37ea5acf3
extract CONTRIBUTING.md from README.md
2019-05-28 14:50:02 -04:00
Andrew Kelley
8a65478801
Create FUNDING.yml
2019-05-28 14:36:03 -04:00
LemonBoy
e2c2263434
Move __zig_fail_unwrap locals on stack
2019-05-28 13:02:45 -04:00
Andrew Kelley
568dc56232
Merge branch 'LemonBoy-guard-pages-in-threads'
2019-05-28 12:47:10 -04:00
Andrew Kelley
c518b7b8bf
thread.spawn: bubble up mprotect error.OutOfMemory
2019-05-28 12:46:44 -04:00