src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
33 import jdk.vm.ci.meta.Signature; |
33 import jdk.vm.ci.meta.Signature; |
34 |
34 |
35 /** |
35 /** |
36 * Denotes a method whose body is used by a compiler as the substitute (or intrinsification) of |
36 * Denotes a method whose body is used by a compiler as the substitute (or intrinsification) of |
37 * another method. The exact mechanism used to do the substitution is compiler dependent but every |
37 * another method. The exact mechanism used to do the substitution is compiler dependent but every |
38 * compiler should require substitute methods to be annotated with {@link MethodSubstitution}. In |
38 * compiler should require substitute methods to be annotated with {@link MethodSubstitution}. |
39 * addition, a compiler is recommended to implement {@link MethodSubstitutionRegistry} to advertise |
|
40 * the mechanism by which it supports registration of method substitutes. |
|
41 * |
39 * |
42 * A compiler may support partial intrinsification where only a part of a method is implemented by |
40 * A compiler may support partial intrinsification where only a part of a method is implemented by |
43 * the compiler. The unsupported path is expressed by a call to either the original or substitute |
41 * the compiler. The unsupported path is expressed by a call to either the original or substitute |
44 * method from within the substitute method. Such as call is a <i>partial intrinsic exit</i>. |
42 * method from within the substitute method. Such as call is a <i>partial intrinsic exit</i>. |
45 * |
43 * |