Comment #4 on issue 3710 by [email protected]: Template literals are not handling two byte strings correct.
https://code.google.com/p/v8/issues/detail?id=3710

So, there are a few things happening:

Script gives us a source accessor which returns a String --- this is not going to be a flattened string most likely, it will be made up of a mixture of one-byte and two-byte strings depending on how it was scanned (I could be wrong about this, but that seems like it would make sense to me).

However, because we're not recording the raw spans during scanning, we're having to pick them out of the source string --- the utf8 representation is the convenient one to use, as it allows for an offset and length to extract.

Whether the utf8 or wide string accessors are used doesn't seem to matter much, because it is still necessary to flatten before use, and the output is going to end up in one representation or the other, not a mixture of both.

For simplicity, it's simpler to always produce wide strings for these raw strings, however as was shown in https://codereview.chromium.org/742643003/#ps60001 it's possible to produce one-byte strings, at the cost of more complex processing.

We can always go back and add this, but I feel like simplicity is better here. What do you think?

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to