--- a/hotspot/src/share/vm/opto/machnode.cpp Fri Apr 11 09:56:35 2008 -0400
+++ b/hotspot/src/share/vm/opto/machnode.cpp Sun Apr 13 17:43:42 2008 -0400
@@ -263,6 +263,13 @@
// 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;
+ }
disp = Type::OffsetBot;
} else if (disp != Type::OffsetBot) {
const TypeX* ti = index->bottom_type()->isa_intptr_t();