src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java
changeset 58299 6df94ce3ab2f
parent 54601 c40b2a190173
child 58877 aec7bf35d6f5
equal deleted inserted replaced
58298:0152ad7b38b8 58299:6df94ce3ab2f
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 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.
   700                         res = lcp.get(method);
   700                         res = lcp.get(method);
   701                     }
   701                     }
   702                 }
   702                 }
   703                 if (res != null) {
   703                 if (res != null) {
   704                     // A decorator plugin is trusted since it does not replace
   704                     // A decorator plugin is trusted since it does not replace
   705                     // the method it intrinsifies.
   705                     // the method it intrinsifies. A GeneratedInvocationPlugin
   706                     if (res.isDecorator() || canBeIntrinsified(declaringClass)) {
   706                     // is trusted since it only exists for @NodeIntrinsics and
       
   707                     // @Fold annotated methods (i.e., trusted Graal code).
       
   708                     if (res.isDecorator() || res instanceof GeneratedInvocationPlugin || canBeIntrinsified(declaringClass)) {
   707                         return res;
   709                         return res;
   708                     }
   710                     }
   709                 }
   711                 }
   710                 if (testExtensions != null) {
   712                 if (testExtensions != null) {
   711                     // Avoid the synchronization in the common case that there
   713                     // Avoid the synchronization in the common case that there