Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
23346:39f25354aeee | 23347:7ae6a635fad0 |
---|---|
105 _call_kind = kind; | 105 _call_kind = kind; |
106 _call_index = index; | 106 _call_index = index; |
107 _resolved_appendix = Handle(); | 107 _resolved_appendix = Handle(); |
108 DEBUG_ONLY(verify()); // verify before making side effects | 108 DEBUG_ONLY(verify()); // verify before making side effects |
109 | 109 |
110 if (CompilationPolicy::must_be_compiled(selected_method)) { | 110 CompilationPolicy::compile_if_required(selected_method, THREAD); |
111 // This path is unusual, mostly used by the '-Xcomp' stress test mode. | |
112 | |
113 // Note: with several active threads, the must_be_compiled may be true | |
114 // while can_be_compiled is false; remove assert | |
115 // assert(CompilationPolicy::can_be_compiled(selected_method), "cannot compile"); | |
116 if (!THREAD->can_call_java()) { | |
117 // don't force compilation, resolve was on behalf of compiler | |
118 return; | |
119 } | |
120 if (selected_method->method_holder()->is_not_initialized()) { | |
121 // 'is_not_initialized' means not only '!is_initialized', but also that | |
122 // initialization has not been started yet ('!being_initialized') | |
123 // Do not force compilation of methods in uninitialized classes. | |
124 // Note that doing this would throw an assert later, | |
125 // in CompileBroker::compile_method. | |
126 // We sometimes use the link resolver to do reflective lookups | |
127 // even before classes are initialized. | |
128 return; | |
129 } | |
130 CompileBroker::compile_method(selected_method, InvocationEntryBci, | |
131 CompilationPolicy::policy()->initial_compile_level(), | |
132 methodHandle(), 0, "must_be_compiled", CHECK); | |
133 } | |
134 } | 111 } |
135 | 112 |
136 // utility query for unreflecting a method | 113 // utility query for unreflecting a method |
137 CallInfo::CallInfo(Method* resolved_method, Klass* resolved_klass) { | 114 CallInfo::CallInfo(Method* resolved_method, Klass* resolved_klass) { |
138 Klass* resolved_method_holder = resolved_method->method_holder(); | 115 Klass* resolved_method_holder = resolved_method->method_holder(); |