Fri, 06 Jun 2008 13:43:36 -0400
Merge
1.1 --- a/src/cpu/sparc/vm/assembler_sparc.cpp Tue Jun 03 15:38:31 2008 -0700 1.2 +++ b/src/cpu/sparc/vm/assembler_sparc.cpp Fri Jun 06 13:43:36 2008 -0400 1.3 @@ -3643,6 +3643,7 @@ 1.4 1.5 void MacroAssembler::encode_heap_oop(Register src, Register dst) { 1.6 assert (UseCompressedOops, "must be compressed"); 1.7 + verify_oop(src); 1.8 Label done; 1.9 if (src == dst) { 1.10 // optimize for frequent case src == dst 1.11 @@ -3664,12 +3665,14 @@ 1.12 1.13 void MacroAssembler::encode_heap_oop_not_null(Register r) { 1.14 assert (UseCompressedOops, "must be compressed"); 1.15 + verify_oop(r); 1.16 sub(r, G6_heapbase, r); 1.17 srlx(r, LogMinObjAlignmentInBytes, r); 1.18 } 1.19 1.20 void MacroAssembler::encode_heap_oop_not_null(Register src, Register dst) { 1.21 assert (UseCompressedOops, "must be compressed"); 1.22 + verify_oop(src); 1.23 sub(src, G6_heapbase, dst); 1.24 srlx(dst, LogMinObjAlignmentInBytes, dst); 1.25 } 1.26 @@ -3682,11 +3685,13 @@ 1.27 bpr(rc_nz, true, Assembler::pt, dst, done); 1.28 delayed() -> add(dst, G6_heapbase, dst); // annuled if not taken 1.29 bind(done); 1.30 + verify_oop(dst); 1.31 } 1.32 1.33 void MacroAssembler::decode_heap_oop_not_null(Register r) { 1.34 // Do not add assert code to this unless you change vtableStubs_sparc.cpp 1.35 // pd_code_size_limit. 1.36 + // Also do not verify_oop as this is called by verify_oop. 1.37 assert (UseCompressedOops, "must be compressed"); 1.38 sllx(r, LogMinObjAlignmentInBytes, r); 1.39 add(r, G6_heapbase, r); 1.40 @@ -3695,6 +3700,7 @@ 1.41 void MacroAssembler::decode_heap_oop_not_null(Register src, Register dst) { 1.42 // Do not add assert code to this unless you change vtableStubs_sparc.cpp 1.43 // pd_code_size_limit. 1.44 + // Also do not verify_oop as this is called by verify_oop. 1.45 assert (UseCompressedOops, "must be compressed"); 1.46 sllx(src, LogMinObjAlignmentInBytes, dst); 1.47 add(dst, G6_heapbase, dst);
2.1 --- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Tue Jun 03 15:38:31 2008 -0700 2.2 +++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Fri Jun 06 13:43:36 2008 -0400 2.3 @@ -2720,7 +2720,8 @@ 2.4 #endif /* ASSERT */ 2.5 2.6 VMRegPair zero; 2.7 - zero.set2(G0->as_VMReg()); 2.8 + const Register g0 = G0; // without this we get a compiler warning (why??) 2.9 + zero.set2(g0->as_VMReg()); 2.10 2.11 int c_arg, j_arg; 2.12
3.1 --- a/src/cpu/x86/vm/assembler_x86_64.cpp Tue Jun 03 15:38:31 2008 -0700 3.2 +++ b/src/cpu/x86/vm/assembler_x86_64.cpp Fri Jun 06 13:43:36 2008 -0400 3.3 @@ -5282,6 +5282,7 @@ 3.4 assert (UseCompressedOops, "should only be used for compressed headers"); 3.5 // Cannot assert, unverified entry point counts instructions (see .ad file) 3.6 // vtableStubs also counts instructions in pd_code_size_limit. 3.7 + // Also do not verify_oop as this is called by verify_oop. 3.8 assert(Address::times_8 == LogMinObjAlignmentInBytes, "decode alg wrong"); 3.9 leaq(r, Address(r12_heapbase, r, Address::times_8, 0)); 3.10 } 3.11 @@ -5290,6 +5291,7 @@ 3.12 assert (UseCompressedOops, "should only be used for compressed headers"); 3.13 // Cannot assert, unverified entry point counts instructions (see .ad file) 3.14 // vtableStubs also counts instructions in pd_code_size_limit. 3.15 + // Also do not verify_oop as this is called by verify_oop. 3.16 assert(Address::times_8 == LogMinObjAlignmentInBytes, "decode alg wrong"); 3.17 leaq(dst, Address(r12_heapbase, src, Address::times_8, 0)); 3.18 }
4.1 --- a/src/cpu/x86/vm/interp_masm_x86_64.cpp Tue Jun 03 15:38:31 2008 -0700 4.2 +++ b/src/cpu/x86/vm/interp_masm_x86_64.cpp Fri Jun 06 13:43:36 2008 -0400 4.3 @@ -233,7 +233,7 @@ 4.4 assert(Rsub_klass != rcx, "rcx holds 2ndary super array length"); 4.5 assert(Rsub_klass != rdi, "rdi holds 2ndary super array scan ptr"); 4.6 4.7 - Label not_subtype, loop; 4.8 + Label not_subtype, not_subtype_pop, loop; 4.9 4.10 // Profile the not-null value's klass. 4.11 profile_typecheck(rcx, Rsub_klass, rdi); // blows rcx, rdi 4.12 @@ -272,12 +272,13 @@ 4.13 // and we store values in objArrays always encoded, thus we need to encode value 4.14 // before repne 4.15 if (UseCompressedOops) { 4.16 + pushq(rax); 4.17 encode_heap_oop(rax); 4.18 repne_scanl(); 4.19 // Not equal? 4.20 - jcc(Assembler::notEqual, not_subtype); 4.21 - // decode heap oop here for movq 4.22 - decode_heap_oop(rax); 4.23 + jcc(Assembler::notEqual, not_subtype_pop); 4.24 + // restore heap oop here for movq 4.25 + popq(rax); 4.26 } else { 4.27 repne_scanq(); 4.28 jcc(Assembler::notEqual, not_subtype); 4.29 @@ -287,9 +288,10 @@ 4.30 Klass::secondary_super_cache_offset_in_bytes()), rax); 4.31 jmp(ok_is_subtype); 4.32 4.33 + bind(not_subtype_pop); 4.34 + // restore heap oop here for miss 4.35 + if (UseCompressedOops) popq(rax); 4.36 bind(not_subtype); 4.37 - // decode heap oop here for miss 4.38 - if (UseCompressedOops) decode_heap_oop(rax); 4.39 profile_typecheck_failed(rcx); // blows rcx 4.40 } 4.41
5.1 --- a/src/share/vm/classfile/classFileParser.cpp Tue Jun 03 15:38:31 2008 -0700 5.2 +++ b/src/share/vm/classfile/classFileParser.cpp Fri Jun 06 13:43:36 2008 -0400 5.3 @@ -44,6 +44,7 @@ 5.4 5.5 // Used for backward compatibility reasons: 5.6 // - to check for javac bug fixes that happened after 1.5 5.7 +// - also used as the max version when running in jdk6 5.8 #define JAVA_6_VERSION 50 5.9 5.10 5.11 @@ -3507,9 +3508,11 @@ 5.12 } 5.13 5.14 bool ClassFileParser::is_supported_version(u2 major, u2 minor) { 5.15 + u2 max_version = JDK_Version::is_gte_jdk17x_version() ? 5.16 + JAVA_MAX_SUPPORTED_VERSION : JAVA_6_VERSION; 5.17 return (major >= JAVA_MIN_SUPPORTED_VERSION) && 5.18 - (major <= JAVA_MAX_SUPPORTED_VERSION) && 5.19 - ((major != JAVA_MAX_SUPPORTED_VERSION) || 5.20 + (major <= max_version) && 5.21 + ((major != max_version) || 5.22 (minor <= JAVA_MAX_SUPPORTED_MINOR_VERSION)); 5.23 } 5.24
6.1 --- a/src/share/vm/interpreter/bytecodeInterpreterWithChecks.xml Tue Jun 03 15:38:31 2008 -0700 6.2 +++ b/src/share/vm/interpreter/bytecodeInterpreterWithChecks.xml Fri Jun 06 13:43:36 2008 -0400 6.3 @@ -1,25 +1,25 @@ 6.4 <?xml version="1.0"?> 6.5 <!-- 6.6 - 6opyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved. 6.7 - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.8 + Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved. 6.9 + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.10 6.11 - This code is free software; you can redistribute it and/or modify it 6.12 - under the terms of the GNU General Public License version 2 only, as 6.13 - published by the Free Software Foundation. 6.14 + This code is free software; you can redistribute it and/or modify it 6.15 + under the terms of the GNU General Public License version 2 only, as 6.16 + published by the Free Software Foundation. 6.17 6.18 - This code is distributed in the hope that it will be useful, but WITHOUT 6.19 - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 6.20 - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 6.21 - version 2 for more details (a copy is included in the LICENSE file that 6.22 - accompanied this code). 6.23 + This code is distributed in the hope that it will be useful, but WITHOUT 6.24 + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 6.25 + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 6.26 + version 2 for more details (a copy is included in the LICENSE file that 6.27 + accompanied this code). 6.28 6.29 - You should have received a copy of the GNU General Public License version 6.30 - 2 along with this work; if not, write to the Free Software Foundation, 6.31 - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 6.32 + You should have received a copy of the GNU General Public License version 6.33 + 2 along with this work; if not, write to the Free Software Foundation, 6.34 + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 6.35 6.36 - Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 6.37 - CA 95054 USA or visit www.sun.com if you need additional information or 6.38 - have any questions. 6.39 + Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 6.40 + CA 95054 USA or visit www.sun.com if you need additional information or 6.41 + have any questions. 6.42 --> 6.43 <!DOCTYPE processcode [ 6.44 <!ELEMENT processcode ANY>
7.1 --- a/src/share/vm/interpreter/bytecodeInterpreterWithChecks.xsl Tue Jun 03 15:38:31 2008 -0700 7.2 +++ b/src/share/vm/interpreter/bytecodeInterpreterWithChecks.xsl Fri Jun 06 13:43:36 2008 -0400 7.3 @@ -1,25 +1,25 @@ 7.4 <?xml version="1.0"?> 7.5 <!-- 7.6 - Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved. 7.7 - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.8 + Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved. 7.9 + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.10 7.11 - This code is free software; you can redistribute it and/or modify it 7.12 - under the terms of the GNU General Public License version 2 only, as 7.13 - published by the Free Software Foundation. 7.14 + This code is free software; you can redistribute it and/or modify it 7.15 + under the terms of the GNU General Public License version 2 only, as 7.16 + published by the Free Software Foundation. 7.17 7.18 - This code is distributed in the hope that it will be useful, but WITHOUT 7.19 - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 7.20 - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 7.21 - version 2 for more details (a copy is included in the LICENSE file that 7.22 - accompanied this code). 7.23 + This code is distributed in the hope that it will be useful, but WITHOUT 7.24 + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 7.25 + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 7.26 + version 2 for more details (a copy is included in the LICENSE file that 7.27 + accompanied this code). 7.28 7.29 - You should have received a copy of the GNU General Public License version 7.30 - 2 along with this work; if not, write to the Free Software Foundation, 7.31 - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 7.32 + You should have received a copy of the GNU General Public License version 7.33 + 2 along with this work; if not, write to the Free Software Foundation, 7.34 + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 7.35 7.36 - Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 7.37 - CA 95054 USA or visit www.sun.com if you need additional information or 7.38 - have any questions. 7.39 + Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 7.40 + CA 95054 USA or visit www.sun.com if you need additional information or 7.41 + have any questions. 7.42 --> 7.43 7.44 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
8.1 --- a/src/share/vm/runtime/java.hpp Tue Jun 03 15:38:31 2008 -0700 8.2 +++ b/src/share/vm/runtime/java.hpp Fri Jun 06 13:43:36 2008 -0400 8.3 @@ -68,8 +68,24 @@ 8.4 static bool is_jdk13x_version() { assert(is_jdk_version_initialized(), "must have been initialized"); return _jdk_version == 3; } 8.5 static bool is_jdk14x_version() { assert(is_jdk_version_initialized(), "must have been initialized"); return _jdk_version == 4; } 8.6 static bool is_jdk15x_version() { assert(is_jdk_version_initialized(), "must have been initialized"); return _jdk_version == 5; } 8.7 - static bool is_jdk16x_version() { assert(is_jdk_version_initialized(), "must have been initialized"); return _jdk_version == 6; } 8.8 - static bool is_jdk17x_version() { assert(is_jdk_version_initialized(), "must have been initialized"); return _jdk_version == 7; } 8.9 + 8.10 + static bool is_jdk16x_version() { 8.11 + if (is_jdk_version_initialized()) { 8.12 + return _jdk_version == 6; 8.13 + } else { 8.14 + assert(is_pre_jdk16_version(), "must have been initialized"); 8.15 + return false; 8.16 + } 8.17 + } 8.18 + 8.19 + static bool is_jdk17x_version() { 8.20 + if (is_jdk_version_initialized()) { 8.21 + return _jdk_version == 7; 8.22 + } else { 8.23 + assert(is_pre_jdk16_version(), "must have been initialized"); 8.24 + return false; 8.25 + } 8.26 + } 8.27 8.28 static bool supports_thread_park_blocker() { return _version_info.thread_park_blocker; } 8.29 8.30 @@ -85,14 +101,22 @@ 8.31 } 8.32 static bool is_gte_jdk16x_version() { 8.33 // Keep the semantics of this that the version number is >= 1.6 8.34 - assert(is_jdk_version_initialized(), "Not initialized"); 8.35 - return _jdk_version >= 6; 8.36 + if (is_jdk_version_initialized()) { 8.37 + return _jdk_version >= 6; 8.38 + } else { 8.39 + assert(is_pre_jdk16_version(), "Not initialized"); 8.40 + return false; 8.41 + } 8.42 } 8.43 8.44 static bool is_gte_jdk17x_version() { 8.45 // Keep the semantics of this that the version number is >= 1.7 8.46 - assert(is_jdk_version_initialized(), "Not initialized"); 8.47 - return _jdk_version >= 7; 8.48 + if (is_jdk_version_initialized()) { 8.49 + return _jdk_version >= 7; 8.50 + } else { 8.51 + assert(is_pre_jdk16_version(), "Not initialized"); 8.52 + return false; 8.53 + } 8.54 } 8.55 8.56 static bool is_jdk_version_initialized() {
9.1 --- a/test/compiler/6659207/Test.java Tue Jun 03 15:38:31 2008 -0700 9.2 +++ b/test/compiler/6659207/Test.java Fri Jun 06 13:43:36 2008 -0400 9.3 @@ -1,23 +1,24 @@ 9.4 /* 9.5 - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 9.6 - * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 9.7 + * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved. 9.8 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9.9 * 9.10 + * This code is free software; you can redistribute it and/or modify it 9.11 + * under the terms of the GNU General Public License version 2 only, as 9.12 + * published by the Free Software Foundation. 9.13 * 9.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 9.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 9.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 9.17 + * version 2 for more details (a copy is included in the LICENSE file that 9.18 + * accompanied this code). 9.19 * 9.20 + * You should have received a copy of the GNU General Public License version 9.21 + * 2 along with this work; if not, write to the Free Software Foundation, 9.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 9.23 * 9.24 - * 9.25 - * 9.26 - * 9.27 - * 9.28 - * 9.29 - * 9.30 - * 9.31 - * 9.32 - * 9.33 - * 9.34 - * 9.35 - * 9.36 - * 9.37 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 9.38 + * CA 95054 USA or visit www.sun.com if you need additional information or 9.39 + * have any questions. 9.40 * 9.41 */ 9.42
10.1 --- a/test/compiler/6661247/Test.java Tue Jun 03 15:38:31 2008 -0700 10.2 +++ b/test/compiler/6661247/Test.java Fri Jun 06 13:43:36 2008 -0400 10.3 @@ -1,23 +1,24 @@ 10.4 /* 10.5 - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 10.6 - * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 10.7 + * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved. 10.8 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10.9 * 10.10 + * This code is free software; you can redistribute it and/or modify it 10.11 + * under the terms of the GNU General Public License version 2 only, as 10.12 + * published by the Free Software Foundation. 10.13 * 10.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 10.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 10.17 + * version 2 for more details (a copy is included in the LICENSE file that 10.18 + * accompanied this code). 10.19 * 10.20 + * You should have received a copy of the GNU General Public License version 10.21 + * 2 along with this work; if not, write to the Free Software Foundation, 10.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 10.23 * 10.24 - * 10.25 - * 10.26 - * 10.27 - * 10.28 - * 10.29 - * 10.30 - * 10.31 - * 10.32 - * 10.33 - * 10.34 - * 10.35 - * 10.36 - * 10.37 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 10.38 + * CA 95054 USA or visit www.sun.com if you need additional information or 10.39 + * have any questions. 10.40 * 10.41 */ 10.42
11.1 --- a/test/compiler/6663621/IVTest.java Tue Jun 03 15:38:31 2008 -0700 11.2 +++ b/test/compiler/6663621/IVTest.java Fri Jun 06 13:43:36 2008 -0400 11.3 @@ -1,23 +1,24 @@ 11.4 /* 11.5 - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 11.6 - * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 11.7 + * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved. 11.8 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 11.9 * 11.10 + * This code is free software; you can redistribute it and/or modify it 11.11 + * under the terms of the GNU General Public License version 2 only, as 11.12 + * published by the Free Software Foundation. 11.13 * 11.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 11.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11.17 + * version 2 for more details (a copy is included in the LICENSE file that 11.18 + * accompanied this code). 11.19 * 11.20 + * You should have received a copy of the GNU General Public License version 11.21 + * 2 along with this work; if not, write to the Free Software Foundation, 11.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 11.23 * 11.24 - * 11.25 - * 11.26 - * 11.27 - * 11.28 - * 11.29 - * 11.30 - * 11.31 - * 11.32 - * 11.33 - * 11.34 - * 11.35 - * 11.36 - * 11.37 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 11.38 + * CA 95054 USA or visit www.sun.com if you need additional information or 11.39 + * have any questions. 11.40 * 11.41 */ 11.42