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 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/symbolTable.hpp"
27 #include "classfile/systemDictionaryShared.hpp"
28 #include "classfile/verificationType.hpp"
29 #include "classfile/verifier.hpp"
30
31 VerificationType VerificationType::from_tag(u1 tag) {
32 switch (tag) {
33 case ITEM_Top: return bogus_type();
34 case ITEM_Integer: return integer_type();
35 case ITEM_Float: return float_type();
36 case ITEM_Double: return double_type();
37 case ITEM_Long: return long_type();
38 case ITEM_Null: return null_type();
39 default:
40 ShouldNotReachHere();
41 return bogus_type();
42 }
43 }
44
45 bool VerificationType::resolve_and_check_assignability(InstanceKlass* klass, Symbol* name,
46 Symbol* from_name, bool from_field_is_protected, bool from_is_array, bool from_is_object, TRAPS) {
47 HandleMark hm(THREAD);
48 Klass* this_class = SystemDictionary::resolve_or_fail(
49 name, Handle(THREAD, klass->class_loader()),
|
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 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/symbolTable.hpp"
27 #include "classfile/systemDictionaryShared.hpp"
28 #include "classfile/verificationType.hpp"
29 #include "classfile/verifier.hpp"
30 #include "runtime/handles.inline.hpp"
31
32 VerificationType VerificationType::from_tag(u1 tag) {
33 switch (tag) {
34 case ITEM_Top: return bogus_type();
35 case ITEM_Integer: return integer_type();
36 case ITEM_Float: return float_type();
37 case ITEM_Double: return double_type();
38 case ITEM_Long: return long_type();
39 case ITEM_Null: return null_type();
40 default:
41 ShouldNotReachHere();
42 return bogus_type();
43 }
44 }
45
46 bool VerificationType::resolve_and_check_assignability(InstanceKlass* klass, Symbol* name,
47 Symbol* from_name, bool from_field_is_protected, bool from_is_array, bool from_is_object, TRAPS) {
48 HandleMark hm(THREAD);
49 Klass* this_class = SystemDictionary::resolve_or_fail(
50 name, Handle(THREAD, klass->class_loader()),
|