src/share/vm/interpreter/interpreterRuntime.cpp

changeset 5496
ca0165daa6ec
parent 4993
746b070f5022
child 5732
b2e698d2276c
child 6470
abe03600372a
     1.1 --- a/src/share/vm/interpreter/interpreterRuntime.cpp	Tue Aug 06 14:28:48 2013 +0400
     1.2 +++ b/src/share/vm/interpreter/interpreterRuntime.cpp	Tue Aug 06 16:33:59 2013 -0700
     1.3 @@ -1209,3 +1209,26 @@
     1.4                         size_of_arguments * Interpreter::stackElementSize);
     1.5  IRT_END
     1.6  #endif
     1.7 +
     1.8 +#if INCLUDE_JVMTI
     1.9 +// This is a support of the JVMTI PopFrame interface.
    1.10 +// Make sure it is an invokestatic of a polymorphic intrinsic that has a member_name argument
    1.11 +// and return it as a vm_result so that it can be reloaded in the list of invokestatic parameters.
    1.12 +// The dmh argument is a reference to a DirectMethoHandle that has a member name field.
    1.13 +IRT_ENTRY(void, InterpreterRuntime::member_name_arg_or_null(JavaThread* thread, address dmh,
    1.14 +                                                            Method* method, address bcp))
    1.15 +  Bytecodes::Code code = Bytecodes::code_at(method, bcp);
    1.16 +  if (code != Bytecodes::_invokestatic) {
    1.17 +    return;
    1.18 +  }
    1.19 +  ConstantPool* cpool = method->constants();
    1.20 +  int cp_index = Bytes::get_native_u2(bcp + 1) + ConstantPool::CPCACHE_INDEX_TAG;
    1.21 +  Symbol* cname = cpool->klass_name_at(cpool->klass_ref_index_at(cp_index));
    1.22 +  Symbol* mname = cpool->name_ref_at(cp_index);
    1.23 +
    1.24 +  if (MethodHandles::has_member_arg(cname, mname)) {
    1.25 +    oop member_name = java_lang_invoke_DirectMethodHandle::member((oop)dmh);
    1.26 +    thread->set_vm_result(member_name);
    1.27 +  }
    1.28 +IRT_END
    1.29 +#endif // INCLUDE_JVMTI

mercurial