-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
97 lines (82 loc) · 2.89 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
[*] Change if-block semantic:
[*] now: <{case} if {...} else {...} end>; what i want it to be: <if {case} do {...} else {...} end>, just like in `while` loops
[*] add `elif` keyword
[*] Change Strings:
[*] now string is a pointer to a go-string in string literals array
[*] want a string to be a (`size`, `data`) pair
[*] store `data` in byte array
[*] add argv
[ ] Functions:
[*] local allocs
[*] local consts
[*] return stack
[*] inlines
[*] no function definitions inside function allowed
[*] recursion limit?
[*] entry point for executable Gorth script (`main` function)
[*] `return` keyword
[*] main should not be inlined
[*] allow recursion for ordinary functions
[*] add support for using function pointers
[ ] Memory management
[ ] operation for allocating memory on the heap
[ ] Types
[ ] custom types (aliases, structures)
[ ] arrays
[ ] Optimization
[ ] remove dead code
[*] remove unused functions
[ ] Captures
[*] supply captures syntax (capture x int y ptr z bool do ... end)
[] add support for break's and continue's from capture statement
[] capture function inputs
[ ] Includes
[*] `include` keyword
[*] check for circular includes
[*] do not import already imported files
[*] support -I flag for providing additional include paths
[ ] packages?
[ ] Compile-time type checking
[*] using stack for types
[*] use function signatures
[*] generic functions
[*] enable type checking by default
[*] type check inlines
[ ] Improve interpreter
[*] Add debugger mode (run by step, go in, go out, continue, etc)
[*] Add simple debugger
[*] Add parameter loc/glb to env command
[*] Add `p` command for printing consts, allocs or functions
[*] Add command for showing parts of memory as a slice
[ ] Improve debugger
[*] Add command to go out of current function
[ ] add profiler
[*] basic profiler
[ ] aggregate by functions
[ ] Save compiled code
[*] Add flag
[ ] Run compiled code from *.gorthc
[ ] Low-level interaction with OS
[ ] syscalls
[*] read, write, open, close
[ ] other syscalls
[ ] Collect stdlib for Gorth
[ ] Testing
[ ] more tests
[*] run tests asynchronously
[*] add asserts
[*] implement testing tool:
[*] test single file, test all files in directory, test all dirs
[*] support for providing input args and stdin for testcases
[*] check both return code and stdout/stderr output for testcases
[*] update testcase expecting output file
[*] Split Gorth project into modules
[*] show compilation statuses and timing
[*] Add `break` and `continue` to while loops
[*] break
[*] continue
[*] Replace some ops (break, continue, end, if, else) with unconditional jump operation
[*] Replace some `do` with conditional jump operation
[*] Improve error messsages
[*] Add debug levels
[ ] Separate usual errors (bad Gorth code) and fatal errors (errors in source code)