Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode identifiers #418

Closed
bjorn3 opened this issue May 10, 2021 · 1 comment
Closed

Unicode identifiers #418

bjorn3 opened this issue May 10, 2021 · 1 comment

Comments

@bjorn3
Copy link

bjorn3 commented May 10, 2021

Unicode identifiers were stabilized in rust-lang/rust#83799. There is a PR (rust-lang/reference#1022) on the reference to clarify the rules regarding unicode identifiers. There are also some lints to detect confusing cases like mixing different scripts.

bors bot added a commit that referenced this issue Oct 18, 2021
747: Base v0 mangling grammar r=philberty a=CohenArthur

This PR adds base functions to deal with the v0 mangling grammar, [found here](https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html#syntax-of-mangled-names).

I have a few questions regarding this implementation:
1/ Is there any existing implementation for the base62 algorithm used here? This is directly adapted from [rustc's base_n module](https://github.com/rust-lang/rust/blob/6f53ddfa74ac3c10ceb63ad4a7a9c95e55853c87/compiler/rustc_data_structures/src/base_n.rs#L16) which I'm assuming is relatively standard and might already exist in the compiler. I haven't been able to find it however.
2/ gccrs cannot yet deal with unicode identifiers, as pointed out by `@bjorn3` in #418. This means that a big chunk of the `v0_add_identifier` implementation is missing. Should it be added in this PR too?
3/ As mentionned in zulip, it would be great to be able to create unit tests for this piece of code. It would be quite easy to generate a bunch of base62 strings and ensure that the algorithm here matches with them.

Co-authored-by: CohenArthur <[email protected]>
@tamaroning
Copy link
Contributor

Duplicate #2287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants