gov.llnl.babel.backend.mangler
public interface NameMangler
NameMangler
maps long names onto shorter names that are unlikely to
conflict with other symbol names. When mapping a set of long names onto
a set of shorter names, there is a nonzero probably of a symbol conflict.Modifier and Type | Method and Description |
---|---|
java.lang.String |
shortArrayName(java.lang.String symbol,
java.lang.String method,
java.lang.String suffix)
Convert the long name for the array method into a shorter name.
|
java.lang.String |
shortName(java.lang.String symbol,
java.lang.String suffix)
Convert a type name to a short length.
|
java.lang.String |
shortName(java.lang.String symbol,
java.lang.String method,
java.lang.String suffix)
Convert the long name for the method into a shorter name.
|
java.lang.String shortName(java.lang.String symbol, java.lang.String method, java.lang.String suffix) throws java.io.UnsupportedEncodingException
symbol
, an
underscore, method
, and suffix
with period
characters converted to underscore characters. The name mangler will
attempt to preserve as much of the fullname. First priority is given to
maintaining suffix part of the name, second priority is
given to maintaining the method name, and third priority is given
maintaining the symbol part of the name.
The returned name is guaranteed to have an underscore in it.symbol
- the fullname of the Symbol
. This name has period
characters between the various parts of the fullname.method
- the name of the method Method
. This name has no
periods in it.suffix
- a string that is tagged onto the end of the method.
Implementation methods may have "_i" as a suffix to
keep them distinct from stubs and skeletons.java.io.UnsupportedEncodingException
- in generating the mangled name, the mangler may need
to convert symbols to a standard byte encoding.java.lang.String shortArrayName(java.lang.String symbol, java.lang.String method, java.lang.String suffix) throws java.io.UnsupportedEncodingException
symbol
, an
underscore, "array", underscore, method
, and
suffix
with period characters converted to underscore
characters. The name mangler will attempt to preserve as much of the
fullname. First priority is given to maintaining suffix part of the
nam, second priority is given to maintaining the method name, and
third priority is given maintaining the symbol part of the name.
The returned name is guaranteed to have an underscore in it.symbol
- the fullname of the Symbol
. This name has period
characters between the various parts of the fullname.method
- the name of the method Method
. This name has no
periods in it.suffix
- a string that is tagged onto the end of the method.
Implementation methods may have "_i" as a suffix to
keep them distinct from stubs and skeletons.java.io.UnsupportedEncodingException
- in generating the mangled name, the mangler may need
to convert symbols to a standard byte encoding.java.lang.String shortName(java.lang.String symbol, java.lang.String suffix) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException