equal
deleted
inserted
replaced
174 // |
174 // |
175 // According to JVM spec. $5.4.3c & $5.4.3d |
175 // According to JVM spec. $5.4.3c & $5.4.3d |
176 |
176 |
177 void LinkResolver::lookup_method_in_klasses(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) { |
177 void LinkResolver::lookup_method_in_klasses(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) { |
178 methodOop result_oop = klass->uncached_lookup_method(name, signature); |
178 methodOop result_oop = klass->uncached_lookup_method(name, signature); |
179 if (EnableMethodHandles && result_oop != NULL) { |
179 if (EnableInvokeDynamic && result_oop != NULL) { |
180 switch (result_oop->intrinsic_id()) { |
180 switch (result_oop->intrinsic_id()) { |
181 case vmIntrinsics::_invokeExact: |
181 case vmIntrinsics::_invokeExact: |
182 case vmIntrinsics::_invokeGeneric: |
182 case vmIntrinsics::_invokeGeneric: |
183 case vmIntrinsics::_invokeDynamic: |
183 case vmIntrinsics::_invokeDynamic: |
184 // Do not link directly to these. The VM must produce a synthetic one using lookup_implicit_method. |
184 // Do not link directly to these. The VM must produce a synthetic one using lookup_implicit_method. |
212 |
212 |
213 void LinkResolver::lookup_implicit_method(methodHandle& result, |
213 void LinkResolver::lookup_implicit_method(methodHandle& result, |
214 KlassHandle klass, Symbol* name, Symbol* signature, |
214 KlassHandle klass, Symbol* name, Symbol* signature, |
215 KlassHandle current_klass, |
215 KlassHandle current_klass, |
216 TRAPS) { |
216 TRAPS) { |
217 if (EnableMethodHandles && |
217 if (EnableInvokeDynamic && |
218 klass() == SystemDictionary::MethodHandle_klass() && |
218 klass() == SystemDictionary::MethodHandle_klass() && |
219 methodOopDesc::is_method_handle_invoke_name(name)) { |
219 methodOopDesc::is_method_handle_invoke_name(name)) { |
220 if (!THREAD->is_Compiler_thread() && !MethodHandles::enabled()) { |
220 if (!THREAD->is_Compiler_thread() && !MethodHandles::enabled()) { |
221 // Make sure the Java part of the runtime has been booted up. |
221 // Make sure the Java part of the runtime has been booted up. |
222 klassOop natives = SystemDictionary::MethodHandleNatives_klass(); |
222 klassOop natives = SystemDictionary::MethodHandleNatives_klass(); |