|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.Backend.Maps.NameMap
public abstract class NameMap
NameMap gives a translation from methods, classes,
and fields to unique string labels legal in assembly code.
| Constructor Summary | |
|---|---|
NameMap()
|
|
| Method Summary | |
|---|---|
abstract String |
c_function_name(String function_name)
Maps a C function name to the appropriate label string. |
Label |
label(HClass hc)
Maps an HClass to a Label representing the
location of its class pointer |
Label |
label(HClass hc,
String suffix)
Maps an HClass to a Label representing the
class data structure associated with the given suffix. |
Label |
label(HField hf)
Maps a static HField to a Label. |
Label |
label(HField hf,
String suffix)
Maps an HField to a Label representing the
field information structure associated with the given suffix. |
Label |
label(HMethod hm)
Maps an HMethod to a Label. |
Label |
label(HMethod hm,
String suffix)
Maps an HMethod to a Label representing the
method information structure associated with the given suffix. |
Label |
label(String stringConstant)
Maps a String constant to a Label. |
Label |
label(String stringConstant,
String suffix)
Maps a String constant to a Label
representing the string data structure associated with the given
suffix. |
String |
mangle(HClass hc)
Mangle a class name. |
abstract String |
mangle(HClass hc,
String suffix)
Mangle a class name, adding a uniqueness suffix. |
String |
mangle(HField hf)
Mangle a field name. |
abstract String |
mangle(HField hf,
String suffix)
Mangle a field name, adding a uniqueness suffix. |
String |
mangle(HMethod hm)
Mangle a method name. |
abstract String |
mangle(HMethod hm,
String suffix)
Mangle a method name, adding a uniqueness suffix. |
String |
mangle(String string_constant)
Mangle a reference to a string constant. |
abstract String |
mangle(String string_constant,
String suffix)
Mangle a reference to a string constant, adding a uniqueness suffix. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NameMap()
| Method Detail |
|---|
public abstract String c_function_name(String function_name)
public String mangle(HMethod hm)
public abstract String mangle(HMethod hm,
String suffix)
null;
the string returned in this case is idential to that
obtained by a call to mangle(hm) (with no
specified suffix).
public String mangle(HField hf)
public abstract String mangle(HField hf,
String suffix)
null;
the string returned in this case is idential to that
obtained by a call to mangle(hf) (with no
specified suffix).
public String mangle(HClass hc)
public abstract String mangle(HClass hc,
String suffix)
null;
the string returned in this case is idential to that
obtained by a call to mangle(hf) (with no
specified suffix).
public String mangle(String string_constant)
public abstract String mangle(String string_constant,
String suffix)
null; the string returned in this case is
idential to that obtained by a call to
mangle(string_constant) (with no specified
suffix).
public Label label(HClass hc)
HClass to a Label representing the
location of its class pointer
public Label label(HClass hc,
String suffix)
HClass to a Label representing the
class data structure associated with the given suffix.
public Label label(HField hf)
HField to a Label.
public Label label(HField hf,
String suffix)
HField to a Label representing the
field information structure associated with the given suffix.
public Label label(HMethod hm)
HMethod to a Label. Note that
the method does not have to be static or final; in many cases we
can determine the identity of a virtual function exactly using
type information, and label() should return a
Label we can use to take advantage of this information.
public Label label(HMethod hm,
String suffix)
HMethod to a Label representing the
method information structure associated with the given suffix.
public Label label(String stringConstant)
String constant to a Label.
public Label label(String stringConstant,
String suffix)
String constant to a Label
representing the string data structure associated with the given
suffix.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||