Andy Wingo
Andy Wingo
@kbara would you mind hacking up something for this? that would be swell :)
1. We do use stringref for the Hoot VM host, providing more efficient interop. 2. Stringref has other toolchain uses, e.g. it facilitates optimal tree-shaking of literals. 3. Of course...
An update: replacing `string` with a concrete type, e.g. `(array i8)`, works in some cases but isn't general: if the compiler/toolchain emits dynamic `ref.test` / `br_on_cast` checks on the replacement...
Really good catch, @Maxdamantus ! So if we were to define an abstract string data type in WebAssembly, we have a few options. We could say: 1. Strings are sequences...
Just a note on https://peps.python.org/pep-0383/: this strategy appears to only ever produce high surrogate codepoints. These strings are representable in option (2).
My imprecision stems from my ignorance :) Backing up a bit, I think you would want `stringref` values to be classifiable (if I understand your term correctly). But you also...
To a degree, I think the question of implementation-dependent cost models is just a thing we have to deal with, for better or for worse. In an implementation using encoding...
FWIW the workaround for stringref anyref, such as it is, is to allocate a `(struct (ref string))` wrapper. Not ideal!
PR #48 chooses option (3). But we could just as well do any of the others. Interestingly it would seem that the examples in the overview are still well-typed with...
Thinking about this a bit more, with regards to the dimensions of performance and binary size: - It doesn't matter if a stringref instruction consumes a nullable operand. If the...