Commit Graph

5151 Commits

Author SHA1 Message Date
emekoi
0aabfb09f9 removed duplicate definitions 2019-06-05 14:57:20 -05:00
emekoi
b74bcc9d76 windows.unexpectedError prints a human friendly string 2019-06-05 14:42:36 -05:00
mrkishi
fdddd13106 add cache-control headers to tarballs on ci 2019-06-04 23:25:24 -04:00
Andrew Kelley
ca989a95d3
Merge pull request #2617 from squeek502/ceil-power-of-two
std.math: Add ceilPowerOfTwo and ceilPowerOfTwoPromote
2019-06-04 23:24:34 -04:00
Ryan Liptak
a0d66fa1e6 std.math: Clarify ceilPowerOfTwo inputs and disallow zero as an input 2019-06-04 15:49:27 -07:00
Nick Erdmann
d83b15febf src/ast_render.cpp: fix rendering of character literals <= 0x0f 2019-06-04 13:00:41 -04:00
LemonBoy
291aaee977 Stop the musl builder from skipping necessary files
The code assumed that the architecture-specific bits, found in the arch/
subfolder, were only overrides for the generic .c files.

Changed the logic to always include the whole architecture-specific
implementations and discard the generic ones, this way we won't exclude
files with no .c counterpart.
2019-06-04 12:45:02 -04:00
Timon Kruiper
fd771ea9fb Added LineComment support when MultiLines are used in ArrayInit
also added the corresponding testcase
2019-06-04 12:44:50 -04:00
Andrew Kelley
7eb82b8651
std.os.mmap: update doc comments for previous commits 2019-06-04 12:31:20 -04:00
Andrew Kelley
a608ebaa50
Merge pull request #2581 from LemonBoy/misc-stuff
Miscellaneous stdlib changes
2019-06-04 12:30:38 -04:00
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
Ryan Liptak
9bed6e1bf9 std.math: Add ceilPowerOfTwo and ceilPowerOfTwoPromote
Closes #2426
2019-06-02 22:09:22 -07:00
tgschultz
3eca5a42e6 fixed Deserializer.alignToByte() and added test coverage 2019-06-01 20:34:10 -04:00
LemonBoy
46cbed621b Move dl_iterate_phdr to os.zig 2019-05-31 11:59:53 +02:00
LemonBoy
4b30e40a91 Remove length restriction in mmap wrapper 2019-05-31 11:48:42 +02: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