src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/MethodHandlePlugin.java
equal
deleted
inserted
replaced
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. |
96 // deoptimized since the necessary frame state cannot be reconstructed. |
96 // deoptimized since the necessary frame state cannot be reconstructed. |
97 // As such, it needs to recursively inline everything. |
97 // As such, it needs to recursively inline everything. |
98 inlineEverything = args.length != argumentsList.size(); |
98 inlineEverything = args.length != argumentsList.size(); |
99 } |
99 } |
100 ResolvedJavaMethod targetMethod = callTarget.targetMethod(); |
100 ResolvedJavaMethod targetMethod = callTarget.targetMethod(); |
101 if (inlineEverything && !targetMethod.hasBytecodes()) { |
101 if (inlineEverything && !targetMethod.hasBytecodes() && !b.getReplacements().hasSubstitution(targetMethod, b.bci())) { |
102 // we need to force-inline but we can not, leave the invoke as-is |
102 // we need to force-inline but we can not, leave the invoke as-is |
103 return false; |
103 return false; |
104 } |
104 } |
105 |
105 |
106 int recursionDepth = countRecursiveInlining(b, targetMethod); |
106 int recursionDepth = countRecursiveInlining(b, targetMethod); |