Mercurial > hg > truffle
comparison src/share/vm/oops/constantPool.cpp @ 17937:78bbf4d43a14
8037816: Fix for 8036122 breaks build with Xcode5/clang
8043029: Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
8043164: Format warning in traceStream.hpp
Summary: Backport of main fix + two corrections, enables clang compilation, turns on format attributes, corrects/mutes warnings
Reviewed-by: kvn, coleenp, iveresov, twisti
author | drchase |
---|---|
date | Thu, 22 May 2014 15:52:41 -0400 |
parents | 9428a0b94204 |
children | 52b4284cb496 b12a2a9b05ca |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
39 #include "runtime/fieldType.hpp" | 39 #include "runtime/fieldType.hpp" |
40 #include "runtime/init.hpp" | 40 #include "runtime/init.hpp" |
41 #include "runtime/javaCalls.hpp" | 41 #include "runtime/javaCalls.hpp" |
42 #include "runtime/signature.hpp" | 42 #include "runtime/signature.hpp" |
43 #include "runtime/vframe.hpp" | 43 #include "runtime/vframe.hpp" |
44 | |
45 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC | |
44 | 46 |
45 ConstantPool* ConstantPool::allocate(ClassLoaderData* loader_data, int length, TRAPS) { | 47 ConstantPool* ConstantPool::allocate(ClassLoaderData* loader_data, int length, TRAPS) { |
46 // Tags are RW but comment below applies to tags also. | 48 // Tags are RW but comment below applies to tags also. |
47 Array<u1>* tags = MetadataFactory::new_writeable_array<u1>(loader_data, length, 0, CHECK_NULL); | 49 Array<u1>* tags = MetadataFactory::new_writeable_array<u1>(loader_data, length, 0, CHECK_NULL); |
48 | 50 |
1882 // Printing | 1884 // Printing |
1883 | 1885 |
1884 void ConstantPool::print_on(outputStream* st) const { | 1886 void ConstantPool::print_on(outputStream* st) const { |
1885 EXCEPTION_MARK; | 1887 EXCEPTION_MARK; |
1886 assert(is_constantPool(), "must be constantPool"); | 1888 assert(is_constantPool(), "must be constantPool"); |
1887 st->print_cr(internal_name()); | 1889 st->print_cr("%s", internal_name()); |
1888 if (flags() != 0) { | 1890 if (flags() != 0) { |
1889 st->print(" - flags: 0x%x", flags()); | 1891 st->print(" - flags: 0x%x", flags()); |
1890 if (has_preresolution()) st->print(" has_preresolution"); | 1892 if (has_preresolution()) st->print(" has_preresolution"); |
1891 if (on_stack()) st->print(" on_stack"); | 1893 if (on_stack()) st->print(" on_stack"); |
1892 st->cr(); | 1894 st->cr(); |