Andrew Kelley
6caf32195a
pass unnecessary if statement test
2017-01-08 22:25:38 -05:00
Andrew Kelley
23feafdef0
pass more tests
...
by removing assertion, fixing error column,
and updating expected message
2017-01-05 19:25:36 -05:00
Andrew Kelley
28403eaad0
pass more tests by updating expected error messages
2017-01-05 19:20:31 -05:00
Andrew Kelley
349cd79fe4
containers created during eval get names for parameters
2017-01-05 03:22:00 -05:00
Andrew Kelley
c32a060d4f
IR: add unreachable code compiler error
2017-01-04 23:21:33 -05:00
Andrew Kelley
664b41af65
fix debug information for function pointers in structs
2017-01-04 01:56:21 -05:00
Andrew Kelley
ff5120c584
IR: std makes it to codegen
2016-12-31 18:25:10 -05:00
Andrew Kelley
a9acc8cb45
IR: error for returning from defer expression
...
also fix peer type resolution for pure error mixed with error union
2016-12-28 03:47:02 -05:00
Andrew Kelley
f6ac2fa70e
IR: pass pointerToVoidReturnType test
2016-12-28 01:31:46 -05:00
Andrew Kelley
25a5fc32fe
IR: pass passSliceOfEmptyStructToFn test
2016-12-28 01:15:09 -05:00
Andrew Kelley
3ef6663b72
IR: pass genericMallocFree test
2016-12-26 03:02:20 -05:00
Andrew Kelley
f47dea2a2e
IR: support compile time global pointer reinterpret
...
this required moving the place we store types to ConstExprValue
2016-12-25 04:15:23 -05:00
Andrew Kelley
46033a2128
pass void parameters test
2016-12-22 00:46:17 -05:00
Andrew Kelley
43be6ccb03
IR: fix phi instruction when one of the predecessors is unreachable
2016-12-21 23:04:04 -05:00
Andrew Kelley
b4c2f7e310
get_error_type calls ensure_complete_type on child
2016-12-21 22:42:58 -05:00
Andrew Kelley
9b61682037
IR: implement runtime enum init and switch on enum with variable
2016-12-21 21:49:05 -05:00
Andrew Kelley
1f6dacbb2f
IR: enum init support
2016-12-20 01:50:32 -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
132e2fa5d9
errors from inline fn calls include stack trace
2016-12-18 20:52:40 -05:00
Andrew Kelley
82101198f1
workaround for Arch being a primitive type
2016-12-18 20:09:34 -05:00
Andrew Kelley
f12fbce0f5
IR: memoize compile-time evaluated fn invocations
2016-12-18 18:23:46 -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
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
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
cca49b84b6
fix external function calls
2016-12-14 15:24:00 -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
76a849b1f2
IR: implement memberCount builtin
2016-12-12 01:59:55 -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
8fcb1a141b
IR: implement fence and cmpxchg builtins
2016-12-11 04:06:07 -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
7d9fa01ed5
IR: implement compile time eval unwrap maybe
2016-12-06 22:04:55 -05:00
Andrew Kelley
6ed202ab16
IR: implement defer
2016-12-06 21:26:17 -05:00
Andrew Kelley
24048b2af6
IR: implement break and continue
2016-12-05 18:43:16 -05:00
Andrew Kelley
0541532ed6
IR: implement generic function calls
2016-12-05 05:12:44 -05:00
Andrew Kelley
363606d87b
IR: inline function evaluation works on generic functions
2016-12-05 01:08:17 -05:00
Andrew Kelley
25a89e7a36
IR: compile time function evaluation
2016-12-04 23:52:43 -05:00
Andrew Kelley
2f259b8176
IR: re-organize where state goes to prepare for generics
...
* Rip out legacy code for generics
* put scope in instruction instead of AST nodes
* separate top level decl stuff from AST nodes
- remove the assumption that there is a 1:1 correspondence
between an output instruction and an AST node
- This way we won't have to clone AST nodes for generics.
2016-12-04 03:40:40 -05:00
Andrew Kelley
f6cbb73c74
rewrite scope implementation
...
* now there are not extra unused hash tables
* each variable declaration opens a new scope inside a function
2016-12-01 21:08:12 -05:00
Andrew Kelley
c6ace9720c
rename BlockContext to Scope
2016-12-01 13:55:56 -05:00
Andrew Kelley
eb5693d91f
IR: function call porting progress
...
also implemented container init
generics is still todo
2016-11-28 02:40:01 -05:00
Andrew Kelley
9e7c475979
IR: silence irrelevant function prototype errors
2016-11-27 01:45:29 -05:00
Andrew Kelley
bd4d4ee51e
IR: detect error for exceeding branch quota
2016-11-27 00:14:19 -05:00
Andrew Kelley
84f7805029
IR: support import builtin function
2016-11-26 20:52:22 -05:00
Andrew Kelley
bbf785bc1d
IR: switch expression works with numbers
2016-11-26 00:25:48 -05:00
Andrew Kelley
e80e8a8099
IR: fix detection of invalid codegen
2016-11-21 13:53:08 -05:00
Andrew Kelley
2f8dd46174
IR: error for uncasted null lit variable
2016-11-19 01:53:14 -05:00
Andrew Kelley
8a81f8aa13
IR: implement compileVar builtin and more
...
* implicit array to slice cast
* fix if statements at global scope
* implement array type IR
2016-11-19 01:39:51 -05:00
Andrew Kelley
d94cb0566b
IR: correctly codegening memset and memcpy
2016-11-18 22:24:41 -05:00