# HG changeset patch # User Andreas Woess # Date 1332260037 -3600 # Node ID 9ec2917fd0de3e24eec69938a9d7f80b9bdb79cb # Parent 276e146145310f157045f0fe47c91b4d741cc1de Allow ints to be put into a virtual long array. diff -r 276e14614531 -r 9ec2917fd0de src/share/vm/graal/graalCodeInstaller.cpp --- a/src/share/vm/graal/graalCodeInstaller.cpp Tue Mar 20 14:43:09 2012 +0100 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Tue Mar 20 17:13:57 2012 +0100 @@ -179,6 +179,7 @@ oop type = CiVirtualObject::type(value); int id = CiVirtualObject::id(value); klassOop klass = java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(type)); + bool isLongArray = klass == Universe::longArrayKlassObj(); for (jint i = 0; i < objects->length(); i++) { ObjectValue* obj = (ObjectValue*) objects->at(i); @@ -198,6 +199,17 @@ ScopeValue* cur_second = NULL; ScopeValue* value = get_hotspot_value(((oop*) values->base(T_OBJECT))[i], total_frame_size, objects, cur_second); + if (isLongArray && cur_second == NULL) { + // we're trying to put ints into a long array... this isn't really valid, but it's used for some optimizations. + // add an int 0 constant +#ifdef BIG_ENDIAN + cur_second = value; + value = new ConstantIntValue(0); +#else + cur_second = new ConstantIntValue(0); +#endif + } + if (cur_second != NULL) { sv->field_values()->append(cur_second); }