|
1 | 1 | ## Roadmap - Self-hosted compiler
|
2 | 2 |
|
3 | 3 | - [X] Check correct implementation of a trait.
|
4 |
| -- [ ] `no_mangle` attribute. |
| 4 | +- [ ] `no_mangle` attribute to avoid function mangling. |
| 5 | +- [ ] `c_union` attribute to indicate that a struct should behave the same as a C union. |
5 | 6 | - [ ] Format command (`rivet fmt .`).
|
6 | 7 | - [ ] Replace Python scripts with Rivet scripts.
|
7 | 8 | - [ ] Explicit function/method overloading:
|
|
19 | 20 | - [ ] Constant-folding: `x := 2 * 2;` => `x := 4;`.
|
20 | 21 | - [ ] Optimize code, inline functions/methods annotated with `inline`,
|
21 | 22 | delete unused code, etc.
|
22 |
| -- [ ] (Atomic) Reference-Counting for traits, boxed enums, strings and vectors. |
| 23 | +- [ ] (Atomic) Reference-Counting for traits, boxed enums, strings, vectors and structs. |
23 | 24 | - [ ] Better support for embedded structs.
|
24 | 25 | - [ ] `undefined` for uninitialized variables: `x: [5]uint8 := undefined;`.
|
25 | 26 | - [ ] Disallow empty array literal (`x := []!; -> ERROR`).
|
26 | 27 | - [ ] Add `@is_flag_defined()` builtin function.
|
27 | 28 | - [ ] Generic support: `Struct<T> { f: T; }` => `Struct:<T>(f: @default(T))`.
|
28 |
| -- [ ] Lambdas + Closures: `sum := |a: int32, b: int32| a + b;`. |
| 29 | +- [ ] Lambdas + Closures: `sum := |a: int32, b: int32| [my_inherited_var] a + b;`. |
29 | 30 | - [ ] Anonymous structs: `my_obj := struct(my_field: 1, other_field: true, pwd: "abc");`.
|
30 | 31 | - [ ] `extern (C) import` for C interop:
|
31 | 32 | ```swift
|
|
40 | 41 |
|
41 | 42 | func xyz() { }
|
42 | 43 | ```
|
| 44 | +- [ ] Replace `c/libc` definitions by `extern (C) import` declarations. |
43 | 45 | - [ ] `comptime` statement for compile-time execution (`CTE`):
|
44 | 46 | ```swift
|
45 | 47 | comptime {
|
46 | 48 | my_func();
|
47 | 49 | }
|
48 | 50 |
|
49 | 51 | func my_func() {
|
50 |
| - console.println("executed in compile-time"); |
| 52 | + console.writeln("executed in compile-time"); |
51 | 53 | }
|
52 | 54 | ```
|
53 |
| -- [ ] Replace `c/libc` definitions by `extern (C) import` declarations. |
| 55 | + |
0 commit comments