src/share/vm/interpreter/linkResolver.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/interpreter/linkResolver.cpp	Tue Oct 20 22:07:00 2009
--- new/src/share/vm/interpreter/linkResolver.cpp	Tue Oct 20 22:07:00 2009

*** 80,89 **** --- 80,97 ---- // assert(CompilationPolicy::canBeCompiled(selected_method), "cannot compile"); if (THREAD->is_Compiler_thread()) { // don't force compilation, resolve was on behalf of compiler return; } + if (instanceKlass::cast(selected_method->method_holder())->is_not_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, methodHandle(), 0, "mustBeCompiled", CHECK); } }
*** 221,230 **** --- 229,250 ---- KlassHandle current_klass(THREAD, pool->pool_holder()); resolve_method(resolved_method, resolved_klass, method_name, method_signature, current_klass, true, CHECK); } + void LinkResolver::resolve_dynamic_method(methodHandle& resolved_method, KlassHandle& resolved_klass, constantPoolHandle pool, int index, TRAPS) { + // The class is java.dyn.MethodHandle + resolved_klass = SystemDictionaryHandles::MethodHandle_klass(); + + symbolHandle method_name = vmSymbolHandles::invoke_name(); + + symbolHandle method_signature(THREAD, pool->signature_ref_at(index)); + KlassHandle current_klass (THREAD, pool->pool_holder()); + + resolve_method(resolved_method, resolved_klass, method_name, method_signature, current_klass, true, CHECK); + } + void LinkResolver::resolve_interface_method(methodHandle& resolved_method, KlassHandle& resolved_klass, constantPoolHandle pool, int index, TRAPS) { // resolve klass resolve_klass(resolved_klass, pool, index, CHECK); symbolHandle method_name (THREAD, pool->name_ref_at(index));

src/share/vm/interpreter/linkResolver.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File