hotspot/src/share/vm/opto/machnode.cpp
changeset 762 1b26adb5fea1
parent 360 21d113ecbf6a
child 767 64fb1fd7186d
equal deleted inserted replaced
761:312de898447e 762:1b26adb5fea1
   260     intptr_t disp = oper->constant_disp();
   260     intptr_t disp = oper->constant_disp();
   261     int scale = oper->scale();
   261     int scale = oper->scale();
   262     // Now we have collected every part of the ADLC MEMORY_INTER.
   262     // Now we have collected every part of the ADLC MEMORY_INTER.
   263     // See if it adds up to a base + offset.
   263     // See if it adds up to a base + offset.
   264     if (index != NULL) {
   264     if (index != NULL) {
   265       if (!index->is_Con()) {
   265       const TypeNarrowOop* narrowoop = index->bottom_type()->isa_narrowoop();
   266         const TypeNarrowOop* narrowoop = index->bottom_type()->isa_narrowoop();
   266       if (narrowoop != NULL) { // EncodeN, LoadN, LoadConN, LoadNKlass.
   267         if (narrowoop != NULL) {
   267         // Memory references through narrow oops have a
   268           // Memory references through narrow oops have a
   268         // funny base so grab the type from the index:
   269           // funny base so grab the type from the index.
   269         // [R12 + narrow_oop_reg<<3 + offset]
   270           adr_type = narrowoop->make_oopptr();
   270         assert(base == NULL, "Memory references through narrow oops have no base");
   271           return NULL;
   271         offset = disp;
   272         }
   272         adr_type = narrowoop->make_oopptr()->add_offset(offset);
       
   273         return NULL;
       
   274       } else if (!index->is_Con()) {
   273         disp = Type::OffsetBot;
   275         disp = Type::OffsetBot;
   274       } else if (disp != Type::OffsetBot) {
   276       } else if (disp != Type::OffsetBot) {
   275         const TypeX* ti = index->bottom_type()->isa_intptr_t();
   277         const TypeX* ti = index->bottom_type()->isa_intptr_t();
   276         if (ti == NULL) {
   278         if (ti == NULL) {
   277           disp = Type::OffsetBot;  // a random constant??
   279           disp = Type::OffsetBot;  // a random constant??