curiousdannii/ifvms.js

Text improvements

Closed this issue · 1 comments

Some improvements are needed for text:

  • No text literals in JIT-code (for future asm.js work)
  • Make text using abbreviations return an object with a toString function to dynamically access the abbreviations, in case they have changed
  • Add a cache invalidation system for text in dynamic memory

I didn't yet implement a cache invalidation system, so all texts in dynamic memory are decoded each time. I'll have to do more profiling to decide whether a cache invalidation system is worth it or not.

ZVM no longer prints line feeds and should print carriage returns everywhere (except for @print_unicode, which we can't control.) This seems more pure from the perspective of the spec, and it simplifies things for abbreviation-printing texts. Browsers however don't like carriage returns, so Parchment must now convert them. At least that's an easy thing to do, and it can be done in the one place! Hmm, that's not true... there's the status line too. So I may yet decide to change it back, perhaps by converting it in ui.flush().