Mercurial > hg > graal-compiler
diff src/share/vm/opto/machnode.cpp @ 235:9c2ecc2ffb12 jdk7-b31
Merge
author | trims |
---|---|
date | Fri, 11 Jul 2008 01:14:44 -0700 |
parents | d1605aabd0a1 1e026f8da827 |
children | 98cb887364d3 |
line wrap: on
line diff
--- a/src/share/vm/opto/machnode.cpp Thu Jul 03 11:01:32 2008 -0700 +++ b/src/share/vm/opto/machnode.cpp Fri Jul 11 01:14:44 2008 -0700 @@ -262,17 +262,19 @@ // Now we have collected every part of the ADLC MEMORY_INTER. // See if it adds up to a base + offset. if (index != NULL) { - if (!index->is_Con()) { - const TypeNarrowOop* narrowoop = index->bottom_type()->isa_narrowoop(); - if (narrowoop != NULL) { - // Memory references through narrow oops have a - // funny base so grab the type from the index. - adr_type = narrowoop->make_oopptr(); - return NULL; - } + const Type* t_index = index->bottom_type(); + if (t_index->isa_narrowoop()) { // EncodeN, LoadN, LoadConN, LoadNKlass. + // Memory references through narrow oops have a + // funny base so grab the type from the index: + // [R12 + narrow_oop_reg<<3 + offset] + assert(base == NULL, "Memory references through narrow oops have no base"); + offset = disp; + adr_type = t_index->make_ptr()->add_offset(offset); + return NULL; + } else if (!index->is_Con()) { disp = Type::OffsetBot; } else if (disp != Type::OffsetBot) { - const TypeX* ti = index->bottom_type()->isa_intptr_t(); + const TypeX* ti = t_index->isa_intptr_t(); if (ti == NULL) { disp = Type::OffsetBot; // a random constant?? } else {