Andrew Kelley
32d8686da8
various fixes
...
* comptime expression is a block expression as it should be
* fix var args when number of args passed is 0
* implement const value equality for structs
* fix indent when rendering container decl AST
* IR: prevent duplicate generation of code when it is partially
compile-time evaluated
* implement compile time struct field pointer evaluation
* fix compile time evaluation of slicing
2017-01-23 23:30:20 -05:00
Andrew Kelley
17cb85dfb8
basic support for functions with variable length arguments
...
See #77
2017-01-23 16:40:17 -05:00
Andrew Kelley
e5b1758010
remove staticEval builtin in favor of comptime expression
2017-01-22 23:21:00 -05:00
Andrew Kelley
201a3c121a
introduce comptime expression
...
closes #221
2017-01-22 22:59:52 -05:00
Andrew Kelley
6a5e61acd1
get rid of zeroes literal
...
closes #222
2017-01-16 17:24:13 -05:00
Andrew Kelley
0caee421e3
ability to equality compare with null
...
closes #106
2017-01-16 16:39:31 -05:00
Andrew Kelley
867686af42
equality comparison of void types is known at compile time
...
closes #56
2017-01-16 16:07:03 -05:00
Andrew Kelley
fdbc2d8da1
implement error when assigning to field of const struct
...
closes #48
2017-01-16 15:24:03 -05:00
Andrew Kelley
4cbeb87e83
fix handling of const values for 2d arrays
2017-01-16 12:42:46 -05:00
Andrew Kelley
c7591736b4
fix array of enums. also render debug info for const vars
2017-01-16 01:44:47 -05:00
Andrew Kelley
0b6cf0aa63
fix handling of invalid enumeration
2017-01-15 22:34:20 -05:00
Andrew Kelley
8106f9846a
fix enum codegen and implement comptime switch var on enums
2017-01-15 22:16:39 -05:00
Andrew Kelley
652bfab3d0
fix crash when casting fn call arg
2017-01-12 18:10:18 -05:00
Andrew Kelley
18f248b94d
IR: fix array concatenation
...
all tests passing
2017-01-12 15:10:58 -05:00
Andrew Kelley
d784705353
IR: implement macro for function aliasing function pointer
2017-01-12 03:15:06 -05:00
Andrew Kelley
25a670d74e
pass more tests
2017-01-11 19:09:17 -05:00
Andrew Kelley
fc53708dc0
better error message for unable to eval const expr
2017-01-11 18:06:21 -05:00
Andrew Kelley
7493af5953
fix a few tests
2017-01-11 00:38:24 -05:00
Andrew Kelley
fde276a3bf
IR: implement error for missing or extra switch prongs
2017-01-10 16:28:49 -05:00
Andrew Kelley
430e33b869
partially fix parseh command
2017-01-10 15:39:52 -05:00
Andrew Kelley
8d27a02705
pass division by zero test
2017-01-08 22:35:31 -05:00
Andrew Kelley
6caf32195a
pass unnecessary if statement test
2017-01-08 22:25:38 -05:00
Andrew Kelley
76d0e49e61
fix unable to eval const expr test case
2017-01-08 10:54:05 -05:00
Andrew Kelley
3ef447fa20
don't try to eval extern functions at compile time
2017-01-08 10:30:05 -05:00
Andrew Kelley
090ff05054
add compile error for initializing struct with non struct type
2017-01-07 14:24:08 -05:00
Andrew Kelley
cf62f02ba9
don't mark call instruction as generated
...
pass cast unreachable test
2017-01-06 02:04:27 -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
837cc467f7
pass array access compile error tests
2017-01-05 19:05:48 -05:00
Andrew Kelley
e621ad014e
pass cannot assign to constant test
2017-01-05 18:50:36 -05:00
Andrew Kelley
438feebbcf
pass undeclared identifier test
2017-01-05 04:01:11 -05:00
Andrew Kelley
349cd79fe4
containers created during eval get names for parameters
2017-01-05 03:22:00 -05:00
Andrew Kelley
6ec6589bd8
IR: pass MT19937_64 test
2017-01-05 00:59:37 -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
69132bdeda
IR: progress toward compiling standard library
...
* comptime fn call
* is_comptime doesn't count as an instruction dependency
* update more std code to latest zig
2016-12-31 17:10:29 -05:00
Andrew Kelley
5f89393acb
IR: implement binary not instruction
2016-12-31 02:23:39 -05:00
Andrew Kelley
2ccdaee101
IR: add error for goto jumping over variable declaration
2016-12-31 01:58:37 -05:00
Andrew Kelley
76fa6cdce3
eradicate use of zeroes in std
2016-12-31 01:31:23 -05:00
Andrew Kelley
29bb175f4f
IR: handle phi instruction with 0 resulting incoming values
2016-12-30 18:47:54 -05:00
Andrew Kelley
6bbee194b9
IR: better basic block dependency detection
2016-12-30 18:34:05 -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
15f843e70f
IR: pass castSliceToU8Slice test
2016-12-26 17:11:36 -05:00
Andrew Kelley
66a83d8738
IR: pass intToEnum test
2016-12-26 16:34:18 -05:00
Andrew Kelley
c8a7ab7eff
IR: pass cStringConcatenation test
2016-12-26 16:04:14 -05:00
Andrew Kelley
735cdbfdac
IR: pass intToPtrCast test
2016-12-26 15:45:50 -05:00
Andrew Kelley
3ef6663b72
IR: pass genericMallocFree test
2016-12-26 03:02:20 -05:00
Andrew Kelley
110a6f39ca
IR: pass explicitCastMaybePointers test
2016-12-26 02:53:42 -05:00
Andrew Kelley
4664f793dc
IR: pass enumToInt test
2016-12-26 02:36:04 -05:00