src/share/vm/prims/jvm.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/prims/jvm.cpp	Thu Apr 16 13:30:54 2015
--- new/src/share/vm/prims/jvm.cpp	Thu Apr 16 13:30:54 2015

*** 161,184 **** --- 161,184 ---- // if this is called from Class.forName0 and that is called from Class.forName, // then print the caller of Class.forName. If this is Class.loadClass, then print // that caller, otherwise keep quiet since this should be picked up elsewhere. bool found_it = false; if (!vfst.at_end() && ! vfst.method()->method_holder()->name() == vmSymbols::java_lang_Class() && ! vfst.method()->name() == vmSymbols::forName0_name()) { ! vfst.method()->method_holder()->name()->equals(vmSymbols::java_lang_Class()) && ! vfst.method()->name()->equals(vmSymbols::forName0_name())) { vfst.next(); if (!vfst.at_end() && ! vfst.method()->method_holder()->name() == vmSymbols::java_lang_Class() && ! vfst.method()->name() == vmSymbols::forName_name()) { ! vfst.method()->method_holder()->name()->equals(vmSymbols::java_lang_Class()) && ! vfst.method()->name()->equals(vmSymbols::forName_name())) { vfst.next(); found_it = true; } } else if (last_caller != NULL && ! last_caller->method_holder()->name() == ! vmSymbols::java_lang_ClassLoader() && ! (last_caller->name() == vmSymbols::loadClassInternal_name() || ! last_caller->name() == vmSymbols::loadClass_name())) { ! last_caller->method_holder()->name()->equals( ! vmSymbols::java_lang_ClassLoader()) && ! (last_caller->name()->equals(vmSymbols::loadClassInternal_name()) || ! last_caller->name()->equals(vmSymbols::loadClass_name()))) { found_it = true; } else if (!vfst.at_end()) { if (vfst.method()->is_native()) { // JNI call found_it = true;
*** 2374,2384 **** --- 2374,2384 ---- JVMWrapper("JVM_IsConstructorIx"); ResourceMark rm(THREAD); Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls)); k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread); Method* method = InstanceKlass::cast(k)->methods()->at(method_index); ! return method->name() == vmSymbols::object_initializer_name(); ! return method->name()->equals(vmSymbols::object_initializer_name()); JVM_END JVM_QUICK_ENTRY(jboolean, JVM_IsVMGeneratedMethodIx(JNIEnv *env, jclass cls, int method_index)) JVMWrapper("JVM_IsVMGeneratedMethodIx");
*** 2542,2552 **** --- 2542,2552 ---- switch (cp->tag_at(cp_index).value()) { case JVM_CONSTANT_Fieldref: { Symbol* name = cp->uncached_name_ref_at(cp_index); Symbol* signature = cp->uncached_signature_ref_at(cp_index); for (JavaFieldStream fs(k_called); !fs.done(); fs.next()) { ! if (fs.name() == name && fs.signature() == signature) { ! if (fs.name()->equals(name) && fs.signature()->equals(signature)) { return fs.access_flags().as_short() & JVM_RECOGNIZED_FIELD_MODIFIERS; } } return -1; }
*** 2572,2582 **** --- 2572,2582 ---- Symbol* signature = cp->uncached_signature_ref_at(cp_index); Array<Method*>* methods = InstanceKlass::cast(k_called)->methods(); int methods_count = methods->length(); for (int i = 0; i < methods_count; i++) { Method* method = methods->at(i); ! if (method->name() == name && method->signature() == signature) { ! if (method->name()->equals(name) && method->signature()->equals(signature)) { return method->access_flags().as_int() & JVM_RECOGNIZED_METHOD_MODIFIERS; } } return -1; }
*** 3162,3173 **** --- 3162,3173 ---- if (SystemDictionary::reflect_CallerSensitive_klass() != NULL) { // This must only be called from SecurityManager.getClassContext Method* m = vfst.method(); if (!(m->method_holder() == SystemDictionary::SecurityManager_klass() && ! m->name() == vmSymbols::getClassContext_name() && ! m->signature() == vmSymbols::void_class_array_signature())) { ! m->name()->equals(vmSymbols::getClassContext_name()) && ! m->signature()->equals(vmSymbols::void_class_array_signature()))) { THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "JVM_GetClassContext must only be called from SecurityManager.getClassContext"); } } // Collect method holders
*** 3209,3219 **** --- 3209,3219 ---- for(vframeStream vfst(thread); !vfst.at_end(); vfst.next()) { if (!vfst.method()->is_native()) { InstanceKlass* holder = vfst.method()->method_holder(); assert(holder->is_klass(), "just checking"); ! if (holder->name() == class_name_sym) { ! if (holder->name()->equals(class_name_sym)) { return depth; } depth++; } }

src/share/vm/prims/jvm.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File