src/share/classes/com/sun/tools/javac/jvm/Target.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 46,66 **** JDK1_3("1.3", 47, 0), /** J2SE1.4 = Merlin. */ JDK1_4("1.4", 48, 0), - /** 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. */ - JSR14("jsr14", 48, 0), - - /** 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_1("1.4.1", 48, 0), - JDK1_4_2("1.4.2", 48, 0), - /** Tiger. */ JDK1_5("1.5", 49, 0), /** JDK 6. */ JDK1_6("1.6", 50, 0), --- 46,55 ----
*** 173,199 **** */ public boolean interfaceObjectOverridesBinaryCompatibility() { return compareTo(JDK1_5) >= 0; } ! /** 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. */ public boolean usePrivateSyntheticFields() { ! return compareTo(JDK1_4_2) < 0; } /** 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. */ public boolean useInnerCacheClass() { ! return compareTo(JDK1_4_2) >= 0; } /** Return true if cldc-style stack maps need to be generated. */ public boolean generateCLDCStackmap() { return false; --- 162,188 ---- */ public boolean interfaceObjectOverridesBinaryCompatibility() { return compareTo(JDK1_5) >= 0; } ! /** Beginning in -target 1.5, 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. */ public boolean usePrivateSyntheticFields() { ! return compareTo(JDK1_5) < 0; } /** Sometimes we need to create a field to cache a value like a ! * class literal of the assertions flag. In -target 1.5 and * later we create a new synthetic class for this instead of * using the outermost class. See 4401576. */ public boolean useInnerCacheClass() { ! return compareTo(JDK1_5) >= 0; } /** Return true if cldc-style stack maps need to be generated. */ public boolean generateCLDCStackmap() { return false;
*** 274,284 **** /** Although we may not have support for class literals, should we * avoid initializing the class that the literal refers to? * See 4468823 */ public boolean classLiteralsNoInit() { ! return compareTo(JDK1_4_2) >= 0; } /** Although we may not have support for class literals, when we * throw a NoClassDefFoundError, should we initialize its cause? */ --- 263,273 ---- /** Although we may not have support for class literals, should we * avoid initializing the class that the literal refers to? * See 4468823 */ public boolean classLiteralsNoInit() { ! return compareTo(JDK1_5) >= 0; } /** Although we may not have support for class literals, when we * throw a NoClassDefFoundError, should we initialize its cause? */
*** 298,321 **** */ public boolean hasIterable() { return compareTo(JDK1_5) >= 0; } - /** For bootstrapping javac only, we do without java.lang.Enum if - * necessary. - */ - public boolean compilerBootstrap(Symbol c) { - return - this == JSR14 && - (c.flags() & Flags.ENUM) != 0 && - c.flatName().toString().startsWith("com.sun.tools.") - // && !Target.class.getSuperclass().getName().equals("java.lang.Enum") - ; - } - /** In J2SE1.5.0, we introduced the "EnclosingMethod" attribute * for improved reflection support. */ public boolean hasEnclosingMethodAttribute() { ! return compareTo(JDK1_5) >= 0 || this == JSR14; } } --- 287,298 ---- */ public boolean hasIterable() { return compareTo(JDK1_5) >= 0; } /** In J2SE1.5.0, we introduced the "EnclosingMethod" attribute * for improved reflection support. */ public boolean hasEnclosingMethodAttribute() { ! return compareTo(JDK1_5) >= 0; } }