src/share/vm/opto/library_call.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/library_call.cpp	Fri Feb 26 15:20:27 2016
--- new/src/share/vm/opto/library_call.cpp	Fri Feb 26 15:20:27 2016

*** 2539,2552 **** --- 2539,2554 ---- alias_type->field() != NULL || alias_type->element() != NULL, "field, array element or unknown"); bool mismatched = false; if (alias_type->element() != NULL || alias_type->field() != NULL) { BasicType bt; if (alias_type->element() != NULL) { const Type* element = alias_type->element(); + // Use address type to get the element type. Alias type doesn't provide + // enough information (e.g., doesn't differentiate between byte[] and boolean[]). + const Type* element = adr_type->is_aryptr()->elem(); bt = element->isa_narrowoop() ? T_OBJECT : element->array_element_basic_type(); } else { ! bt = alias_type->field()->type()->basic_type(); ! bt = alias_type->field()->layout_type(); } if (bt == T_ARRAY) { // accessing an array field with getObject is not a mismatch bt = T_OBJECT; }
*** 2559,2569 **** --- 2561,2571 ---- if (!is_store) { Node* p = NULL; // Try to constant fold a load from a constant field ciField* field = alias_type->field(); if (heap_base_oop != top() && ! field != NULL && field->is_constant() && field->layout_type() == type) { ! field != NULL && field->is_constant() && !mismatched) { // final or stable field const Type* con_type = Type::make_constant(alias_type->field(), heap_base_oop); if (con_type != NULL) { p = makecon(con_type); }

src/share/vm/opto/library_call.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File