| com.sun.tools.javac.jvm.Target
Target | public enum Target (Code) | | The classfile version target.
This is NOT part of any API supported by Sun Microsystems. If
you write code that depends on this, you do so at your own risk.
This code and its internal interfaces are subject to change or
deletion without notice.
|
Field Summary | |
final public static Target | DEFAULT | Enum Constant | JDK1_1 | Enum Constant | JDK1_2 | Enum Constant | JDK1_3 | Enum Constant | JDK1_4 J2SE1.4 = Merlin. | Enum Constant | JDK1_4_1 The following are undocumented transitional targets that we
had used to test VM fixes in update releases. | Enum Constant | JDK1_4_2 | Enum Constant | JDK1_5 Tiger. | Enum Constant | JDK1_6 JDK 6. | Enum Constant | JDK1_7 JDK 7. | Enum Constant | JSR14 Support for the JSR14 prototype compiler (targeting 1.4 VMs
augmented with a few support classes). | final public int | majorVersion | final public int | minorVersion | final public String | name |
Method Summary | |
public static Target | MAX() | public static Target | MIN() | public boolean | arrayBinaryCompatibility() Starting in 1.5, the compiler uses an array type as
the qualifier for method calls (such as clone) where required by
the language and VM spec. | public boolean | boxWithConstructors() For bootstrapping, we use J2SE1.4's wrapper class constructors
to implement boxing. | public boolean | classLiteralsNoInit() | public boolean | compilerBootstrap(Symbol c) For bootstrapping javac only, we do without java.lang.Enum if
necessary. | public boolean | generateCLDCStackmap() Return true if cldc-style stack maps need to be generated. | public boolean | generateEmptyAfterBig() | public boolean | generateStackMapTable() Beginning in -target 6, we generate stackmap attribute in
compact format. | public boolean | hasClassLiterals() | public boolean | hasEnclosingMethodAttribute() In J2SE1.5.0, we introduced the "EnclosingMethod" attribute
for improved reflection support. | public boolean | hasInitCause() | public boolean | hasIterable() For bootstrapping, we use J2SE1.4's java.util.Collection
instead of java.lang.Iterable. | public boolean | initializeFieldsBeforeSuper() Beginning in 1.4, we take advantage of the possibility of emitting
code to initialize fields before calling the superclass constructor.
This is allowed by the VM spec, but the verifier refused to allow
it until 1.4. | public static Target | instance(Context context) | public boolean | interfaceFieldsBinaryCompatibility() Beginning after 1.2, we follow the binary compatibility rules for
interface fields. | public boolean | interfaceObjectOverridesBinaryCompatibility() Beginning in -target 1.5, we follow the binary compatibility
rules for interface methods that redefine Object methods.
Earlier VMs had bugs handling such methods compiled using binary
compatibility (see 4392595, 4398791, 4392595, 4400415).
The VMs were fixed during or soon after 1.4. | public static Target | lookup(String name) | public boolean | obeyBinaryCompatibility() Beginning with -target 1.2 we obey the JLS rules for binary
compatibility, emitting as the qualifying type of a reference
to a method or field the type of the qualifier. | public boolean | requiresIproxy() In -target 1.1 and earlier, the compiler is required to emit
synthetic method definitions in abstract classes for interface
methods that are not overridden. | public char | syntheticNameChar() Return the character to be used in constructing synthetic
identifiers, where not specified by the JLS. | public boolean | useAnnotationFlag() | public boolean | useBridgeFlag() | public boolean | useEnumFlag() | public boolean | useInnerCacheClass() Sometimes we need to create a field to cache a value like a
class literal of the assertions flag. | public boolean | usePrivateSyntheticFields() Beginning in -target 1.4.2, we make synthetic variables
package-private instead of private. | public boolean | useStringBuilder() Beginning in 1.5, we have an unsynchronized version of
StringBuffer called StringBuilder that can be used by the
compiler for string concatenation. | public boolean | useSyntheticFlag() Beginning in 1.5, we have flag bits we can use instead of
marker attributes. | public boolean | useVarargsFlag() |
JDK1_1 | Enum Constant JDK1_1(Code) | | |
JDK1_2 | Enum Constant JDK1_2(Code) | | |
JDK1_3 | Enum Constant JDK1_3(Code) | | |
JDK1_4 | Enum Constant JDK1_4(Code) | | J2SE1.4 = Merlin.
|
JDK1_4_1 | Enum Constant JDK1_4_1(Code) | | The following are undocumented transitional targets that we
had used to test VM fixes in update releases. We do not
promise to retain support for them.
|
JDK1_4_2 | Enum Constant JDK1_4_2(Code) | | |
JDK1_5 | Enum Constant JDK1_5(Code) | | Tiger.
|
JDK1_6 | Enum Constant JDK1_6(Code) | | JDK 6.
|
JDK1_7 | Enum Constant JDK1_7(Code) | | JDK 7.
|
JSR14 | Enum Constant JSR14(Code) | | Support for the JSR14 prototype compiler (targeting 1.4 VMs
augmented with a few support classes). This is a transitional
option that will not be supported in the product.
|
majorVersion | final public int majorVersion(Code) | | |
minorVersion | final public int minorVersion(Code) | | |
arrayBinaryCompatibility | public boolean arrayBinaryCompatibility()(Code) | | Starting in 1.5, the compiler uses an array type as
the qualifier for method calls (such as clone) where required by
the language and VM spec. Earlier versions of the compiler
qualified them by Object.
|
boxWithConstructors | public boolean boxWithConstructors()(Code) | | For bootstrapping, we use J2SE1.4's wrapper class constructors
to implement boxing.
|
classLiteralsNoInit | public boolean classLiteralsNoInit()(Code) | | Although we may not have support for class literals, should we
avoid initializing the class that the literal refers to?
See 4468823
|
compilerBootstrap | public boolean compilerBootstrap(Symbol c)(Code) | | For bootstrapping javac only, we do without java.lang.Enum if
necessary.
|
generateCLDCStackmap | public boolean generateCLDCStackmap()(Code) | | Return true if cldc-style stack maps need to be generated.
|
generateEmptyAfterBig | public boolean generateEmptyAfterBig()(Code) | | Do we generate "empty" stackmap slots after double and long?
|
generateStackMapTable | public boolean generateStackMapTable()(Code) | | Beginning in -target 6, we generate stackmap attribute in
compact format.
|
hasClassLiterals | public boolean hasClassLiterals()(Code) | | Does the VM have direct support for class literals?
|
hasEnclosingMethodAttribute | public boolean hasEnclosingMethodAttribute()(Code) | | In J2SE1.5.0, we introduced the "EnclosingMethod" attribute
for improved reflection support.
|
hasInitCause | public boolean hasInitCause()(Code) | | Although we may not have support for class literals, when we
throw a NoClassDefFoundError, should we initialize its cause?
|
hasIterable | public boolean hasIterable()(Code) | | For bootstrapping, we use J2SE1.4's java.util.Collection
instead of java.lang.Iterable.
|
initializeFieldsBeforeSuper | public boolean initializeFieldsBeforeSuper()(Code) | | Beginning in 1.4, we take advantage of the possibility of emitting
code to initialize fields before calling the superclass constructor.
This is allowed by the VM spec, but the verifier refused to allow
it until 1.4. This is necesary to translate some code involving
inner classes. See, for example, 4030374.
|
interfaceFieldsBinaryCompatibility | public boolean interfaceFieldsBinaryCompatibility()(Code) | | Beginning after 1.2, we follow the binary compatibility rules for
interface fields. The 1.2 VMs had bugs handling interface fields
when compiled using binary compatibility (see 4400598), so this is
an accommodation to them.
|
interfaceObjectOverridesBinaryCompatibility | public boolean interfaceObjectOverridesBinaryCompatibility()(Code) | | Beginning in -target 1.5, we follow the binary compatibility
rules for interface methods that redefine Object methods.
Earlier VMs had bugs handling such methods compiled using binary
compatibility (see 4392595, 4398791, 4392595, 4400415).
The VMs were fixed during or soon after 1.4. See 4392595.
|
obeyBinaryCompatibility | public boolean obeyBinaryCompatibility()(Code) | | Beginning with -target 1.2 we obey the JLS rules for binary
compatibility, emitting as the qualifying type of a reference
to a method or field the type of the qualifier. In earlier
targets we use as the qualifying type the class in which the
member was found. The following methods named
binaryCompatibility() indicate places where we vary from this
general rule.
|
requiresIproxy | public boolean requiresIproxy()(Code) | | In -target 1.1 and earlier, the compiler is required to emit
synthetic method definitions in abstract classes for interface
methods that are not overridden. We call them "Miranda" methods.
|
syntheticNameChar | public char syntheticNameChar()(Code) | | Return the character to be used in constructing synthetic
identifiers, where not specified by the JLS.
|
useAnnotationFlag | public boolean useAnnotationFlag()(Code) | | |
useBridgeFlag | public boolean useBridgeFlag()(Code) | | |
useEnumFlag | public boolean useEnumFlag()(Code) | | |
useInnerCacheClass | public boolean useInnerCacheClass()(Code) | | Sometimes we need to create a field to cache a value like a
class literal of the assertions flag. In -target 1.4.2 and
later we create a new synthetic class for this instead of
using the outermost class. See 4401576.
|
usePrivateSyntheticFields | public boolean usePrivateSyntheticFields()(Code) | | Beginning in -target 1.4.2, we make synthetic variables
package-private instead of private. This is to prevent the
necessity of access methods, which effectively relax the
protection of the field but bloat the class files and affect
execution.
|
useStringBuilder | public boolean useStringBuilder()(Code) | | Beginning in 1.5, we have an unsynchronized version of
StringBuffer called StringBuilder that can be used by the
compiler for string concatenation.
|
useSyntheticFlag | public boolean useSyntheticFlag()(Code) | | Beginning in 1.5, we have flag bits we can use instead of
marker attributes.
|
useVarargsFlag | public boolean useVarargsFlag()(Code) | | |
|
|