SUGGESTED FIX
*** src/share/vm/opto/parse1.cpp- Tue Jun 16 21:09:31 2009
--- src/share/vm/opto/parse1.cpp Tue Jun 30 11:20:14 2009
***************
*** 1,10 ****
#ifdef USE_PRAGMA_IDENT_SRC
! #pragma ident "@(#)parse1.cpp 1.462 08/08/24 03:58:23 JVM"
#endif
/*
! * @(#)parse1.cpp 1.462 08/08/24
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
--- 1,10 ----
#ifdef USE_PRAGMA_IDENT_SRC
! #pragma ident "@(#)parse1.cpp 1.463 09/06/10 23:15:07 JVM"
#endif
/*
! * @(#)parse1.cpp 1.463 09/06/10
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
***************
*** 246,256 ****
if (!live_oops.at(index)) {
if (C->log() != NULL) {
C->log()->elem("OSR_mismatch local_index='%d'",index);
}
! set_local(index, top());
// and ignore it for the loads
continue;
}
}
--- 246,256 ----
if (!live_oops.at(index)) {
if (C->log() != NULL) {
C->log()->elem("OSR_mismatch local_index='%d'",index);
}
! set_local(index, null());
// and ignore it for the loads
continue;
}
}
***************
*** 287,296 ****
--- 287,302 ----
for (index = 0; index < max_locals; index++) {
if (stopped()) break;
Node* l = local(index);
if (l->is_top()) continue; // nothing here
const Type *type = osr_block->local_type_at(index);
+ if (type->isa_oopptr() != NULL) {
+ if (!live_oops.at(index)) {
+ // skip type check for dead oops
+ continue;
+ }
+ }
set_local(index, check_interpreter_type(l, type, bad_type_exit));
}
for (index = 0; index < sp(); index++) {
if (stopped()) break;
*** src/share/vm/ci/ciTypeFlow.hpp- Tue Jun 16 21:06:15 2009
--- src/share/vm/ci/ciTypeFlow.hpp Tue Jun 30 11:20:14 2009
***************
*** 1,10 ****
#ifdef USE_PRAGMA_IDENT_HDR
! #pragma ident "@(#)ciTypeFlow.hpp 1.17 05/03/01 20:03:28 JVM"
#endif
/*
! * @(#)ciTypeFlow.hpp 1.17 05/03/01
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
--- 1,10 ----
#ifdef USE_PRAGMA_IDENT_HDR
! #pragma ident "@(#)ciTypeFlow.hpp 1.18 09/06/10 23:15:08 JVM"
#endif
/*
! * @(#)ciTypeFlow.hpp 1.18 09/06/10
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
***************
*** 318,336 ****
--- 318,348 ----
void do_newarray(ciByteCodeStream* str);
void do_putfield(ciByteCodeStream* str);
void do_putstatic(ciByteCodeStream* str);
void do_ret(ciByteCodeStream* str);
+ void overwrite_local_double_long(int index) {
+ // Invalidate the previous local if it contains first half of
+ // a double or long value since it's second half is being overwritten.
+ int prev_index = index - 1;
+ if (prev_index >= 0 &&
+ (is_double(type_at(local(prev_index))) ||
+ is_long(type_at(local(prev_index))))) {
+ set_type_at(local(prev_index), bottom_type());
+ }
+ }
+
void load_local_object(int index) {
ciType* type = type_at(local(index));
assert(is_reference(type), "must be reference type");
push(type);
}
void store_local_object(int index) {
ciType* type = pop_value();
assert(is_reference(type) || type->is_return_address(),
"must be reference type or return address");
+ overwrite_local_double_long(index);
set_type_at(local(index), type);
}
void load_local_double(int index) {
ciType* type = type_at(local(index));
***************
*** 343,352 ****
--- 355,365 ----
void store_local_double(int index) {
ciType* type2 = pop_value();
ciType* type = pop_value();
assert(is_double(type), "must be double");
assert(type2 == double2_type(), "must be 2nd half");
+ overwrite_local_double_long(index);
set_type_at(local(index), type);
set_type_at(local(index+1), type2);
}
void load_local_float(int index) {
***************
*** 355,364 ****
--- 368,378 ----
push(type);
}
void store_local_float(int index) {
ciType* type = pop_value();
assert(is_float(type), "must be float type");
+ overwrite_local_double_long(index);
set_type_at(local(index), type);
}
void load_local_int(int index) {
ciType* type = type_at(local(index));
***************
*** 366,375 ****
--- 380,390 ----
push(type);
}
void store_local_int(int index) {
ciType* type = pop_value();
assert(is_int(type), "must be int type");
+ overwrite_local_double_long(index);
set_type_at(local(index), type);
}
void load_local_long(int index) {
ciType* type = type_at(local(index));
***************
*** 382,391 ****
--- 397,407 ----
void store_local_long(int index) {
ciType* type2 = pop_value();
ciType* type = pop_value();
assert(is_long(type), "must be long");
assert(type2 == long2_type(), "must be 2nd half");
+ overwrite_local_double_long(index);
set_type_at(local(index), type);
set_type_at(local(index+1), type2);
}
// Stop interpretation of this path with a trap.
|