Commit Graph

949 Commits (6b2d06710c52c348aa01b62007a2e990b47eee72)

Author SHA1 Message Date
Andrew Kelley 6b2d06710c IR: start a new passing self hosted test suite 2016-12-19 00:41:37 -05:00
Andrew Kelley 09c34352f8 IR: if and switch guaranteed compile time if target expr is 2016-12-19 00:04:51 -05:00
Andrew Kelley 956ff8a7f9 better error message generic instantiations 2016-12-18 21:15:40 -05:00
Andrew Kelley 132e2fa5d9 errors from inline fn calls include stack trace 2016-12-18 20:52:40 -05:00
Andrew Kelley cfc9f7422f IR: add MaybeOkOr instruction 2016-12-18 20:22:28 -05:00
Andrew Kelley 82101198f1 workaround for Arch being a primitive type 2016-12-18 20:09:34 -05:00
Andrew Kelley a71fbe49cb IR: add FnProto instruction 2016-12-18 19:40:26 -05:00
Andrew Kelley f12fbce0f5 IR: memoize compile-time evaluated fn invocations 2016-12-18 18:23:46 -05:00
Andrew Kelley 4816121e00 remove duplicate definition of container_string 2016-12-18 17:53:12 -05:00
Andrew Kelley ba008fb9d7 IR: ability to return a container from a function 2016-12-18 17:50:47 -05:00
Andrew Kelley 37b13bf151 hello.zig working with all structs anonymous 2016-12-18 17:24:52 -05:00
Andrew Kelley e50ced44a2 IR: all structs anonymous 2016-12-18 16:56:50 -05:00
Andrew Kelley 2e6aa6d813 IR: fix codegen of ref instruction 2016-12-18 13:55:34 -05:00
Andrew Kelley a76b048354 IR: phi instruction handles unreachable values correctly 2016-12-18 13:37:50 -05:00
Andrew Kelley b59841a80f IR: fix err variable in ErrOkOr instruction 2016-12-18 13:20:19 -05:00
Andrew Kelley 0cdfd5c141 IR: fix container field access via container pointer 2016-12-18 02:13:07 -05:00
Andrew Kelley 0d2f2b79ea IR: basic support for implicit casting to const pointer 2016-12-18 01:54:27 -05:00
Andrew Kelley 69cf0ea568 IR: fix type of decls accessed via namespace 2016-12-18 00:53:29 -05:00
Andrew Kelley 3e4194bf9e IR: add runime negation 2016-12-18 00:36:11 -05:00
Andrew Kelley 05b3b6a45e IR: update some std code to newest zig 2016-12-18 00:25:26 -05:00
Andrew Kelley 83a668b9ca IR: unreachable has lowest priority when resolving peer types 2016-12-18 00:25:07 -05:00
Andrew Kelley 9f08bfb38d IR: make generic function type have zero_bits flag 2016-12-18 00:24:39 -05:00
Andrew Kelley 85b6d14637 IR: support var type args and fix phi peer type resolution 2016-12-18 00:09:43 -05:00
Andrew Kelley e73faf9a9e IR: allow undefined compile time values sometimes 2016-12-17 22:13:15 -05:00
Andrew Kelley d245fabb80 IR: consolidate Ref and PrefixOpAddressOf instructions 2016-12-17 22:00:55 -05:00
Andrew Kelley 0f047337ac IR: fix `this` expression
Previously it returned a block instead of a function when
a function had any arguments.
2016-12-17 20:47:35 -05:00
Andrew Kelley a07d7ee53d IR: fix compile time switch eval for enums 2016-12-17 17:57:26 -05:00
Andrew Kelley c64f9991d5 IR: fix switching on enum 2016-12-17 17:48:07 -05:00
Andrew Kelley 12fcbecbf8 IR: add more instructions
* MaybeWrap
 * TestErr
 * UnwrapErrCode
 * UnwrapErrPayload
 * ErrUnionTypeChild
 * ErrWrapCode
 * ErrWrapPayload
2016-12-17 16:16:17 -05:00
Andrew Kelley 3a3cc7bf76 IR: panic with a TODO instead of generating invalid code
for returning from a function without running maybe and error defers
2016-12-14 15:43:24 -05:00
Andrew Kelley cca49b84b6 fix external function calls 2016-12-14 15:24:00 -05:00
Andrew Kelley 647d13168a IR: implement maybe return expression 2016-12-13 19:36:56 -05:00
Andrew Kelley 3f3630d7e3 IR: implement the rest of the builtin functions
* returnAddress
 * frameAddress
 * addWithOverflow
 * subWithOverflow
 * mulWithOverflow
 * shlWithOverflow
 * alignOf
2016-12-13 04:30:41 -05:00
Andrew Kelley 8bb5f54b29 IR: implement character literal 2016-12-13 01:58:36 -05:00
Andrew Kelley a6d2bdf605 IR: implement breakpoint builtin 2016-12-13 01:48:40 -05:00
Andrew Kelley 76a849b1f2 IR: implement memberCount builtin 2016-12-12 01:59:55 -05:00
Andrew Kelley ef63bc9cca IR: implement memcpy, memset, and slice expression 2016-12-12 00:31:35 -05:00
Andrew Kelley fb21570630 IR: implement alloca builtin 2016-12-11 19:43:06 -05:00
Andrew Kelley a963fba246 IR: implement compile time array concatenation 2016-12-11 18:43:52 -05:00
Andrew Kelley df0cdceff7 IR: implement compile time array multiplication 2016-12-11 17:17:00 -05:00
Andrew Kelley 9b17c0ff7f IR: implement intType builtin
and int type field access
and fix compile time bool not
2016-12-11 16:30:01 -05:00
Andrew Kelley 3429639e84 IR: implement truncate builtin 2016-12-11 15:31:07 -05:00
Andrew Kelley 433c17aeb1 IR: implement divExact builtin 2016-12-11 14:27:37 -05:00
Andrew Kelley 8fcb1a141b IR: implement fence and cmpxchg builtins 2016-12-11 04:06:07 -05:00
Andrew Kelley 10cea15cc3 IR: implement embedFile builtin 2016-12-11 00:43:23 -05:00
Andrew Kelley 2dd85d52cc IR: fix implementation of parseh
libc hello world works now
2016-12-11 00:13:43 -05:00
Andrew Kelley 3cfbec3eef IR: don't crash if number literal used with pure error 2016-12-10 18:43:28 -05:00
Andrew Kelley 6feae8a4e9 IR: support error union type 2016-12-10 18:38:53 -05:00
Andrew Kelley 443e14afbd IR: fix errorName builtin 2016-12-10 17:11:35 -05:00
Andrew Kelley 0ab953acb2 IR: better array len instruction
reference the "len" field directly instead of looking it up by
name since we already know exactly where the field metadata is
2016-12-08 02:15:48 -05:00