src/share/vm/utilities/constantTag.cpp

Mon, 25 Jun 2012 21:33:35 -0400

author
coleenp
date
Mon, 25 Jun 2012 21:33:35 -0400
changeset 3875
246d977b51f2
parent 2742
ed69575596ac
child 4037
da91efe96a93
permissions
-rw-r--r--

7178670: runtime/7158800/BadUtf8.java fails in SymbolTable::rehash_table
Summary: Cannot delete _buckets and HashtableEntries in shared space (CDS)
Reviewed-by: acorn, kvn, dlong, dcubed, kamg

duke@435 1 /*
stefank@2314 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
duke@435 22 *
duke@435 23 */
duke@435 24
stefank@2314 25 #include "precompiled.hpp"
stefank@2314 26 #include "utilities/constantTag.hpp"
duke@435 27
duke@435 28 #ifndef PRODUCT
duke@435 29
duke@435 30 void constantTag::print_on(outputStream* st) const {
jrose@1957 31 st->print(internal_name());
jrose@1957 32 }
jrose@1957 33
jrose@1957 34 #endif // PRODUCT
jrose@1957 35
jrose@1957 36 BasicType constantTag::basic_type() const {
duke@435 37 switch (_tag) {
jrose@1957 38 case JVM_CONSTANT_Integer :
jrose@1957 39 return T_INT;
jrose@1957 40 case JVM_CONSTANT_Float :
jrose@1957 41 return T_FLOAT;
jrose@1957 42 case JVM_CONSTANT_Long :
jrose@1957 43 return T_LONG;
jrose@1957 44 case JVM_CONSTANT_Double :
jrose@1957 45 return T_DOUBLE;
jrose@1957 46
duke@435 47 case JVM_CONSTANT_Class :
duke@435 48 case JVM_CONSTANT_String :
duke@435 49 case JVM_CONSTANT_UnresolvedClass :
jrose@1957 50 case JVM_CONSTANT_UnresolvedClassInError :
duke@435 51 case JVM_CONSTANT_ClassIndex :
duke@435 52 case JVM_CONSTANT_UnresolvedString :
duke@435 53 case JVM_CONSTANT_StringIndex :
jrose@1957 54 case JVM_CONSTANT_MethodHandle :
jrose@1957 55 case JVM_CONSTANT_MethodType :
jrose@1957 56 case JVM_CONSTANT_Object :
jrose@1957 57 return T_OBJECT;
duke@435 58 default:
duke@435 59 ShouldNotReachHere();
jrose@1957 60 return T_ILLEGAL;
duke@435 61 }
duke@435 62 }
duke@435 63
jrose@1957 64
jrose@1957 65
jrose@1957 66 const char* constantTag::internal_name() const {
jrose@1957 67 switch (_tag) {
jrose@1957 68 case JVM_CONSTANT_Invalid :
jrose@1957 69 return "Invalid index";
jrose@1957 70 case JVM_CONSTANT_Class :
jrose@1957 71 return "Class";
jrose@1957 72 case JVM_CONSTANT_Fieldref :
jrose@1957 73 return "Field";
jrose@1957 74 case JVM_CONSTANT_Methodref :
jrose@1957 75 return "Method";
jrose@1957 76 case JVM_CONSTANT_InterfaceMethodref :
jrose@1957 77 return "InterfaceMethod";
jrose@1957 78 case JVM_CONSTANT_String :
jrose@1957 79 return "String";
jrose@1957 80 case JVM_CONSTANT_Integer :
jrose@1957 81 return "Integer";
jrose@1957 82 case JVM_CONSTANT_Float :
jrose@1957 83 return "Float";
jrose@1957 84 case JVM_CONSTANT_Long :
jrose@1957 85 return "Long";
jrose@1957 86 case JVM_CONSTANT_Double :
jrose@1957 87 return "Double";
jrose@1957 88 case JVM_CONSTANT_NameAndType :
jrose@1957 89 return "NameAndType";
jrose@1957 90 case JVM_CONSTANT_MethodHandle :
jrose@1957 91 return "MethodHandle";
jrose@1957 92 case JVM_CONSTANT_MethodType :
jrose@1957 93 return "MethodType";
jrose@2015 94 case JVM_CONSTANT_InvokeDynamic :
jrose@2015 95 return "InvokeDynamic";
jrose@1957 96 case JVM_CONSTANT_Object :
jrose@1957 97 return "Object";
jrose@1957 98 case JVM_CONSTANT_Utf8 :
jrose@1957 99 return "Utf8";
jrose@1957 100 case JVM_CONSTANT_UnresolvedClass :
jrose@1957 101 return "Unresolved Class";
jrose@1957 102 case JVM_CONSTANT_UnresolvedClassInError :
jrose@1957 103 return "Unresolved Class Error";
jrose@1957 104 case JVM_CONSTANT_ClassIndex :
jrose@1957 105 return "Unresolved Class Index";
jrose@1957 106 case JVM_CONSTANT_UnresolvedString :
jrose@1957 107 return "Unresolved String";
jrose@1957 108 case JVM_CONSTANT_StringIndex :
jrose@1957 109 return "Unresolved String Index";
jrose@1957 110 default:
jrose@1957 111 ShouldNotReachHere();
jrose@1957 112 return "Illegal";
jrose@1957 113 }
jrose@1957 114 }

mercurial