comparison src/share/vm/graal/graalVMEntries.cpp @ 3648:81ad8ab1f9fe

Remove ci usage on method lookup.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 16 Nov 2011 16:02:04 +0100
parents dea89750a867
children 5a8c44b5fb80
comparison
equal deleted inserted replaced
3647:dea89750a867 3648:81ad8ab1f9fe
470 VM_ENTRY_MARK; 470 VM_ENTRY_MARK;
471 index = GraalCompiler::to_cp_index_u2(index); 471 index = GraalCompiler::to_cp_index_u2(index);
472 constantPoolHandle cp = instanceKlass::cast(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(type)))->constants(); 472 constantPoolHandle cp = instanceKlass::cast(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(type)))->constants();
473 473
474 Bytecodes::Code bc = (Bytecodes::Code) (((int) byteCode) & 0xFF); 474 Bytecodes::Code bc = (Bytecodes::Code) (((int) byteCode) & 0xFF);
475 ciInstanceKlass* loading_klass = (ciInstanceKlass *) CURRENT_ENV->get_object(cp->pool_holder()); 475 methodHandle method = GraalEnv::get_method_by_index(cp, index, bc, instanceKlass::cast(cp->pool_holder()));
476 ciMethod *cimethod = CURRENT_ENV->get_method_by_index(cp, index, bc, loading_klass); 476 if (!method.is_null()) {
477 if (cimethod->is_loaded()) {
478 methodOop method = (methodOop) cimethod->get_oop();
479 oop ret = GraalCompiler::createHotSpotMethodResolved(method, CHECK_NULL); 477 oop ret = GraalCompiler::createHotSpotMethodResolved(method, CHECK_NULL);
480 return JNIHandles::make_local(THREAD, ret); 478 return JNIHandles::make_local(THREAD, ret);
481 } else { 479 } else {
482 // Get the method's name and signature. 480 // Get the method's name and signature.
483 Handle name = VmIds::toString<Handle>(cp->name_ref_at(index), CHECK_NULL); 481 Handle name = VmIds::toString<Handle>(cp->name_ref_at(index), CHECK_NULL);