-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtodo
100 lines (86 loc) · 3.47 KB
/
todo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
- bigger-than-word types should be returned via allocating on the stack and then writing to them via pointer
collections:
- tuples
- arrays:
- allow empty arrays to typecheck (requires generic type syntax)
- dicts:
- use a hash table
- take references as keys, not the direct key type
- allow empty dicts to type check (requires generic type syntax)
- should set syntax auto-insert if necessary?
- rc's:
- can take RC'ed references to collections? maybe even RC'ed subreferences to user-defined collections?
- can get a ref from within an RC
- atomic decrement?
- cells:
- replace cells with a concurrency-safe lock
- slices
- automatically convert types when assigning collections?
interfaces:
- fundamental rethink (*must* be behind a pointer of some kind)
- self parameters for interfaces can only be passed by reference (otherwise linear IR doesn't work)
- when making the method -> function conversion, automatically take a reference if it's required
- modules can be converted to interfaces:
- produce and consume a nullpointer for the vtable call? (might mean we need to generate shim functions)
- interfaces can be structurally converted between each other:
- in typechecking
- in the IR
- in the interpreter
- interface conversion:
- checks return statements
- checks implicit returns due to the end of blocks
- check assignments
- interfaces are supported in the interpreter:
- mutable interfaces (significant borrowck implications)
borrow checker and lifetimes:
- clone support
- can't dereference pointers to Move types
- drop:
- drop dicts
- drop strings (may require string buffer vs string view types?)
- drop nullables
- forbid user from calling destructors directly
- path support:
- allow disjoint borrows of collection indices
- allow reassignment of affine fields (currently they can't generate drops)
packages:
- packages can declare dependencies on one another
- packages can be imported
- packages can include a WASM blob
modules:
- modules can be indexed in a struct / variant literal context
- modules can be declared explicitly
- can you index the self module outside import statements?
top-level statements:
- disallow top-level return
- decide what happens when more than one file in a package defines top-level statements
- decide what happens when a dependent package has top-level statements
type validation:
- prevent references being stored in collections
build system:
- cargo-like "build" command that automatically passes source files to the compiler
- packages have a defined compiled format
- packages can depend on other packages
strings:
- string manipulation
- interpolation literals
- multiline literals
import support:
- alias imports
- allow imports to include a list of things
compilation resume and reload:
- rework the hashmaps into an actual environment data structure that allows for generational indexing?
- differentiate modules and compilation units, or give up on first class modules
- make IDs relative to compilation units
- allow a compilation pass to have some existing compilation units to start off (for partial compilation)
unions:
- faulthrough / default branch in case statement
- ?. operator on union lvalues
boolean operators:
- short-circuiting boolean evaluation
- equality / inequality:
- applicable to nullable values
wasm backend:
- figure out and fix issue with dictionaries
- explicitly handle stack overflows
- correctly arrange stack, data, and heap segments of memory