Mercurial > hg > graal-compiler
comparison src/share/vm/classfile/classFileParser.cpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | d8041d695d19 |
children | 0563b652c052 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, 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. |
3744 if (!is_supported_version(major_version, minor_version)) { | 3744 if (!is_supported_version(major_version, minor_version)) { |
3745 if (name == NULL) { | 3745 if (name == NULL) { |
3746 Exceptions::fthrow( | 3746 Exceptions::fthrow( |
3747 THREAD_AND_LOCATION, | 3747 THREAD_AND_LOCATION, |
3748 vmSymbols::java_lang_UnsupportedClassVersionError(), | 3748 vmSymbols::java_lang_UnsupportedClassVersionError(), |
3749 "Unsupported class file version %u.%u, " | 3749 "Unsupported major.minor version %u.%u", |
3750 "this version of the Java Runtime only recognizes class file versions up to %u.%u", | |
3751 major_version, | 3750 major_version, |
3752 minor_version, | 3751 minor_version); |
3753 JAVA_MAX_SUPPORTED_VERSION, | |
3754 JAVA_MAX_SUPPORTED_MINOR_VERSION); | |
3755 } else { | 3752 } else { |
3756 ResourceMark rm(THREAD); | 3753 ResourceMark rm(THREAD); |
3757 Exceptions::fthrow( | 3754 Exceptions::fthrow( |
3758 THREAD_AND_LOCATION, | 3755 THREAD_AND_LOCATION, |
3759 vmSymbols::java_lang_UnsupportedClassVersionError(), | 3756 vmSymbols::java_lang_UnsupportedClassVersionError(), |
3760 "%s has been compiled by a more recent version of the Java Runtime (class file version %u.%u), " | 3757 "%s : Unsupported major.minor version %u.%u", |
3761 "this version of the Java Runtime only recognizes class file versions up to %u.%u", | |
3762 name->as_C_string(), | 3758 name->as_C_string(), |
3763 major_version, | 3759 major_version, |
3764 minor_version, | 3760 minor_version); |
3765 JAVA_MAX_SUPPORTED_VERSION, | |
3766 JAVA_MAX_SUPPORTED_MINOR_VERSION); | |
3767 } | 3761 } |
3768 return nullHandle; | 3762 return nullHandle; |
3769 } | 3763 } |
3770 | 3764 |
3771 _major_version = major_version; | 3765 _major_version = major_version; |
4102 // print in a single call to reduce interleaving of output | 4096 // print in a single call to reduce interleaving of output |
4103 if (cfs->source() != NULL) { | 4097 if (cfs->source() != NULL) { |
4104 tty->print("[Loaded %s from %s]\n", this_klass->external_name(), | 4098 tty->print("[Loaded %s from %s]\n", this_klass->external_name(), |
4105 cfs->source()); | 4099 cfs->source()); |
4106 } else if (class_loader.is_null()) { | 4100 } else if (class_loader.is_null()) { |
4107 Klass* caller = | 4101 if (THREAD->is_Java_thread()) { |
4108 THREAD->is_Java_thread() | 4102 Klass* caller = ((JavaThread*)THREAD)->security_get_caller_class(1); |
4109 ? ((JavaThread*)THREAD)->security_get_caller_class(1) | |
4110 : NULL; | |
4111 // caller can be NULL, for example, during a JVMTI VM_Init hook | |
4112 if (caller != NULL) { | |
4113 tty->print("[Loaded %s by instance of %s]\n", | 4103 tty->print("[Loaded %s by instance of %s]\n", |
4114 this_klass->external_name(), | 4104 this_klass->external_name(), |
4115 InstanceKlass::cast(caller)->external_name()); | 4105 InstanceKlass::cast(caller)->external_name()); |
4116 } else { | 4106 } else { |
4117 tty->print("[Loaded %s]\n", this_klass->external_name()); | 4107 tty->print("[Loaded %s]\n", this_klass->external_name()); |
4508 super_m = InstanceKlass::cast(k)->lookup_method(name, signature); | 4498 super_m = InstanceKlass::cast(k)->lookup_method(name, signature); |
4509 if (super_m == NULL) { | 4499 if (super_m == NULL) { |
4510 break; // didn't find any match; get out | 4500 break; // didn't find any match; get out |
4511 } | 4501 } |
4512 | 4502 |
4513 if (super_m->is_final() && !super_m->is_static() && | 4503 if (super_m->is_final() && |
4514 // matching method in super is final, and not static | 4504 // matching method in super is final |
4515 (Reflection::verify_field_access(this_klass(), | 4505 (Reflection::verify_field_access(this_klass(), |
4516 super_m->method_holder(), | 4506 super_m->method_holder(), |
4517 super_m->method_holder(), | 4507 super_m->method_holder(), |
4518 super_m->access_flags(), false)) | 4508 super_m->access_flags(), false)) |
4519 // this class can access super final method and therefore override | 4509 // this class can access super final method and therefore override |