Andrew Kelley
8c9016b6d1
add setGlobalAlign and setGlobalSection builtin functions
...
closes #241
2017-02-03 13:56:56 -05:00
Andrew Kelley
3be4b6434c
add ability to set linker script
2017-02-03 12:34:20 -05:00
Andrew Kelley
e00eec1c29
typedefs work for binary math operations
2017-02-03 12:09:13 -05:00
Andrew Kelley
aae168550f
exported global variables get emitted as external in LLVM
2017-02-03 11:59:56 -05:00
Andrew Kelley
0cf0739b0a
update outdated comment
2017-02-02 17:18:36 -05:00
Andrew Kelley
cd08c1f3be
prefix op maybe and error are for types only
2017-02-02 12:21:11 -05:00
Andrew Kelley
88a253c64d
fix crash when passing void to var args function
...
closes #235
2017-01-31 15:50:38 -05:00
Andrew Kelley
4b3f18de3c
printf var args proof of concept
...
See #167
Need to troubleshoot when we send 2 slices to printf. It goes
into an infinite loop.
This commit introduces 4 builtin functions:
* `@isInteger`
* `@isFloat`
* `@canImplictCast`
* `@typeName`
2017-01-24 02:02:48 -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
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
8106f9846a
fix enum codegen and implement comptime switch var on enums
2017-01-15 22:16:39 -05:00
Andrew Kelley
d784705353
IR: implement macro for function aliasing function pointer
2017-01-12 03:15:06 -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
6caf32195a
pass unnecessary if statement test
2017-01-08 22:25:38 -05:00
Andrew Kelley
9d94c2ccd0
fix mul and sub overflow ops being rendered as addition
2017-01-05 03:29:50 -05:00
Andrew Kelley
dbb1018ca6
IR: std library passes codegen
2016-12-31 19:48:17 -05:00
Andrew Kelley
2ccdaee101
IR: add error for goto jumping over variable declaration
2016-12-31 01:58:37 -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
94f977a6c1
IR: pass genericFnWithImplicitCast test
2016-12-28 01:35:13 -05:00
Andrew Kelley
25a5fc32fe
IR: pass passSliceOfEmptyStructToFn test
2016-12-28 01:15:09 -05:00
Andrew Kelley
66a83d8738
IR: pass intToEnum test
2016-12-26 16:34:18 -05:00
Andrew Kelley
735cdbfdac
IR: pass intToPtrCast test
2016-12-26 15:45:50 -05:00
Andrew Kelley
73a751911e
IR: pass staticEvalListInit test
2016-12-26 03:16:19 -05:00
Andrew Kelley
4664f793dc
IR: pass enumToInt test
2016-12-26 02:36:04 -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
ba8af0f1e2
IR: fix missing implicit casts in init expressions
...
and implement runtime struct init instruction
2016-12-22 09:35:07 -05:00
Andrew Kelley
46033a2128
pass void parameters test
2016-12-22 00:46:17 -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
2419f0c914
IR: support maybe defers
2016-12-19 17:25:09 -05:00
Andrew Kelley
09d50e35a4
IR: support error defers
2016-12-19 16:45:15 -05:00
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
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
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
0d2f2b79ea
IR: basic support for implicit casting to const pointer
2016-12-18 01:54:27 -05:00
Andrew Kelley
d245fabb80
IR: consolidate Ref and PrefixOpAddressOf instructions
2016-12-17 22:00:55 -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
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
a6d2bdf605
IR: implement breakpoint builtin
2016-12-13 01:48:40 -05:00