Skip to content

Commit

Permalink
Use numbers instead of bullets
Browse files Browse the repository at this point in the history
  • Loading branch information
nailuj29 authored Dec 9, 2021
1 parent d513861 commit 7d5e1d5
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions active-rfcs/0000-name-mangling.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ Additionally, "constant string" is a literal string of characters.

### Function name mangling
A function name will be mangled according to the following scheme
- Leader: always the constant string `boa`
- Module: a mangled module name
- Class (optional): the constant string `c` followed by a string representing the class name
- Method type (Required if class exists): `i` (for instance methods) or `s` (for static methods)
- Function name: a string representing the name of the function in Boa code
- Parameters: the constant string `p` followed by Parameter Descriptors
- Parameter Descriptors: the constant string `t` followed by a string representing the type name. If the type is a class, the class name is also mangled
- Return type: the constant string `r` followed by the type name
1. Leader: always the constant string `boa`
2. Module: a mangled module name
3. Class (optional): the constant string `c` followed by a string representing the class name
4. Method type (Required if class exists): `i` (for instance methods) or `s` (for static methods)
5. Function name: a string representing the name of the function in Boa code
6. Parameters: the constant string `p` followed by a number n, then n Parameter Descriptors
7. Parameter Descriptors: the constant string `t` followed by a string representing the type name. If the type is a class, the class name is also mangled
8. Return type: the constant string `r` followed by the type name

### Class name mangling:
A class name will be mangled according to the following scheme:
- Leader: always the constant string `boaclass`
- Module: a mangled module name
- Class name: the constant string `n` followed by a string representing the class name
1. Leader: always the constant string `boaclass`
2. Module: a mangled module name
3. Class name: the constant string `n` followed by a string representing the class name

### Module name mangling:
A module name is mangled according to the following scheme
- Depth: the contstant string `d` followed by the modules "depth" (henceforth referred to as d) in the module tree. `std` has a depth of `1` and `std.math` has a depth of `2`
- Module names: d repetitions of the following: the constant string `m` followed by a string representing the module name
1. Depth: the contstant string `d` followed by the modules "depth" (henceforth referred to as d) in the module tree. `std` has a depth of `1` and `std.math` has a depth of `2`
2. Module names: d repetitions of the following: the constant string `m` followed by a string representing the module name

## Drawbacks

Expand Down

0 comments on commit 7d5e1d5

Please sign in to comment.