From 912ff56814adac7096b865eb1765998cc1b8b1c4 Mon Sep 17 00:00:00 2001 From: roland Date: Wed, 24 Apr 2013 14:26:09 +0200 Subject: [PATCH] 8012292: optimized build with GCC broken Summary: Some #ifndef PRODUCT should be #ifdef ASSERT Reviewed-by: kvn, twisti Contributed-by: gdub --- make/jprt.properties | 6 +++--- src/share/vm/classfile/classFileParser.cpp | 4 ++-- src/share/vm/classfile/vmSymbols.cpp | 4 ++-- src/share/vm/opto/runtime.cpp | 6 ++---- src/share/vm/utilities/quickSort.cpp | 2 ++ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/make/jprt.properties b/make/jprt.properties index af7f321b7..5971546c6 100644 --- a/make/jprt.properties +++ b/make/jprt.properties @@ -134,14 +134,14 @@ jprt.my.windows.x64=${jprt.my.windows.x64.${jprt.tools.default.release}} jprt.build.targets.standard= \ ${jprt.my.solaris.sparc}-{product|fastdebug}, \ - ${jprt.my.solaris.sparcv9}-{product|fastdebug}, \ + ${jprt.my.solaris.sparcv9}-{product|fastdebug|optimized}, \ ${jprt.my.solaris.i586}-{product|fastdebug}, \ ${jprt.my.solaris.x64}-{product|fastdebug}, \ ${jprt.my.linux.i586}-{product|fastdebug}, \ - ${jprt.my.linux.x64}-{product|fastdebug}, \ + ${jprt.my.linux.x64}-{product|fastdebug|optimized}, \ ${jprt.my.macosx.x64}-{product|fastdebug}, \ ${jprt.my.windows.i586}-{product|fastdebug}, \ - ${jprt.my.windows.x64}-{product|fastdebug}, \ + ${jprt.my.windows.x64}-{product|fastdebug|optimized}, \ ${jprt.my.linux.armvh}-{product|fastdebug} jprt.build.targets.open= \ diff --git a/src/share/vm/classfile/classFileParser.cpp b/src/share/vm/classfile/classFileParser.cpp index 373ca0ae8..6f8e8f11b 100644 --- a/src/share/vm/classfile/classFileParser.cpp +++ b/src/share/vm/classfile/classFileParser.cpp @@ -3046,7 +3046,7 @@ AnnotationArray* ClassFileParser::assemble_annotations(u1* runtime_visible_annot } -#ifndef PRODUCT +#ifdef ASSERT static void parseAndPrintGenericSignatures( instanceKlassHandle this_klass, TRAPS) { assert(ParseAllGenericSignatures == true, "Shouldn't call otherwise"); @@ -3071,7 +3071,7 @@ static void parseAndPrintGenericSignatures( } } } -#endif // ndef PRODUCT +#endif // def ASSERT instanceKlassHandle ClassFileParser::parse_super_class(int super_class_index, diff --git a/src/share/vm/classfile/vmSymbols.cpp b/src/share/vm/classfile/vmSymbols.cpp index 92939ea24..cc38c6d2c 100644 --- a/src/share/vm/classfile/vmSymbols.cpp +++ b/src/share/vm/classfile/vmSymbols.cpp @@ -49,7 +49,7 @@ extern "C" { } } -#ifndef PRODUCT +#ifdef ASSERT #define VM_SYMBOL_ENUM_NAME_BODY(name, string) #name "\0" static const char* vm_symbol_enum_names = VM_SYMBOLS_DO(VM_SYMBOL_ENUM_NAME_BODY, VM_ALIAS_IGNORE) @@ -64,7 +64,7 @@ static const char* vm_symbol_enum_name(vmSymbols::SID sid) { } return string; } -#endif //PRODUCT +#endif //ASSERT // Put all the VM symbol strings in one place. // Makes for a more compact libjvm. diff --git a/src/share/vm/opto/runtime.cpp b/src/share/vm/opto/runtime.cpp index 7edb97e0b..d0aefad66 100644 --- a/src/share/vm/opto/runtime.cpp +++ b/src/share/vm/opto/runtime.cpp @@ -126,17 +126,15 @@ ExceptionBlob* OptoRuntime::_exception_blob; // This should be called in an assertion at the start of OptoRuntime routines // which are entered from compiled code (all of them) -#ifndef PRODUCT +#ifdef ASSERT static bool check_compiled_frame(JavaThread* thread) { assert(thread->last_frame().is_runtime_frame(), "cannot call runtime directly from compiled code"); -#ifdef ASSERT RegisterMap map(thread, false); frame caller = thread->last_frame().sender(&map); assert(caller.is_compiled_frame(), "not being called from compiled like code"); -#endif /* ASSERT */ return true; } -#endif +#endif // ASSERT #define gen(env, var, type_func_gen, c_func, fancy_jump, pass_tls, save_arg_regs, return_pc) \ diff --git a/src/share/vm/utilities/quickSort.cpp b/src/share/vm/utilities/quickSort.cpp index e3cfa1efa..9cdda3335 100644 --- a/src/share/vm/utilities/quickSort.cpp +++ b/src/share/vm/utilities/quickSort.cpp @@ -32,6 +32,7 @@ #include "utilities/quickSort.hpp" #include +#ifdef ASSERT static int test_comparator(int a, int b) { if (a == b) { return 0; @@ -41,6 +42,7 @@ static int test_comparator(int a, int b) { } return 1; } +#endif // ASSERT static int test_even_odd_comparator(int a, int b) { bool a_is_odd = (a % 2) == 1; -- GitLab