comparison src/share/vm/classfile/classFileParser.cpp @ 6266:1d7922586cf6

7023639: JSR 292 method handle invocation needs a fast path for compiled code 6984705: JSR 292 method handle creation should not go through JNI Summary: remove assembly code for JDK 7 chained method handles Reviewed-by: jrose, twisti, kvn, mhaupt Contributed-by: John Rose <john.r.rose@oracle.com>, Christian Thalinger <christian.thalinger@oracle.com>, Michael Haupt <michael.haupt@oracle.com>
author twisti
date Tue, 24 Jul 2012 10:51:00 -0700
parents dd785aabe02b
children da91efe96a93
comparison
equal deleted inserted replaced
6241:aba91a731143 6266:1d7922586cf6
1771 vmSymbols::SID sid = vmSymbols::find_sid(name); 1771 vmSymbols::SID sid = vmSymbols::find_sid(name);
1772 switch (sid) { 1772 switch (sid) {
1773 case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_ForceInline_signature): 1773 case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_ForceInline_signature):
1774 if (_location != _in_method) break; // only allow for methods 1774 if (_location != _in_method) break; // only allow for methods
1775 return _method_ForceInline; 1775 return _method_ForceInline;
1776 case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_DontInline_signature):
1777 if (_location != _in_method) break; // only allow for methods
1778 return _method_DontInline;
1779 case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Compiled_signature):
1780 if (_location != _in_method) break; // only allow for methods
1781 return _method_LambdaForm_Compiled;
1782 case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Hidden_signature):
1783 if (_location != _in_method) break; // only allow for methods
1784 return _method_LambdaForm_Hidden;
1776 default: break; 1785 default: break;
1777 } 1786 }
1778 return AnnotationCollector::_unknown; 1787 return AnnotationCollector::_unknown;
1779 } 1788 }
1780 1789
1783 } 1792 }
1784 1793
1785 void ClassFileParser::MethodAnnotationCollector::apply_to(methodHandle m) { 1794 void ClassFileParser::MethodAnnotationCollector::apply_to(methodHandle m) {
1786 if (has_annotation(_method_ForceInline)) 1795 if (has_annotation(_method_ForceInline))
1787 m->set_force_inline(true); 1796 m->set_force_inline(true);
1797 if (has_annotation(_method_DontInline))
1798 m->set_dont_inline(true);
1799 if (has_annotation(_method_LambdaForm_Compiled) && m->intrinsic_id() == vmIntrinsics::_none)
1800 m->set_intrinsic_id(vmIntrinsics::_compiledLambdaForm);
1801 if (has_annotation(_method_LambdaForm_Hidden))
1802 m->set_hidden(true);
1788 } 1803 }
1789 1804
1790 void ClassFileParser::ClassAnnotationCollector::apply_to(instanceKlassHandle k) { 1805 void ClassFileParser::ClassAnnotationCollector::apply_to(instanceKlassHandle k) {
1791 fatal("no class annotations yet"); 1806 fatal("no class annotations yet");
1792 } 1807 }
2332 } 2347 }
2333 if (name == vmSymbols::object_initializer_name() && 2348 if (name == vmSymbols::object_initializer_name() &&
2334 signature == vmSymbols::void_method_signature() && 2349 signature == vmSymbols::void_method_signature() &&
2335 m->is_vanilla_constructor()) { 2350 m->is_vanilla_constructor()) {
2336 _has_vanilla_constructor = true; 2351 _has_vanilla_constructor = true;
2337 }
2338
2339 if (EnableInvokeDynamic && (m->is_method_handle_invoke() ||
2340 m->is_method_handle_adapter())) {
2341 THROW_MSG_(vmSymbols::java_lang_VirtualMachineError(),
2342 "Method handle invokers must be defined internally to the VM", nullHandle);
2343 } 2352 }
2344 2353
2345 return m; 2354 return m;
2346 } 2355 }
2347 2356