< prev index next >

src/hotspot/share/opto/stringopts.cpp

Print this page

        

@@ -1210,10 +1210,12 @@
     index->init_req(1, __ intcon(0));
     kit.gvn().set_type(index, TypeInt::INT);
     kit.set_control(loop);
     Node* sizeTable = fetch_static_field(kit, size_table_field);
 
+    sizeTable = kit.access_resolve_for_read(sizeTable);
+
     Node* value = kit.load_array_element(NULL, sizeTable, index, TypeAryPtr::INTS);
     C->record_for_igvn(value);
     Node* limit = __ CmpI(phi, value);
     Node* limitb = __ Bool(limit, BoolTest::le);
     IfNode* iff2 = kit.create_and_map_if(kit.control(), limitb, PROB_MIN, COUNT_UNKNOWN);

@@ -1546,10 +1548,12 @@
 
 // Compress copy contents of the byte/char String str into dst_array starting at index start.
 Node* PhaseStringOpts::copy_string(GraphKit& kit, Node* str, Node* dst_array, Node* dst_coder, Node* start) {
   Node* src_array = kit.load_String_value(kit.control(), str);
 
+  src_array = kit.access_resolve_for_read(src_array);
+
   IdealKit ideal(&kit, true, true);
   IdealVariable count(ideal); __ declarations_done();
 
   if (str->is_Con()) {
     // Constant source string
< prev index next >