Andrew Kelley
52eec6b9a6
%=
in inline assembly survives optimization
2017-02-05 13:12:06 -05:00
Andrew Kelley
6f316d8ebd
setGlobalSection and setGlobalAlign work for functions
2017-02-05 12:50:19 -05:00
Andrew Kelley
d2f1f57fa4
even external functions which provide definitions get nounwind
2017-02-05 01:57:49 -05:00
Andrew Kelley
64a0510205
inline assembly supports %=
syntax
...
it outputs a number that is unique to each instance of the asm
statement in the entire compilation.
useful when creating local labels and referring to them multiple
times in a single template that generates multiple
assembler instructions
2017-02-04 22:33:58 -05:00
Andrew Kelley
b840184bb0
memcpy and memset builtins support volatile pointers
...
See #238
2017-02-04 22:12:06 -05:00
Andrew Kelley
419e75eb23
remove volatileStore builtin; add volatile pointers
...
closes #238
2017-02-04 21:49:27 -05:00
Andrew Kelley
0919ea0afd
ability to set global variable alignment and ...
...
..section in the initialization expression
2017-02-04 10:22:07 -05:00
Andrew Kelley
67b02326f8
preserve names of exported variables
2017-02-03 16:27:24 -05:00
Andrew Kelley
5a86c04996
add volatileStore() builtin function
...
See #238
We can revisit how volatile will work later - for now
here's a builtin function to do it.
2017-02-03 15:14:18 -05:00
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