Commit Graph

264 Commits

Author SHA1 Message Date
hryx
c423697c78 Merge branch 'master' into translate-c-userland 2019-06-23 12:31:22 -07:00
hryx
1c86a191da Fix order of tokens; omit 'pub' for fn types 2019-06-23 01:03:28 -07:00
hryx
4c8b460fec Fix recursive self-referential block 2019-06-22 22:30:15 -07:00
hryx
4ae95d7ffc Translate assignment BinaryOperator statements 2019-06-22 17:29:36 -07:00
hryx
6325ffc3f1 Assign undefined literal (instead of null) when no init value 2019-06-22 17:29:10 -07:00
Sahnvour
987c209b40 heap: make one global instance of DirectAllocator
it is now stateless, so the de/init are not necessary anymore
2019-06-22 14:10:53 -04:00
hryx
0f545e5a2b transReturnStmt 2019-06-10 23:06:54 -07:00
hryx
84e479d94f (broken) local var decls, integer literals (part) 2019-06-09 23:35:48 -07:00
daurnimator
ed41d10a06 std: existing LinkedList is actually a TailQueue 2019-06-10 15:41:40 +10:00
Andrew Kelley
b735764898 different array literal syntax when inferring the size
old syntax:  []i32{1, 2, 3}
new syntax: [_]i32{1, 2, 3}

closes #1797
2019-06-09 19:26:32 -04:00
hryx
586c36dd1d Restore fn decls removed during conflict 2019-06-08 17:02:00 -07:00
hryx
ad0f0562d8 Merge branch 'master' into translate-c-userland 2019-06-08 16:23:27 -07:00
hryx
ed5b8335b5 (broken) translate Paren type 2019-06-08 16:09:25 -07:00
hryx
1692a76d28 transImplictCastExpr: LValueToRValue 2019-06-08 15:57:43 -07:00
hryx
1f82c7ba22 transCStyleCastExpr 2019-06-08 15:54:15 -07:00
Andrew Kelley
5784631fab update the default macos version min to 10.14 2019-06-07 12:20:02 -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
Andrew Kelley
bfc86776d5 run zig fmt to update use to usingnamespace 2019-05-29 19:09:58 -04:00
hryx
3e14f86f9e Implement missing clang functions from last commit 2019-05-29 15:33:44 -07: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
Gonzalo Diethelm
6547468af6 clang.zig cleanup #9: rename arg0 to self 2019-05-28 18:05:08 +02:00
Gonzalo Diethelm
8d50d4f3fc clang.zig cleanup #8: add missing consts 2019-05-28 18:05:08 +02:00
Gonzalo Diethelm
b639447263 clang.zig cleanup #7: add missing struct 2019-05-28 18:05:08 +02:00
Gonzalo Diethelm
f4b4ea402e clang.zig cleanup #6: move block around 2019-05-28 18:05:08 +02:00
Gonzalo Diethelm
fd9e63da53 clang.zig cleanup #5: add missing enums 2019-05-28 18:05:08 +02:00
Gonzalo Diethelm
7f1dd05fa7 clang.zig cleanup #4: move block around 2019-05-28 18:05:08 +02:00
Gonzalo Diethelm
5df2e791c2 clang.zig cleanup #3: move block around 2019-05-28 18:05:08 +02:00
Gonzalo Diethelm
abf97cc232 clang.zig cleanup #2: move block around 2019-05-28 18:05:08 +02:00
Gonzalo Diethelm
333c050a1d clang.zig cleanup #1: move block around 2019-05-28 18:05:07 +02:00
Gonzalo Diethelm
775a25b7fd Add declarations missing from clang.zig 2019-05-28 18:05:07 +02:00
hryx
e632c2ade3 (broken) port a bunch of stuff from stage1 translate-c 2019-05-27 23:55:48 -07:00
hryx
b558d0996a expr: DeclRefExpr 2019-05-27 19:20:23 -07:00
hryx
e07888e54c expr: FunctionToPointerDecay & ArrayToPointerDecay for ImplicitCastExpr 2019-05-27 18:18:27 -07:00
hryx
22299869ba Prevent infinite recursion 2019-05-27 17:54:40 -07:00
hryx
e1f3eec9cc Merge branch 'master' into translate-c-userland 2019-05-27 17:24:21 -07:00
Andrew Kelley
3fccc07479 self-hosted translate-c: fix bad memory arena references 2019-05-27 20:22:15 -04:00
Michael Dusan
d4b241c14e new .d file parser for C compilation
- wip for #2046
- clang .d output must be created with `clang -MV` switch
- implemented in Zig
- hybridized for zig stage0 and stage1
- zig test src-self-hosted/dep_tokenizer.zig
2019-05-27 19:47:10 -04:00
hryx
2aa1c5da5d Remove unused local struct type 2019-05-27 15:58:21 -07:00
hryx
3bbee1ba2e expr: BitCast for ImplicitCastExpr 2019-05-27 14:38:09 -07:00
Andrew Kelley
0c6ab61b22 tests passing on linux 2019-05-26 23:35:26 -04:00
hryx
9c437f9032 var decl: ImplicitCastExpr 2019-05-26 19:14:50 -07:00
hryx
1a8f8c6262 var decl: init node 2019-05-26 17:36:47 -07:00
hryx
c79b8aeaef var decl: threadlocal 2019-05-26 17:05:49 -07:00
hryx
99f0b28d39 var decl: mut_token, create child scope 2019-05-26 16:51:25 -07:00
hryx
fceedada5c WIP translate var decl 2019-05-26 15:43:13 -07:00
Andrew Kelley
2f040a23c8 clean up references to os 2019-05-26 18:32:44 -04:00
Andrew Kelley
5a57610039 clean up code now that #769 is implemented 2019-05-14 19:23:31 -04:00
hryx
3a3a738478 Recursive rewrite of stage2 parser, part 3 2019-05-12 02:01:45 -07:00
Andrew Kelley
10e9d47b49 stage2 translate-c: implement functions with no prototype
stage1 translate-c actually has this wrong. When exporting a function,
it's ok to use empty parameters. But for prototypes, "no prototype"
means that it has to be emitted as a function that accepts anything,
e.g. extern fn foo(...) void;

See #1964
2019-05-11 12:09:11 -04:00