@@ -940,11 +940,7 @@ inline Node* LibraryCallKit::generate_limit_guard(Node* offset,
940940}
941941
942942// Emit range checks for the given String.value byte array
943- void LibraryCallKit::generate_string_range_check (Node* array,
944- Node* offset,
945- Node* count,
946- bool char_count,
947- bool halt_on_oob) {
943+ void LibraryCallKit::generate_string_range_check (Node* array, Node* offset, Node* count, bool char_count) {
948944 if (stopped ()) {
949945 return ; // already stopped
950946 }
@@ -962,17 +958,10 @@ void LibraryCallKit::generate_string_range_check(Node* array,
962958 generate_limit_guard (offset, count, load_array_length (array), bailout);
963959
964960 if (bailout->req () > 1 ) {
965- if (halt_on_oob) {
966- bailout = _gvn.transform (bailout)->as_Region ();
967- Node* frame = _gvn.transform (new ParmNode (C->start (), TypeFunc::FramePtr));
968- Node* halt = _gvn.transform (new HaltNode (bailout, frame, " unexpected guard failure in intrinsic" ));
969- C->root ()->add_req (halt);
970- } else {
971- PreserveJVMState pjvms (this );
972- set_control (_gvn.transform (bailout));
973- uncommon_trap (Deoptimization::Reason_intrinsic,
974- Deoptimization::Action_maybe_recompile);
975- }
961+ PreserveJVMState pjvms (this );
962+ set_control (_gvn.transform (bailout));
963+ uncommon_trap (Deoptimization::Reason_intrinsic,
964+ Deoptimization::Action_maybe_recompile);
976965 }
977966}
978967
@@ -1130,7 +1119,6 @@ bool LibraryCallKit::inline_array_equals(StrIntrinsicNode::ArgEnc ae) {
11301119
11311120
11321121// ------------------------------inline_countPositives------------------------------
1133- // int java.lang.StringCoding#countPositives0(byte[] ba, int off, int len)
11341122bool LibraryCallKit::inline_countPositives () {
11351123 if (too_many_traps (Deoptimization::Reason_intrinsic)) {
11361124 return false ;
@@ -1142,14 +1130,13 @@ bool LibraryCallKit::inline_countPositives() {
11421130 Node* offset = argument (1 );
11431131 Node* len = argument (2 );
11441132
1145- if (VerifyIntrinsicChecks) {
1146- ba = must_be_not_null (ba, true );
1147- generate_string_range_check (ba, offset, len, false , true );
1148- if (stopped ()) {
1149- return true ;
1150- }
1151- }
1133+ ba = must_be_not_null (ba, true );
11521134
1135+ // Range checks
1136+ generate_string_range_check (ba, offset, len, false );
1137+ if (stopped ()) {
1138+ return true ;
1139+ }
11531140 Node* ba_start = array_element_address (ba, offset, T_BYTE);
11541141 Node* result = new CountPositivesNode (control (), memory (TypeAryPtr::BYTES), ba_start, len);
11551142 set_result (_gvn.transform (result));
@@ -6180,9 +6167,6 @@ CallStaticJavaNode* LibraryCallKit::get_uncommon_trap_from_success_proj(Node* no
61806167}
61816168
61826169// -------------inline_encodeISOArray-----------------------------------
6183- // int sun.nio.cs.ISO_8859_1.Encoder#encodeISOArray0(byte[] sa, int sp, byte[] da, int dp, int len)
6184- // int java.lang.StringCoding#encodeISOArray0(byte[] sa, int sp, byte[] da, int dp, int len)
6185- // int java.lang.StringCoding#encodeAsciiArray0(char[] sa, int sp, byte[] da, int dp, int len)
61866170// encode char[] to byte[] in ISO_8859_1 or ASCII
61876171bool LibraryCallKit::inline_encodeISOArray (bool ascii) {
61886172 assert (callee ()->signature ()->size () == 5 , " encodeISOArray has 5 parameters" );
@@ -6193,14 +6177,8 @@ bool LibraryCallKit::inline_encodeISOArray(bool ascii) {
61936177 Node *dst_offset = argument (3 );
61946178 Node *length = argument (4 );
61956179
6196- // Cast source & target arrays to not-null
6197- if (VerifyIntrinsicChecks) {
6198- src = must_be_not_null (src, true );
6199- dst = must_be_not_null (dst, true );
6200- if (stopped ()) {
6201- return true ;
6202- }
6203- }
6180+ src = must_be_not_null (src, true );
6181+ dst = must_be_not_null (dst, true );
62046182
62056183 const TypeAryPtr* src_type = src->Value (&_gvn)->isa_aryptr ();
62066184 const TypeAryPtr* dst_type = dst->Value (&_gvn)->isa_aryptr ();
@@ -6217,15 +6195,6 @@ bool LibraryCallKit::inline_encodeISOArray(bool ascii) {
62176195 return false ;
62186196 }
62196197
6220- // Check source & target bounds
6221- if (VerifyIntrinsicChecks) {
6222- generate_string_range_check (src, src_offset, length, src_elem == T_BYTE, true );
6223- generate_string_range_check (dst, dst_offset, length, false , true );
6224- if (stopped ()) {
6225- return true ;
6226- }
6227- }
6228-
62296198 Node* src_start = array_element_address (src, src_offset, T_CHAR);
62306199 Node* dst_start = array_element_address (dst, dst_offset, dst_elem);
62316200 // 'src_start' points to src array + scaled offset
0 commit comments