Introduction to OOP: Chapter 21 : Implementation
[next]
[previous]
[audio]
[real]
[text]
Name Encoding
-
Different classes are allowed to have functions with the same name.
-
Some languages (C++) even permit multiple functions with the same name
within a class.
-
Yet linkers usually want every function to have a unique name.
-
Solution - generate an internal name that encodes both class name,
function name, and argument types.
-
Example: Foo::Bar_int_float_int
This is sometimes called a mangled name