7024 Commits

Author SHA1 Message Date
Merlyn Morgan-Graham
89ef635b35 Add boolean and, boolean or binary ops in translate-c-2 2019-12-16 01:34:05 -08:00
Merlyn Morgan-Graham
acff2d407b Add bit shift binary ops in translate-c-2 2019-12-16 01:34:04 -08:00
Merlyn Morgan-Graham
c8c89648b0 Add comparison and bitwise binary ops in translate-c-2 2019-12-16 01:34:04 -08:00
Andrew Kelley
2c7a2aefbf
Revert "Use eventfd in ChildProcess on Linux"
This reverts commit b169f7b0d51fa9e7cf570479079369b9736093ff.

This caused `integer cast truncated bits` at
std/child_process.zig:801:12

Can be reproduced on my machine simply by running `make`.
2019-12-16 01:39:41 -05:00
Vexu
0f38410ea6
improve extern enum 2019-12-15 19:28:53 -05:00
LemonBoy
59de23dfa0 Don't assume TLS storage has a fixed address
Fixes #3433
2019-12-15 16:23:42 -05:00
LemonBoy
b169f7b0d5 Use eventfd in ChildProcess on Linux
Closes #819
2019-12-15 14:43:37 -05:00
LemonBoy
f1407b4b7e Generate the fn pointers into the correct address space
Fixes #3645
2019-12-15 14:42:53 -05:00
LemonBoy
19ddbd9e9e Make sure the address is aligned for intToPtr ops
Closes #773
2019-12-15 14:41:05 -05:00
Andrew Kelley
cf0d300dde
Merge pull request #3908 from Vexu/translate-c-2
Translate-c-2 enums
2019-12-14 21:13:42 -05:00
Vexu
e57e3602e7
translate-c-2 implement enums 2019-12-14 23:24:47 +02:00
Vexu
1a967db083
add default initializers to all ast.Node base values 2019-12-14 20:40:56 +02:00
Andrew Kelley
33d9dda558
Merge pull request #3906 from Vexu/translate-c-2
Translate-c-2 structs and unions
2019-12-14 13:12:39 -05:00
Vexu
1f84586836
translate-c-2 avoid collisions with zig keywords 2019-12-14 17:00:10 +02:00
Vexu
4dae70e702
translate-c-2 container aliases 2019-12-14 13:40:33 +02:00
Vexu
a4ac6d15c4
translate-c-2 array initializer expr 2019-12-14 10:49:25 +02:00
Vexu
e4ca1f441b
translate-c-2 record type 2019-12-14 02:00:01 +02:00
Andrew Kelley
21a85d4fb6
Merge pull request #3896 from Vexu/translate-c-2
Translate-c self-hosted var decl and remove translate mode
2019-12-13 15:48:10 -05:00
Vexu
45abfa9e71
revert removal of translate mode in stage 1 2019-12-13 19:06:32 +02:00
Vexu
41a67126a5
translate-c-2 typedef 2019-12-13 17:40:37 +02:00
Vexu
eb057ef41c
translate-c-2 dont eval init expr 2019-12-13 15:07:10 +02:00
Andrew Kelley
e54c49be9b
uncomment a now-passing behavior test 2019-12-12 19:45:33 -05:00
Andrew Kelley
1e4bae6692
update stack traces tests 2019-12-12 19:43:04 -05:00
Jonathan Marler
4cb4148b35 Document sentinel type in langref 2019-12-12 19:01:22 -05:00
Andrew Kelley
7699b5b997
Merge branch 'Xe-expose-callMain'
closes #3891
2019-12-12 18:56:39 -05:00
Andrew Kelley
fff3c1fff4
un-special-case startup code in the std lib
Previously, the compiler had special logic to determine whether to
include the startup code, which was in `std/special/start.zig`. Now,
the file is moved to `std/start.zig`, and there is no special logic
in the compiler. Instead, the standard library unconditionally imports
the `start.zig` file, which then has a `comptime` block that does the
logic of determining what, if any, start symbols to export. Instead of
`start.zig` being in its own special package, it is just another normal
file that is part of the standard library.

`std.builtin.TestFn` is now part of the standard library rather than
specially generated by the compiler.
2019-12-12 18:33:44 -05:00
Christine Dodrill
b37acc4d68
allow custom OS entrypoint
Also:

 * Expose `std.start.callMain`.
 * Other fixes added to fix issues found in development.
2019-12-12 16:00:23 -05:00
Andrew Kelley
81f1f72197
ci: skip non native tests for aarch64
We've been hitting timeouts on this service. Once zig build gains
parallel processing support, we can probably enable more tests.
2019-12-12 15:11:59 -05:00
Vexu
0795f17db2
translate-c-2 incompleteArray 2019-12-12 21:39:04 +02:00
Vexu
48ac84db1b
translate-c-2 translate apvalue 2019-12-12 20:35:40 +02:00
Vexu
c759a77aa0 fix dot init parsing 2019-12-12 13:06:48 -05:00
Vexu
3bca025091
update tests 2019-12-12 18:18:43 +02:00
Vexu
ef361161e2
translate-c-2 add var decl 2019-12-12 16:12:19 +02:00
Vexu
69dee57d95
remove concept of translate mode 2019-12-12 14:26:24 +02:00
Andrew Kelley
d08dc21116
Merge pull request #3886 from kavika13/master
Add function params, parens handling, and some infix operators to self-hosted translate-c
2019-12-11 18:40:35 -05:00
Christine Dodrill
b375f6e027 lib/std/io: let the bring-your-own OS package handle stdio (#3887) 2019-12-11 18:37:52 -05:00
Merlyn Morgan-Graham
12171dba92 Add function parameters to self-hosted translate-C 2019-12-10 23:52:40 -08:00
Merlyn Morgan-Graham
5e8186a8ce Fix access of undefined field when calling ast.Tree.dump 2019-12-10 23:52:40 -08:00
Merlyn Morgan-Graham
fe415dae04 Add paren expression statements to self-hosted translate-C 2019-12-10 23:52:40 -08:00
Merlyn Morgan-Graham
3e4f5de33c Add rem binary operator to self-hosted translate-C 2019-12-10 23:52:40 -08:00
Merlyn Morgan-Graham
79fe7e6515 Add mul and div binary operators to self-hosted translate-C 2019-12-10 23:52:40 -08:00
Andrew Kelley
7c1dbfab72
self-hosted: manually parse args 2019-12-11 02:08:33 -05:00
Andrew Kelley
c3d8b1ffeb
remove iterator API from std.ArrayList
This is not a meaningful abstraction. Use a for loop on the result
of `toSlice` or `toSliceConst`.

An iterator can be implemented on top of ArrayList by applications which
want additional functionality, such as removing elements while
iterating.

Closes #3037.
2019-12-10 15:08:10 -05:00
frmdstryr
f30af12bea Add hotpath for BufferedOutStream (#3858)
* Add hotpath for BufferedOutStream
2019-12-10 13:44:59 -05:00
Heppokoyuki
5ada11449a fix con_in difinition and add EFI_SIMPLE_TEXT_INPUT_PROTOCOL difinition 2019-12-10 13:25:28 -05:00
Andrew Kelley
0d99744acc
Merge branch 'emekoi-dynlib-load'
closes #2598
2019-12-10 13:24:01 -05:00
Andrew Kelley
fdc3132126 fix windows dynamic lib loading test 2019-12-10 13:21:37 -05:00
Andrew Kelley
3ef8460d06 fix load dynamic library API when linking libc 2019-12-10 12:56:05 -05:00
Andrew Kelley
80882bda59
load dynamic library test: update API usage code 2019-12-10 12:48:10 -05:00
Andrew Kelley
fd6b7b160d
improve dynamic library API 2019-12-10 12:28:28 -05:00