Mercurial > hg > graal-jvmci-8
diff src/share/vm/interpreter/linkResolver.cpp @ 23347:7ae6a635fad0
8152903: [JVMCI] CompilerToVM::resolveMethod should correctly handle private methods in interfaces
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Wed, 06 Apr 2016 20:02:32 -0700 |
parents | dd9cc155639c |
children | 719853999215 |
line wrap: on
line diff
--- a/src/share/vm/interpreter/linkResolver.cpp Thu Apr 07 11:09:49 2016 -0700 +++ b/src/share/vm/interpreter/linkResolver.cpp Wed Apr 06 20:02:32 2016 -0700 @@ -107,30 +107,7 @@ _resolved_appendix = Handle(); DEBUG_ONLY(verify()); // verify before making side effects - if (CompilationPolicy::must_be_compiled(selected_method)) { - // This path is unusual, mostly used by the '-Xcomp' stress test mode. - - // Note: with several active threads, the must_be_compiled may be true - // while can_be_compiled is false; remove assert - // assert(CompilationPolicy::can_be_compiled(selected_method), "cannot compile"); - if (!THREAD->can_call_java()) { - // don't force compilation, resolve was on behalf of compiler - return; - } - if (selected_method->method_holder()->is_not_initialized()) { - // 'is_not_initialized' means not only '!is_initialized', but also that - // initialization has not been started yet ('!being_initialized') - // Do not force compilation of methods in uninitialized classes. - // Note that doing this would throw an assert later, - // in CompileBroker::compile_method. - // We sometimes use the link resolver to do reflective lookups - // even before classes are initialized. - return; - } - CompileBroker::compile_method(selected_method, InvocationEntryBci, - CompilationPolicy::policy()->initial_compile_level(), - methodHandle(), 0, "must_be_compiled", CHECK); - } + CompilationPolicy::compile_if_required(selected_method, THREAD); } // utility query for unreflecting a method