19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 package org.graalvm.compiler.api.replacements; 24 25 import java.lang.annotation.ElementType; 26 import java.lang.annotation.Retention; 27 import java.lang.annotation.RetentionPolicy; 28 import java.lang.annotation.Target; 29 30 /** 31 * A snippet is a Graal graph expressed as a Java source method. Snippets are used for lowering 32 * nodes that have runtime dependent semantics (e.g. the {@code CHECKCAST} bytecode). 33 */ 34 @Retention(RetentionPolicy.RUNTIME) 35 @Target(ElementType.METHOD) 36 public @interface Snippet { 37 38 /** 39 * Denotes a snippet parameter representing 0 or more arguments that will be bound during 40 * snippet template instantiation. During snippet template creation, its value must be an array 41 * whose length specifies the number of arguments (the contents of the array are ignored) bound 42 * to the parameter during instantiation. 43 */ 44 @Retention(RetentionPolicy.RUNTIME) 45 @Target(ElementType.PARAMETER) 46 public @interface VarargsParameter { 47 } 48 49 /** 50 * Denotes a snippet parameter that will bound to a constant value during snippet template 51 * instantiation. 52 */ 53 @Retention(RetentionPolicy.RUNTIME) 54 @Target(ElementType.PARAMETER) 55 public @interface ConstantParameter { 56 } 57 58 /** | 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 package org.graalvm.compiler.api.replacements; 24 25 import java.lang.annotation.ElementType; 26 import java.lang.annotation.Retention; 27 import java.lang.annotation.RetentionPolicy; 28 import java.lang.annotation.Target; 29 30 /** 31 * A snippet is a Graal graph expressed as a Java source method. Snippets are used for lowering 32 * nodes that have runtime dependent semantics (e.g. the {@code CHECKCAST} bytecode). 33 */ 34 @Retention(RetentionPolicy.RUNTIME) 35 @Target(ElementType.METHOD) 36 public @interface Snippet { 37 38 /** 39 * A partial intrinsic exits by (effectively) calling the intrinsified method. Normally, this 40 * call must use exactly the same arguments as the call that is being intrinsified. For well 41 * known snippets that are used after frame state assignment, we want to relax this restriction. 42 */ 43 boolean allowPartialIntrinsicArgumentMismatch() default false; 44 45 /** 46 * Denotes a snippet parameter representing 0 or more arguments that will be bound during 47 * snippet template instantiation. During snippet template creation, its value must be an array 48 * whose length specifies the number of arguments (the contents of the array are ignored) bound 49 * to the parameter during instantiation. 50 */ 51 @Retention(RetentionPolicy.RUNTIME) 52 @Target(ElementType.PARAMETER) 53 public @interface VarargsParameter { 54 } 55 56 /** 57 * Denotes a snippet parameter that will bound to a constant value during snippet template 58 * instantiation. 59 */ 60 @Retention(RetentionPolicy.RUNTIME) 61 @Target(ElementType.PARAMETER) 62 public @interface ConstantParameter { 63 } 64 65 /** |