-
Notifications
You must be signed in to change notification settings - Fork 46
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
Enhance mangling to handle module names #448
Comments
C++ mangling rules here: https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling |
Unquoted identifiers in LLVM must match |
We will rely on the proposed spec restrictions here: ballerina-platform/ballerina-spec#791 (comment) |
What we are currently doing is described here: #43 (comment) |
GNU as syntax for names is described here: https://sourceware.org/binutils/docs/as/Symbol-Names.html#Symbol-Names
|
Public name looks like:
The digits are a decimal number equals to (number of org-or-mod-name - 1)*4 + K, where K is
So following imports would start with following prefixes
We will keep |
Alternative scheme:
In this scheme, "well-known" org/module name sequences are assigned a lower-case ASCII letter
The digits are a decimal number saying how many org-or-mod-name's there are. Omitting the digits is equivalent to 1.
|
Rust mangling scheme https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html |
Inspired by Rust
Examples
With the restrictions on org/module names ballerina-platform/ballerina-spec#791 (comment), the "_" in qual won't be needed. But we'll include this to support root module names based on filenames. |
@jclark What does |
Qualifier. Maybe there's a better word to use here? |
Qualifier is alright, I just didn't think of it when I saw the abbreviation. I would have used something like |
The logic is that, in the spec, |
Ah makes sense. |
For subset 8, we need to be able to handle public names with
ballerina
We need to distinguish these from non-public names.
This is part of #438.
The text was updated successfully, but these errors were encountered: