aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rustspec.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-10-18 09:24:56 +0000
committerGitHub <noreply@github.com>2021-10-18 09:24:56 +0000
commit649e3e074bf8306bf0eb042f10483dbd61cd040b (patch)
treeae3b4402a9e8fdf23dfe27df0823219bd2064cae /gcc/rust/rustspec.cc
parenta1a450641004c45b78b76034161f7b2efb0eeb1f (diff)
parentfd9d37c68ca363503ef5a515c7e409a3b15b43e1 (diff)
downloadgcc-649e3e074bf8306bf0eb042f10483dbd61cd040b.zip
gcc-649e3e074bf8306bf0eb042f10483dbd61cd040b.tar.gz
gcc-649e3e074bf8306bf0eb042f10483dbd61cd040b.tar.bz2
Merge #747
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 <arthur.cohen@epita.fr>
Diffstat (limited to 'gcc/rust/rustspec.cc')
0 files changed, 0 insertions, 0 deletions