harpoon.Backend.Maps
Class InlineMap
java.lang.Object
harpoon.Backend.Maps.InlineMap
- Direct Known Subclasses:
- DefaultInlineMap
public abstract class InlineMap
- extends Object
An InlineMap
maps an HField
to a boolean value
indicated whether the HField
can be inlined.
We leave the policy decision of whether it is wise to do so to other
code, which will also be an InlineMap. So, the idea is that a core
InlineMap implements the conservative analysis of inline-safety, then
a second inline map takes the first inline map and twiddles the inlining
results according to whether or not it thinks inlining is really a good
idea, using some heuristic. Or you can leave out the second inline map
and its heuristics, which just means you'd like to inline wherever
possible. Have I confused everyone yet?
- Version:
- $Id: InlineMap.java,v 1.2 2002/02/25 21:01:59 cananian Exp $
- Author:
- Duncan Bryce <duncan@lcs.mit.edu>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InlineMap
public InlineMap()
canInline1
public abstract boolean canInline1(HField hf)
- Returns:
true
if the HField
can be inlined
using type 1 inlining (the class descriptor for the inlined object is
preserved). This can be done even if the field escapes, as long as it
is a final field.
canInline2
public abstract boolean canInline2(HField hf)
- Returns:
true
if the HField
should be inlined
using type 2 inlining (the class descriptor for the inlined object is
omitted). This can only be done if the field doesn't escape.
Returning true
implies shouldInline1() returns
true
, too.