summaryrefslogtreecommitdiffstats
path: root/TODO
blob: f795294281ec514ebe809818d34972b3699ca65c (plain)
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
  * Store static variable values in eval array (two dimensions: TU and variable
    name)
  * Save static variable values in ctxsw
  * Implement associative arrays
    - TBD: syntax/functions
    - Use `__x__` between array name and index name
      Example: array `arr_` and index `ind`: stored as `__arr_arr___x__ind`
      Example: array `arr` and index `_ind`: stored as `__arr_arr__x___ind`
      Example: array `arr_` and index `_ind`: stored as `__arr_arr___x___ind`
  * Consider ctxsw optimization:
    - In backend, prefix static parameter names (in assignments and expansions)
      and static function names (in definitions and calls) with TU and function
    - Replace non-static parameter names with eval to prefix names with SP
    - Symbol table needed to track global vs local and static vs non-static
      symbols
    - In eshrt, remove variable updating code
    - Caveat: breaks variable parameter names in eval
    - If arrays are implemented, would anyone still need variable parameter
      names?
    - Maybe add -fno-mangle-symbols option to eshtrans to disable prefixing and
      insert a flag in generated code to enable eshrt to update variables
    - Or just add a function or operator to resolve/unmangle symbol names at
      run time (collected from a symbol table in the generated code)
  * Build system
    - Pre-built toolchain in source tree
    - configure looks for toolchain on system, uses included toolchain if not
      found
    - Top-level makefile directs build process (simple and bootstrap builds)
  * Likely lexer optimization: replace printf in `accept()` with eval-based
    array, then join and printf the array in `run_lexer()`