Andrew Kelley
a71fbe49cb
IR: add FnProto instruction
2016-12-18 19:40:26 -05:00
Andrew Kelley
b581da41f8
remove compiler directives
...
* add `setFnTest`, `setFnVisible`, `setFnStaticEval`,
`setFnNoInline` builtin functions to replace previous
directive functionality
* add `coldcc` and `nakedcc` as keywords which can be used as part
of a function prototype.
* `setDebugSafety` builtin can be used to set debug safety features
at a per block scope level.
* closes #169
2016-09-28 02:33:32 -04:00
Andrew Kelley
183976b242
add this keyword refers to thing in immediate scope
...
See #169
2016-09-26 23:47:30 -04:00
Andrew Kelley
f4d7c91363
std/rand: remove unneeded TODO
2016-09-26 22:42:25 -04:00
Andrew Kelley
768a9780ca
rename compileErr builtin to compileError
2016-09-05 17:01:54 -04:00
Andrew Kelley
ed50bd1b65
progress toward stack trace printing
2016-08-17 20:11:04 -07:00
Andrew Kelley
37d167f6e0
std: conform to style guidelines
2016-08-16 22:42:50 -07:00
Andrew Kelley
0450b73e3e
std: add tests for mt32 and mt64
2016-07-28 20:14:57 -07:00
Andrew Kelley
711e3d71b9
std: add vaporware plans for floating point builtins
2016-07-27 23:46:20 -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
3eb5afd245
std: cleanup of rand
2016-07-27 19:52:38 -07:00
Andrew Kelley
06c4b35eb1
std: improve rand implementation and API
2016-07-26 23:51:58 -07:00
Andrew Kelley
bc81ddfea6
unsigned integers for sizes of things
...
Closes #62 .
2016-07-26 20:40:11 -07:00
Andrew Kelley
56908dcb9d
add debug safety for shortening casts
...
closes #150
2016-05-09 08:44:41 -07:00
Andrew Kelley
094336f07c
add integer wrapping
...
see #46
2016-05-05 17:19:01 -07:00
Andrew Kelley
a25307c0a1
add optional continue expression to while loop
...
closes #139
2016-04-19 20:28:44 -07:00
Andrew Kelley
be4df96e4b
passing all tests
2016-04-12 13:30:52 -07:00
Andrew Kelley
1d4c66b56b
support multiple generic function instances
...
See #22
2016-04-07 10:34:54 -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
42fe4e3cc8
remove ptr field access of arrays
...
use &array[0] instead
2016-02-07 15:43:19 -07:00
Andrew Kelley
94ed9f622a
blocks with one statement pass constant expression eval
2016-02-07 12:38:51 -07:00
Andrew Kelley
4339d55562
update for loop syntax
...
it matches more closely the %% binary operator syntax
See #51
2016-02-05 17:15:19 -07:00
Andrew Kelley
ff5673ae1b
add rand.float32 to standard library
2016-02-05 04:30:19 -07:00
Andrew Kelley
4e43973413
variable initializations are now mandatory
...
use `undefined` if you want uninitialized memory
2016-01-25 23:56:46 -07:00
Andrew Kelley
50854226a6
syntax: back to -> for return type, no more =>
2016-01-25 17:08:18 -07:00
Andrew Kelley
f5cc7f65a3
fix parameter access of sret functions
2016-01-24 19:27:12 -07:00
Andrew Kelley
bfceb18631
character literal returns a number literal
2016-01-22 23:24:09 -07:00
Andrew Kelley
ae2151a751
use signed integer for sizes of things
2016-01-18 21:13:14 -07:00
Andrew Kelley
4c50606b9d
refactor std to use for loop
2016-01-18 07:16:17 -07:00
Andrew Kelley
86f55bce53
add void arrays test
2016-01-15 18:41:19 -07:00
Andrew Kelley
5f9ecb8566
instead of 'as' to cast, call type as function
2016-01-14 02:52:33 -07:00
Andrew Kelley
b28b7f63d1
all types are now expressions
...
See #22
2016-01-13 18:15:51 -07:00
Andrew Kelley
49d0971cd4
detect and report top level decl dependency loop
2016-01-10 00:03:31 -07:00
Andrew Kelley
d14a31100f
implement unknown size array indexing and slicing
2016-01-08 17:52:45 -07:00
Andrew Kelley
c75d40680f
while detects simple constant condition
2016-01-06 18:02:42 -07:00
Andrew Kelley
5e64c4d92f
support pub structs. move rand to std lib.
...
guess number example prints the answer now
2016-01-06 04:41:11 -07:00