|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.Backend.Generic.Runtime
public abstract class Runtime
A Generic.Runtime provides runtime-specific
information to the backend. It should be largely-to-totally
independent of the particular architecture targetted; all
interfaces in Runtime interact with IR.Tree form,
not the architecture-specific IR.Assem form.
Among other things, a Generic.Runtime provides
class data constructors to provide class information to the
runtime system.
| Nested Class Summary | |
|---|---|
static class |
Runtime.ObjectBuilder
The ObjectBuilder constructs data tables in the
IR.Tree form to represent static objects which may
be needed by the runtime---primarily string constant objects. |
static class |
Runtime.TreeBuilder
The TreeBuilder constructs bits of code in the
IR.Tree form to handle various runtime-dependent
tasks---primarily method and field access. |
| Field Summary | |
|---|---|
Set<String> |
configurationSet
Return a Set of labels which specify configuration
dependencies. |
| Constructor Summary | |
|---|---|
protected |
Runtime()
|
| Method Summary | |
|---|---|
abstract List<HData> |
classData(HClass hc)
Returns a list of HDatas which are needed for the
given class. |
abstract NameMap |
getNameMap()
Returns a NameMap valid for this
Generic.Runtime. |
abstract Runtime.TreeBuilder |
getTreeBuilder()
Returns a TreeBuilder object for this
Generic.Runtime. |
HCodeFactory |
nativeTreeCodeFactory(HCodeFactory hcf)
This code factory hook allows the runtime to return runtime-specific stubs for native methods --- or any other method which the runtime wishes to reimplement. |
abstract String |
resourcePath(String basename)
Prefixes a runtime-specific path onto the specific resource name, so that transformations can refer to runtime-specific properties files in a uniform manner. |
abstract Collection |
runtimeCallableMethods()
Return a Set of HMethods
and HClasses which are referenced /
callable by code in the runtime implementation (and should
therefore be included in every class hierarchy). |
void |
setCallGraph(CallGraph cg)
Sets the CallGraph to use for this
Generic.Runtime. |
void |
setClassHierarchy(ClassHierarchy ch)
Sets the ClassHierarchy to use for this
Generic.Runtime. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final Set<String> configurationSet
Set of labels which specify configuration
dependencies. A reference will be emitted by the FLEX component
of this Generic.Runtime for each string in
this set, which should match correspondingly-named labels in
a properly configured C runtime. This allows us to check
at link time that the C runtime's configuration matches the
FLEX configuration.
| Constructor Detail |
|---|
protected Runtime()
| Method Detail |
|---|
public abstract Runtime.TreeBuilder getTreeBuilder()
TreeBuilder object for this
Generic.Runtime.
public abstract NameMap getNameMap()
NameMap valid for this
Generic.Runtime.
public abstract String resourcePath(String basename)
public void setClassHierarchy(ClassHierarchy ch)
ClassHierarchy to use for this
Generic.Runtime. This method must be called at least
once before the TreeBuilder or classData
are used to generate tree form. It may be called multiple times
if transformations cause the class hierarchy to change.
public void setCallGraph(CallGraph cg)
CallGraph to use for this
Generic.Runtime. Some runtime options do not
require a call graph, and thus do not require that this method
ever be called. However, for those that do, this method must
be called at least once before the TreeBuilder or
classData are used to generate tree form. It may
be called multiple times if transformations cause the call
graph to change.
public abstract List<HData> classData(HClass hc)
HDatas which are needed for the
given class.
public HCodeFactory nativeTreeCodeFactory(HCodeFactory hcf)
The code factory returned by this method should return
a null for methods which the output routine
should skip. For example, if stubs are not needed for
native methods, then the code factory should return
null when convert() is called
on a native method (just as the standard code factories do).
The code factory given should produce tree form. The returned code factory should also produce tree form; the tree form need not be canonicalized or optimized.
public abstract Collection runtimeCallableMethods()
Set of HMethods
and HClasses which are referenced /
callable by code in the runtime implementation (and should
therefore be included in every class hierarchy).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||