1 /*
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
93 case 'I': return VerificationType(Integer);
94 case 'J': return VerificationType(Long);
95 case 'F': return VerificationType(Float);
96 case 'D': return VerificationType(Double);
97 case '[':
98 component = context->create_temporary_symbol(
99 name(), 1, name()->utf8_length(),
100 CHECK_(VerificationType::bogus_type()));
101 return VerificationType::reference_type(component);
102 case 'L':
103 component = context->create_temporary_symbol(
104 name(), 2, name()->utf8_length() - 1,
105 CHECK_(VerificationType::bogus_type()));
106 return VerificationType::reference_type(component);
107 default:
108 // Met an invalid type signature, e.g. [X
109 return VerificationType::bogus_type();
110 }
111 }
112
113 #ifndef PRODUCT
114
115 void VerificationType::print_on(outputStream* st) const {
116 switch (_u._data) {
117 case Bogus: st->print(" bogus "); break;
118 case Category1: st->print(" category1 "); break;
119 case Category2: st->print(" category2 "); break;
120 case Category2_2nd: st->print(" category2_2nd "); break;
121 case Boolean: st->print(" boolean "); break;
122 case Byte: st->print(" byte "); break;
123 case Short: st->print(" short "); break;
124 case Char: st->print(" char "); break;
125 case Integer: st->print(" integer "); break;
126 case Float: st->print(" float "); break;
127 case Long: st->print(" long "); break;
128 case Double: st->print(" double "); break;
129 case Long_2nd: st->print(" long_2nd "); break;
130 case Double_2nd: st->print(" double_2nd "); break;
131 case Null: st->print(" null "); break;
132 default:
133 if (is_uninitialized_this()) {
134 st->print(" uninitializedThis ");
135 } else if (is_uninitialized()) {
136 st->print(" uninitialized %d ", bci());
137 } else {
138 st->print(" class %s ", name()->as_klass_external_name());
139 }
140 }
141 }
142
143 #endif
|
1 /*
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
93 case 'I': return VerificationType(Integer);
94 case 'J': return VerificationType(Long);
95 case 'F': return VerificationType(Float);
96 case 'D': return VerificationType(Double);
97 case '[':
98 component = context->create_temporary_symbol(
99 name(), 1, name()->utf8_length(),
100 CHECK_(VerificationType::bogus_type()));
101 return VerificationType::reference_type(component);
102 case 'L':
103 component = context->create_temporary_symbol(
104 name(), 2, name()->utf8_length() - 1,
105 CHECK_(VerificationType::bogus_type()));
106 return VerificationType::reference_type(component);
107 default:
108 // Met an invalid type signature, e.g. [X
109 return VerificationType::bogus_type();
110 }
111 }
112
113 void VerificationType::print_on(outputStream* st) const {
114 switch (_u._data) {
115 case Bogus: st->print("top"); break;
116 case Category1: st->print("category1"); break;
117 case Category2: st->print("category2"); break;
118 case Category2_2nd: st->print("category2_2nd"); break;
119 case Boolean: st->print("boolean"); break;
120 case Byte: st->print("byte"); break;
121 case Short: st->print("short"); break;
122 case Char: st->print("char"); break;
123 case Integer: st->print("integer"); break;
124 case Float: st->print("float"); break;
125 case Long: st->print("long"); break;
126 case Double: st->print("double"); break;
127 case Long_2nd: st->print("long_2nd"); break;
128 case Double_2nd: st->print("double_2nd"); break;
129 case Null: st->print("null"); break;
130 case ReferenceQuery: st->print("reference type"); break;
131 case Category1Query: st->print("category1 type"); break;
132 case Category2Query: st->print("category2 type"); break;
133 case Category2_2ndQuery: st->print("category2_2nd type"); break;
134 default:
135 if (is_uninitialized_this()) {
136 st->print("uninitializedThis");
137 } else if (is_uninitialized()) {
138 st->print("uninitialized %d", bci());
139 } else {
140 name()->print_value_on(st);
141 }
142 }
143 }
|