Mercurial > hg > graal-compiler
changeset 18702:d854f8a5256f
Merge
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Tue, 16 Dec 2014 23:37:35 +0100 |
parents | 28e46ea20c93 (diff) 08b17b738500 (current diff) |
children | 41d12b67bc9e |
files | |
diffstat | 2 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java Tue Dec 16 13:36:16 2014 -0800 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java Tue Dec 16 23:37:35 2014 +0100 @@ -313,8 +313,7 @@ for (int i = instructions.size() - 1; i >= 0; i--) { LIRInstruction inst = instructions.get(i); boolean adjacent = delayTransferPosition - i == 1; - - if ((!adjacent && inst.hasState()) || inst.destroysCallerSavedRegisters() || leavesRegisterWindow(inst)) { + if (!adjacent || inst.destroysCallerSavedRegisters() || leavesRegisterWindow(inst)) { delayedTransfer = null; } if (inst instanceof SPARCDelayedControlTransfer) { @@ -327,11 +326,12 @@ // We have found a non overlapping LIR instruction which can be delayed ((SPARCTailDelayedLIRInstruction) inst).setDelayedControlTransfer(delayedTransfer); delayedTransfer = null; - if (!adjacent) { - // If not adjacent, we make it adjacent - instructions.remove(i); - instructions.add(delayTransferPosition - 1, inst); - } + // Removed the moving as it causes problems (Nullpointer exceptions) + // if (!adjacent) { + // // If not adjacent, we make it adjacent + // instructions.remove(i); + // instructions.add(delayTransferPosition - 1, inst); + // } } } }
--- a/src/share/vm/classfile/javaClasses.hpp Tue Dec 16 13:36:16 2014 -0800 +++ b/src/share/vm/classfile/javaClasses.hpp Tue Dec 16 23:37:35 2014 +0100 @@ -153,7 +153,12 @@ if (count_offset > 0) { return java_string->int_field(count_offset); } else { - return ((typeArrayOop)java_string->obj_field(value_offset))->length(); + typeArrayOop value_array = ((typeArrayOop)java_string->obj_field(value_offset)); + if(value_array == NULL) { + return 0; + } else { + return value_array->length(); + } } } static int utf8_length(oop java_string);