8155794: Move Objects.checkIndex BiFunction accepting methods to an internal package
Reviewed-by: shade, vlivanov
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp Thu May 05 17:16:08 2016 -0700
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp Thu May 05 18:14:51 2016 -0700
@@ -117,6 +117,7 @@
template(java_util_Hashtable, "java/util/Hashtable") \
template(java_lang_Compiler, "java/lang/Compiler") \
template(jdk_internal_misc_Signal, "jdk/internal/misc/Signal") \
+ template(jdk_internal_util_Preconditions, "jdk/internal/util/Preconditions") \
template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \
template(getBootClassPathEntryForClass_name, "getBootClassPathEntryForClass") \
template(jdk_internal_vm_PostVMInitHook, "jdk/internal/vm/PostVMInitHook") \
@@ -940,8 +941,8 @@
do_intrinsic(_equalsL, java_lang_StringLatin1,equals_name, equalsB_signature, F_S) \
do_intrinsic(_equalsU, java_lang_StringUTF16, equals_name, equalsB_signature, F_S) \
\
- do_intrinsic(_Objects_checkIndex, java_util_Objects, checkIndex_name, Objects_checkIndex_signature, F_S) \
- do_signature(Objects_checkIndex_signature, "(IILjava/util/function/BiFunction;)I") \
+ do_intrinsic(_Preconditions_checkIndex, jdk_internal_util_Preconditions, checkIndex_name, Preconditions_checkIndex_signature, F_S) \
+ do_signature(Preconditions_checkIndex_signature, "(IILjava/util/function/BiFunction;)I") \
\
do_class(java_nio_Buffer, "java/nio/Buffer") \
do_intrinsic(_checkIndex, java_nio_Buffer, checkIndex_name, int_int_signature, F_R) \
--- a/hotspot/src/share/vm/opto/c2compiler.cpp Thu May 05 17:16:08 2016 -0700
+++ b/hotspot/src/share/vm/opto/c2compiler.cpp Thu May 05 18:14:51 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -545,7 +545,7 @@
case vmIntrinsics::_updateByteBufferAdler32:
case vmIntrinsics::_profileBoolean:
case vmIntrinsics::_isCompileConstant:
- case vmIntrinsics::_Objects_checkIndex:
+ case vmIntrinsics::_Preconditions_checkIndex:
break;
default:
return false;
--- a/hotspot/src/share/vm/opto/library_call.cpp Thu May 05 17:16:08 2016 -0700
+++ b/hotspot/src/share/vm/opto/library_call.cpp Thu May 05 18:14:51 2016 -0700
@@ -261,7 +261,7 @@
bool inline_native_getLength();
bool inline_array_copyOf(bool is_copyOfRange);
bool inline_array_equals(StrIntrinsicNode::ArgEnc ae);
- bool inline_objects_checkIndex();
+ bool inline_preconditions_checkIndex();
void copy_to_clone(Node* obj, Node* alloc_obj, Node* obj_size, bool is_array, bool card_mark);
bool inline_native_clone(bool is_virtual);
bool inline_native_Reflection_getCallerClass();
@@ -714,7 +714,7 @@
case vmIntrinsics::_copyOfRange: return inline_array_copyOf(true);
case vmIntrinsics::_equalsB: return inline_array_equals(StrIntrinsicNode::LL);
case vmIntrinsics::_equalsC: return inline_array_equals(StrIntrinsicNode::UU);
- case vmIntrinsics::_Objects_checkIndex: return inline_objects_checkIndex();
+ case vmIntrinsics::_Preconditions_checkIndex: return inline_preconditions_checkIndex();
case vmIntrinsics::_clone: return inline_native_clone(intrinsic()->is_virtual());
case vmIntrinsics::_allocateUninitializedArray: return inline_unsafe_newArray(true);
@@ -1141,7 +1141,7 @@
return true;
}
-bool LibraryCallKit::inline_objects_checkIndex() {
+bool LibraryCallKit::inline_preconditions_checkIndex() {
Node* index = argument(0);
Node* length = argument(1);
if (too_many_traps(Deoptimization::Reason_intrinsic) || too_many_traps(Deoptimization::Reason_range_check)) {