Andrew Kelley
05de70017d
IR: support slice types
2016-11-07 18:58:01 -05:00
Andrew Kelley
a2e3293930
WIP moving all analysis to IR
2016-11-04 15:36:30 -04:00
Andrew Kelley
1a0111d4c3
*WIP*
2016-10-30 02:46:16 -04:00
Andrew Kelley
afc5507b64
ir: ability to modify global vars
2016-10-29 19:14:48 -04:00
Andrew Kelley
77ae3442ef
explicit casting works with IR
2016-10-09 02:20:01 -04:00
Andrew Kelley
cd1bd78aa9
simple add function works with IR
2016-10-02 23:48:48 -04:00
Andrew Kelley
633781e31d
empty function compiles successfully with IR
2016-09-30 20:12:00 -04:00
Andrew Kelley
3239b3cb69
use size_t for indexes
...
protect against incorrect copies in debug mode
2016-09-19 11:54:01 -04:00
Andrew Kelley
0d5ecc4312
ability to have a return type of 'type'
2016-08-07 20:08:37 -07:00
Andrew Kelley
8552d7fd19
explicit wrapping integer operations
...
instead of wrapping integer types
closes #159
2016-07-27 23:08:27 -07:00
Andrew Kelley
9d29674711
ability to cast slice to u8 slice
2016-05-07 18:45:28 -07:00
Andrew Kelley
2ed72022ce
support generic data structures
...
See #22
2016-05-07 17:00:58 -07:00
Andrew Kelley
094336f07c
add integer wrapping
...
see #46
2016-05-05 17:19:01 -07:00
Andrew Kelley
7a05e18efb
implement @err_name builtin function
2016-04-09 08:55:53 -07:00
Andrew Kelley
f1d338194e
rewrite how importing works
...
* Introduce the concept of packages. Closes #3
* Add support for error notes.
* Introduce `@import` and `@c_import` builtin functions and
remove the `import` and `c_import` top level declarations.
* Introduce the `use` top level declaration.
* Add `--check-unused` parameter to perform semantic
analysis and codegen on all top level declarations, not
just exported ones and ones referenced by exported ones.
* Delete the root export node and add `--library` argument.
2016-03-01 03:13:40 -07:00
Andrew Kelley
f580c7fa43
handle libc include path and libc lib path differently
2016-02-15 16:52:37 -07:00
Andrew Kelley
87cdbb6c25
improve performance for get_fn_type
2016-02-07 18:32:19 -07:00
Andrew Kelley
6a2ede5a6e
parsing code for defer and more
...
* disable goto and label support see #44
* refactor the way block contexts work
2016-02-05 23:20:34 -07:00
Andrew Kelley
b28f7d0808
types sized and aligned with LLVM target data layout API
2016-02-03 02:01:42 -07:00
Andrew Kelley
3c2093fec6
parseh understands types better and handles some situations better
...
See #88
Also, includes partial implementation of typedef top level declaration.
See #95
Also, fix function types. Previously the way we were deduping function type
pointers was incorrect.
2016-01-31 01:20:47 -07:00
Andrew Kelley
0278468479
upgrade to the libclang C++ API
...
c_import creates a tmp .h file and parses it with libclang,
reporting any errors found.
See #88
2016-01-27 00:01:49 -07:00
Andrew Kelley
32e2196257
number literal rework
2016-01-21 03:02:25 -07:00
Andrew Kelley
3a326d5005
pave the road for function pointers
...
See #14
2016-01-18 08:50:10 -07:00
Andrew Kelley
0c9afede9e
overflow intrinsics take type as first argument
2016-01-14 17:04:35 -07:00
Andrew Kelley
b28b7f63d1
all types are now expressions
...
See #22
2016-01-13 18:15:51 -07:00
Andrew Kelley
4d7835e21a
delete unused enumfield and enumdecl node types
2016-01-10 17:27:58 -07:00
Andrew Kelley
3ef2f7058b
refactor out the horrible beast that was codegen_node
2016-01-10 15:13:39 -07:00
Andrew Kelley
35b74d4013
order-independent declarations even from imports
...
closes #42
2016-01-10 01:25:20 -07:00
Andrew Kelley
1fe1235e14
order-independent declarations
...
code constructs and traverses a dependency graph in a deterministic
order.
2016-01-09 23:49:22 -07:00
Andrew Kelley
6d9119fcd9
add memcpy and memset intrinsics
2016-01-09 02:16:54 -07:00
Andrew Kelley
0c24ed8a81
rename restrict
to noalias
2016-01-08 23:48:24 -07:00
Andrew Kelley
b7dd88ad68
suport checked arithmetic operations via intrinsics
...
closes #32
2016-01-08 23:41:40 -07:00
Andrew Kelley
14b9cbd43c
add restrict qualifier on pointer arguments
2016-01-08 20:59:47 -07:00
Andrew Kelley
0c84ecd19d
codegen: fix else if expression and maybe unwrap expr
2016-01-08 03:59:37 -07:00
Andrew Kelley
9aea99a999
implement array slicing syntax
...
closes #52
2016-01-07 05:29:11 -07:00
Andrew Kelley
c75d40680f
while detects simple constant condition
2016-01-06 18:02:42 -07:00
Andrew Kelley
3c43bc9208
support unknown size arrays
2016-01-06 01:28:58 -07:00
Andrew Kelley
e1ff201d60
fix crash when struct field is invalid
2016-01-04 21:42:35 -07:00
Andrew Kelley
22c52f1eb6
member functions get a namespaced symbol
2016-01-04 17:14:53 -07:00
Andrew Kelley
4514661cfe
add member functions
2016-01-04 16:57:22 -07:00
Andrew Kelley
2c8958f454
import segregation for types
...
See #3
2016-01-04 03:52:37 -07:00
Andrew Kelley
44d5d008d0
partial import segregation
...
See #3
2016-01-04 03:31:57 -07:00
Andrew Kelley
fa6e3eec46
add #typeof() compiler function
2016-01-03 18:17:50 -07:00
Andrew Kelley
fb1e3a5be9
codegen: emit debug metadata for parameters
2016-01-02 20:42:32 -07:00
Andrew Kelley
968b85ad77
closer to guess number example working
2016-01-02 03:38:45 -07:00
Andrew Kelley
9a8851515b
basic maybe type working
2016-01-02 00:06:06 -07:00
Andrew Kelley
b3ac5c16ec
block expressions require parens
...
closes #39
2015-12-31 16:04:13 -07:00
Andrew Kelley
7ba99e9715
analyze if maybe var expressions
2015-12-26 15:43:40 -07:00
Andrew Kelley
5943f99510
implement continue expression
...
closes #6
2015-12-24 15:36:49 -07:00
Andrew Kelley
44ca5e19dc
add error for break outside loop
...
also fix break in nested loops
2015-12-24 15:30:55 -07:00