20168 Commits

Author SHA1 Message Date
Josh Wolfe
4c2cdf6f4d parsec supports more compound assign operators 2017-11-13 21:37:30 -07:00
Josh Wolfe
c1fde0e8c4 parsec supports bitshift operators 2017-11-13 20:49:53 -07:00
Andrew Kelley
6356724057 Merge branch 'dimenus-parsec' 2017-11-13 22:33:58 -05:00
Andrew Kelley
03732860be add test case for previous commit 2017-11-13 22:33:41 -05:00
Andrew Kelley
df07361642 Merge branch 'parsec' of https://github.com/dimenus/zig into dimenus-parsec 2017-11-13 22:26:31 -05:00
Josh Wolfe
57cd074959 parsec supports C comma operator 2017-11-13 19:59:32 -07:00
Josh Wolfe
1f28fcdec5 parsec supports C NULL to pointer implicit cast 2017-11-13 19:39:46 -07:00
dimenus
b3b4786c24 Fixed duplicate decl detection for typedefs/enums 2017-11-13 20:10:36 -06:00
dimenus
98e3c7911c Fixed duplicate decl detection for typedefs/enums 2017-11-13 16:37:46 -06:00
Andrew Kelley
a890380b6a fix windows trying to run linux-only tests 2017-11-10 18:29:49 -05:00
Andrew Kelley
ca87f55a7b Merge branch 'bscheinman-linux_timer' 2017-11-10 18:25:32 -05:00
Andrew Kelley
5ae53dacfb rename test 2017-11-10 18:24:52 -05:00
Andrew Kelley
5895204c99 Merge branch 'linux_timer' of https://github.com/bscheinman/zig into bscheinman-linux_timer 2017-11-10 18:18:03 -05:00
Brendon Scheinman
87407b54b6 add epoll and timerfd support on linux 2017-11-10 15:12:46 -08:00
Andrew Kelley
1403748fd8 disable broken 32 bit windows test
See #537
2017-11-10 17:08:11 -05:00
Andrew Kelley
df89291d1c Merge remote-tracking branch 'origin/master' into llvm6 2017-11-10 16:45:01 -05:00
Andrew Kelley
019f18058b fix test failures
put all the codegen for fn prototypes to the same place
2017-11-10 16:32:37 -05:00
Andrew Kelley
403a46abcc fix test failure on 32 bit windows 2017-11-10 16:03:14 -05:00
Andrew Kelley
6bf1547148 Merge branch 'darwin-stat'
closes #606
2017-11-10 15:01:09 -05:00
Andrew Kelley
029d37d6a7 fix bug when multiple function definitions exist
This might be related to #529
2017-11-10 14:58:50 -05:00
Andrew Kelley
20c2dbdbd3 add windows implementation of io.File.getEndPos 2017-11-10 14:36:03 -05:00
Andrew Kelley
1ac46fac15 add a std lib test for reading and writing files
* fix fstat wrong on darwin
 * move std.debug.global_allocator to std.debug.global_allocator_state and make it private
 * add std.debug.global_allocator as a pointer (to upgrade your zig code remove
   the '&')
2017-11-10 14:17:23 -05:00
dimenus
e9d7623e1f Merge remote-tracking branch 'origin/master' into llvm6 2017-11-10 09:49:45 -06:00
Jeff Fowler
336d81894d Fix Stat include in darwin land (#605) 2017-11-09 13:46:53 -05:00
Jeff Fowler
52521d5f67 fix typo on darwin lseek (#602) 2017-11-09 11:35:35 -05:00
Andrew Kelley
7ea669e04c fix parameter of extern var args not type checked
closes #601
2017-11-09 11:30:39 -05:00
Andrew Kelley
4f8c26d2c6 fix enum sizes too large
closes #598
2017-11-08 21:44:10 -05:00
Andrew Kelley
53b18c8542 fix travis linux script 2017-11-07 09:06:29 -05:00
Andrew Kelley
4543413491 std.io: introduce buffered I/O and change API
I started working on #465 and made some corresponding std.io
API changes.

New structs:
 * std.io.FileInStream
 * std.io.FileOutStream
 * std.io.BufferedOutStream
 * std.io.BufferedInStream

Removed:
 * std.io.File.in_stream
 * std.io.File.out_stream

Now instead of &file.out_stream or &file.in_stream to get access to
the stream API for a file, you get it like this:

var file_in_stream = io.FileInStream.init(&file);
const in_stream = &file_in_stream.stream;

var file_out_stream = io.FileOutStream.init(&file);
const out_stream = &file_out_stream.stream;

This is evidence that we might not need any OOP features -
See #130.
2017-11-07 03:22:27 -05:00
Andrew Kelley
3a600297ca Merge remote-tracking branch 'origin/master' into llvm6 2017-11-06 22:41:12 -05:00
Andrew Kelley
634e8713c3 add @memberType and @memberName builtin functions
see #383

there is a plan to unify most of the reflection into 2
builtin functions, as outlined in the above issue,
but this gives us needed features for now, and we can
iterate on the design in future commits
2017-11-06 22:07:19 -05:00
scurest
f0dafd3f20 fix typos in std.io (#589)
Fixes a bug that prevented InStream.realAllAlloc from compiling.
2017-11-06 11:40:58 -05:00
Andrew Kelley
52a2992862
Merge pull request #587 from scurest/c_alloc_redeclaration_of_mem
Fix #585
2017-11-05 19:38:50 -05:00
scurest
48c8181886 fix redeclaration of mem (#585) 2017-11-05 15:46:54 -06:00
scurest
bd6f8d99c5 add test for c_allocator 2017-11-05 15:46:10 -06:00
Andrew Kelley
4cc9fe90a8 fix build on MacOS 2017-11-04 16:40:55 -04:00
Andrew Kelley
f0d755153d add compile-time reflection for function arg types
See #383
2017-11-04 16:20:02 -04:00
Andrew Kelley
4a6df04f75 slightly more verbose error message when building object file fails 2017-11-03 20:07:32 -04:00
Andrew Kelley
75afe73c66
Merge pull request #581 from Dimenus/line_endings
Add support for windows line endings with c macros within a c_import.
2017-11-03 18:40:38 -04:00
Andrew Kelley
d4c1ed95ac
Merge pull request #583 from Dimenus/libc_runtime
Win32 libc runtime fixes.
2017-11-03 18:32:03 -04:00
dimenus
1890760206 Windows libc & static libc are located in the same dir which is already covered by msvc_lib_dir 2017-11-03 17:09:35 -05:00
dimenus
1ef6cb1b64 Add support for windows line endings with c macros 2017-11-03 16:29:49 -05:00
Marc Tiehuis
795703a39c Add emit command-line option (#580)
Add emit command-line option
2017-11-03 09:09:33 -04:00
Andrew Kelley
a31b23c46b more compile-time type reflection
See #383
2017-11-03 00:00:57 -04:00
Andrew Kelley
dc8b011d61 fix incorrect debug info for empty structs
closes #579

now all tests pass for llvm master branch
2017-11-02 21:57:55 -04:00
Andrew Kelley
4a82c2d124 fix incorrect debug info for empty structs
now all tests pass for llvm master branch
2017-11-02 21:54:24 -04:00
Andrew Kelley
188fd47a51 add missing environment 2017-11-02 21:54:24 -04:00
Andrew Kelley
9a99bd3a71 use llvm named structs for const values when possible
normally we want to use llvm types for constants. but
union constants (which are found inside enums) when
they are initialized with the non-most-aligned-member
must be unnamed structs.

these bubble up to all aggregate types. if a constant of
an aggregate type contains, recursively, a union constant
with a non-most-aligned-member initialized, the aggregate
typed constant must be unnamed too.

this fixes all the asserts that were coming in from
llvm master branch.
2017-11-02 21:54:24 -04:00
Andrew Kelley
94ec2190f8 update to llvm master 2017-11-02 21:54:24 -04:00
Andrew Kelley
abff1b6884 windows: use the same libc search within a compilation unit 2017-11-01 23:08:34 -04:00