--- /dev/null 2015-06-17 09:50:53.721014618 +0200 +++ new/src/java.base/share/classes/jdk/internal/HotSpotIntrinsicCandidate.java 2015-06-25 12:09:50.974654635 +0200 @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2015, 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 + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.internal; + +import java.lang.annotation.*; + +/** + * The {@code @HotSpotIntrinsicCandidate} annotation is specific to the Oracle Java + * HotSpot Virtual Machine implementation and indicates that an annotated method + * may be (but is not guaranteed to be) intrinsified by the HotSpot VM. A method + * is intrinsified if the HotSpot VM replaces the annotated method with hand-written + * assembly and/or hand-written compiler IR -- a compiler intrinsic -- to improve + * performance. The {@code @HotSpotIntrinsicCandidate} annotation is internal to the + * Java libraries and is therefore not supposed to have any relevance for application + * code. + * + * Maintainers of the Java libraries must consider the following when + * modifying methods annotated with {@code @HotSpotIntrinsicCandidate}. + * + * + * + * Maintainers of the HotSpot VM must consider the following when modifying + * intrinsics. + * + * + * + * Persons not directly involved with maintaining the Java libraries or the + * HotSpot VM can safely ignore the fact that a method is annotated with + * {@code @HotSpotIntrinsicCandidate}. + * + * The HotSpot VM defines (internally) a list of intrinsics. Not all intrinsic + * are available on all platforms supported by the HotSpot VM. Furthermore, + * the availability of an intrinsic on a given platform depends on the + * configuration of the HotSpot VM (e.g., the set of VM flags enabled). + * Therefore, annotating a method with {@code @HotSpotIntrinsicCandidate} does + * not guarantee that the marked method is intrinsified by the HotSpot VM. + * + * If the {@code CheckIntrinsics} VM flag is enabled, the HotSpot VM checks + * (when loading a class) that (1) all methods of that class that are also on + * the VM's list of intrinsics are annotated with {@code @HotSpotIntrinsicCandidate} + * and that (2) for all methods of that class annotated with + * {@code @HotSpotIntrinsicCandidate} there is an intrinsic in the list. + * + * @since 1.9 + */ +@Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) +@Retention(RetentionPolicy.RUNTIME) +public @interface HotSpotIntrinsicCandidate { +}