-
-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to start making encoded symbols work as IDs.
This is a big patch and represents a prototype/spike of encoded IDs. Changes include: * Propagate encoding and UTF-16 string from parser. This was a pragmatic choice since *many* paths expect identifier strings from the parser to be proper Java strings. In the future we would want to propagate the raw bytes. * Use raw-strings (Java strings with raw bytes as chars) for all of constant storage. This fixes many issues with encodings being lost or having different paths to constants conflict because some use raw and some do not. * Changes to compiler and IR to support all this. This is promising work but it represents only the beginning. All identifiers in the system would need to start propagating encoding and raw bytes (or a way to get at raw bytes) which may require large-scale changes to our APIs. In addition, there are some deficiencies that would require a larger effort: * If an identifier's symbol is not anchored in memory, the symbol will be collected and there will be no way to reliably get back to byte[]+encoding from that raw string. Most of the time it will be UTF-8 but it could be anything. * Because of the above deficiency, we would need to start storing some form that preserves original bytes and encoding. This This would be a drastic API-breaking change throughout JRuby.
Showing
34 changed files
with
564 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.