TODO 1.8 KB

1234567891011121314151617181920212223242526272829303132333435
  1. - Make 'macroexp' work with locally defined macros (i.e: through 'let'). This
  2. probably needs a new opcode that stores the macros/aliases into the dynamic
  3. frame, and then have the macroexpand function look into the preceeding let
  4. bindings to see if there's any of them.
  5. - Don't use a reference to 'stkend' in the bytecode evaluation function.
  6. Instead, use a simple variable and store in the interpreter before a call
  7. to another function is made, and restore it afterwards. Be careful with
  8. methods that implicitly manipulate the member 'stkend', like 'pop' et al.
  9. - There are too many hash table implementations around. Specifically, all
  10. the ad-hoc open addressing tables should be condensed into a single type,
  11. with template specializations.
  12. - Allow macros to take an optional parameter, '[:env]', that contains the
  13. lexical environment at the time of the call. This would be a simple
  14. list with symbols that callers could query with 'memq' or the like,
  15. in order to know if a symbol is locally or globaly bound.
  16. - When setting a global symbol, we shouldn't just modify its value, but rather
  17. intern a new one with the same name and the updated value, in case we are
  18. executing in a different package.
  19. - Remove the first element in the function frame (aka 'env'), because it's
  20. already being accesed without it being referenced.
  21. - Instead of using a pair of <object*, int> to specify arguments in
  22. native functions, construct an object that encapsulates those details.
  23. This will allow us to be robust against stack reallocations as well.
  24. - Don't use frame pointers, and instead make any access to local variables
  25. be relative to 'interp->stkend'. This may mean different offsets for the
  26. same local at different points of execution, but it frees up a register
  27. in the AOT compiler for whatever we may need it.