11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package jdk.internal; 27 28 import java.lang.annotation.*; 29 30 /** 31 * The {@code @HotSpotIntrinsicCandidate} annotation is specific to the Oracle Java 32 * HotSpot Virtual Machine implementation and indicates that an annotated method 33 * may be (but is not guaranteed to be) intrinsified by the HotSpot VM. A method 34 * is intrinsified if the HotSpot VM replaces the annotated method with hand-written 35 * assembly and/or hand-written compiler IR -- a compiler intrinsic -- to improve 36 * performance. The {@code @HotSpotIntrinsicCandidate} annotation is internal to the 37 * Java libraries and is therefore not supposed to have any relevance for application 38 * code. 39 * 40 * Maintainers of the Java libraries must consider the following when 41 * modifying methods annotated with {@code @HotSpotIntrinsicCandidate}. 42 * 43 * <ul> 44 * <li>When modifying a method annotated with {@code @HotSpotIntrinsicCandidate}, 45 * the corresponding intrinsic code in the HotSpot VM implementation must be 46 * updated to match the semantics of the annotated method.</li> 47 * <li>For some annotated methods, the corresponding intrinsic may omit some low-level 48 * checks that would be performed as a matter of course if the intrinsic is implemented 49 * using Java bytecodes. This is because individual Java bytecodes implicitly check 50 * for exceptions like {@code NullPointerException} and {@code ArrayStoreException}. 51 * If such a method is replaced by an intrinsic coded in assembly language, any 52 * checks performed as a matter of normal bytecode operation must be performed | 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package jdk.internal; 27 28 import java.lang.annotation.*; 29 30 /** 31 * The {@code @HotSpotIntrinsicCandidate} annotation is specific to the 32 * HotSpot Virtual Machine. It indicates that an annotated method 33 * may be (but is not guaranteed to be) intrinsified by the HotSpot VM. A method 34 * is intrinsified if the HotSpot VM replaces the annotated method with hand-written 35 * assembly and/or hand-written compiler IR -- a compiler intrinsic -- to improve 36 * performance. The {@code @HotSpotIntrinsicCandidate} annotation is internal to the 37 * Java libraries and is therefore not supposed to have any relevance for application 38 * code. 39 * 40 * Maintainers of the Java libraries must consider the following when 41 * modifying methods annotated with {@code @HotSpotIntrinsicCandidate}. 42 * 43 * <ul> 44 * <li>When modifying a method annotated with {@code @HotSpotIntrinsicCandidate}, 45 * the corresponding intrinsic code in the HotSpot VM implementation must be 46 * updated to match the semantics of the annotated method.</li> 47 * <li>For some annotated methods, the corresponding intrinsic may omit some low-level 48 * checks that would be performed as a matter of course if the intrinsic is implemented 49 * using Java bytecodes. This is because individual Java bytecodes implicitly check 50 * for exceptions like {@code NullPointerException} and {@code ArrayStoreException}. 51 * If such a method is replaced by an intrinsic coded in assembly language, any 52 * checks performed as a matter of normal bytecode operation must be performed |