Mercurial > hg > truffle
changeset 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 |
files | src/share/vm/graal/graalVMEntries.cpp |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/graal/graalVMEntries.cpp Wed Nov 16 16:00:11 2011 +0100 +++ b/src/share/vm/graal/graalVMEntries.cpp Wed Nov 16 16:02:04 2011 +0100 @@ -472,10 +472,8 @@ constantPoolHandle cp = instanceKlass::cast(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(type)))->constants(); Bytecodes::Code bc = (Bytecodes::Code) (((int) byteCode) & 0xFF); - ciInstanceKlass* loading_klass = (ciInstanceKlass *) CURRENT_ENV->get_object(cp->pool_holder()); - ciMethod *cimethod = CURRENT_ENV->get_method_by_index(cp, index, bc, loading_klass); - if (cimethod->is_loaded()) { - methodOop method = (methodOop) cimethod->get_oop(); + methodHandle method = GraalEnv::get_method_by_index(cp, index, bc, instanceKlass::cast(cp->pool_holder())); + if (!method.is_null()) { oop ret = GraalCompiler::createHotSpotMethodResolved(method, CHECK_NULL); return JNIHandles::make_local(THREAD, ret); } else {