66 Commits

Author SHA1 Message Date
Andrew Kelley
15d415e10b
make std.mem.toSlice use null terminated pointers
and fix the fallout
2019-11-24 21:21:05 -05:00
Andrew Kelley
34b1ebefaa
Merge remote-tracking branch 'origin/master' into null-terminated-pointers 2019-11-24 20:28:46 -05:00
Andrew Kelley
00878a15d7
zig fmt: support sentinel-terminated pointer syntax 2019-11-23 22:21:25 -05:00
Vexu
d40f204ec0
self hosted compiler: small miscellaneous fixes 2019-11-23 21:57:24 +02:00
Vexu
03cc81665b
Merge branch 'master' into modernize-stage2 2019-11-23 19:13:48 +02:00
Andrew Kelley
fd6020c4e2
update tests, better error messages, update self-hosted tokenizer 2019-11-21 20:43:41 -05:00
Andrew Kelley
21f344b3b9
add null terminated pointers and arrays to self-hosted
as well as `@typeInfo` and `@Type`
2019-11-21 20:43:41 -05:00
Vexu
b92f42d1f4
implemented container doc comments in stage 2 2019-11-14 16:25:06 +02:00
Andrew Kelley
3cf5c2c62b
fix regressed tests and update docs to use "type coercion" 2019-11-08 15:57:25 -05:00
Andrew Kelley
aa0daea541
update more of the std lib to use @as 2019-11-08 15:57:25 -05:00
Vexu
c6076a1360
self hosted compiler: use enum literals 2019-11-07 10:30:56 +02:00
Andrew Kelley
845be4ea3e
fix regression in translate-c 2019-10-28 15:29:50 -04:00
Andrew Kelley
4b80e376e3
std.net.getAddressList 2019-10-28 15:29:50 -04:00
Andrew Kelley
79cb383f7d
fix 32-bit build of translate_c.zig 2019-10-24 19:46:11 -04:00
Vexu
2151f84d59 implement new async syntax in self-hosted compiler 2019-08-16 06:17:28 -07:00
hryx
247e567422
Don't return a slice pointing to a deceased stack address 2019-06-28 18:01:41 -07:00
hryx
102bf5200c
Fix string literal: not null-terminated (thanks @mikdusan) 2019-06-28 17:40:20 -07:00
hryx
cc74bf5136
Translate IntegralCast; add stage2 test coverage 2019-06-27 23:12:33 -07:00
hryx
646268875e
Use new width format option 2019-06-27 22:16:31 -07:00
hryx
3e0ff32bd8
Separate with space instead of LF to prevent rendering excessive indentation 2019-06-27 21:17:27 -07:00
hryx
b4bd52cc51
Create and render big.Int from IntegerLiteral; group BinaryOperator 2019-06-27 21:02:48 -07:00
hryx
8435351581
Escape C string literals 2019-06-24 22:37:19 -07:00
hryx
f845994839
transBinaryOperator: Add, Sub 2019-06-23 17:17:21 -07:00
hryx
69b90e0681
transStringLiteral 2019-06-23 15:06:16 -07:00
hryx
b2e06c3bf4
Observe translate mode in stage2 2019-06-23 14:32:45 -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
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
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
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
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
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
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