diff --git a/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/StandardGraphBuilderPlugins.java b/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/StandardGraphBuilderPlugins.java index 1c2283b029da..d8a8f3866ae8 100644 --- a/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/StandardGraphBuilderPlugins.java +++ b/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/StandardGraphBuilderPlugins.java @@ -2621,7 +2621,7 @@ public boolean isApplicable(Architecture arch) { private static void registerStringCodingPlugins(InvocationPlugins plugins) { Registration r = new Registration(plugins, "java.lang.StringCoding"); - r.register(new InvocationPlugin("implEncodeISOArray", byte[].class, int.class, byte[].class, int.class, int.class) { + r.register(new InvocationPlugin("encodeISOArray0", byte[].class, int.class, byte[].class, int.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode sa, ValueNode sp, ValueNode da, ValueNode dp, ValueNode len) { @@ -2634,7 +2634,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec } } }); - r.register(new InvocationPlugin("implEncodeAsciiArray", char[].class, int.class, byte[].class, int.class, int.class) { + r.register(new InvocationPlugin("encodeAsciiArray0", char[].class, int.class, byte[].class, int.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode sa, ValueNode sp, ValueNode da, ValueNode dp, ValueNode len) { @@ -2646,17 +2646,10 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec } } }); - r.register(new InvocationPlugin("countPositives", byte[].class, int.class, int.class) { + r.register(new InvocationPlugin("countPositives0", byte[].class, int.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode ba, ValueNode off, ValueNode len) { try (InvocationPluginHelper helper = new InvocationPluginHelper(b, targetMethod)) { - helper.intrinsicRangeCheck(off, Condition.LT, ConstantNode.forInt(0)); - helper.intrinsicRangeCheck(len, Condition.LT, ConstantNode.forInt(0)); - - ValueNode arrayLength = b.add(new ArrayLengthNode(ba)); - ValueNode limit = b.add(AddNode.create(off, len, NodeView.DEFAULT)); - helper.intrinsicRangeCheck(arrayLength, Condition.LT, limit); - ValueNode array = helper.arrayElementPointer(ba, JavaKind.Byte, off); b.addPush(JavaKind.Int, new CountPositivesNode(array, len)); return true;