comparison src/share/vm/ci/ciMethod.cpp @ 1564:61b2245abf36

6930772: JSR 292 needs to support SPARC C1 Summary: C1 for SPARC needs to support JSR 292. Reviewed-by: never, jrose
author twisti
date Fri, 21 May 2010 02:59:24 -0700
parents 576e77447e3c
children e9ff18c4ace7
comparison
equal deleted inserted replaced
1563:1a5913bf5e19 1564:61b2245abf36
688 return count; 688 return count;
689 } 689 }
690 690
691 // ------------------------------------------------------------------ 691 // ------------------------------------------------------------------
692 // invokedynamic support 692 // invokedynamic support
693 // 693
694 // ------------------------------------------------------------------
695 // ciMethod::is_method_handle_invoke
696 //
697 // Return true if the method is a MethodHandle target.
694 bool ciMethod::is_method_handle_invoke() const { 698 bool ciMethod::is_method_handle_invoke() const {
695 check_is_loaded(); 699 bool flag = (holder()->name() == ciSymbol::java_dyn_MethodHandle() &&
696 bool flag = ((flags().as_int() & JVM_MH_INVOKE_BITS) == JVM_MH_INVOKE_BITS); 700 methodOopDesc::is_method_handle_invoke_name(name()->sid()));
697 #ifdef ASSERT 701 #ifdef ASSERT
698 { 702 if (is_loaded()) {
699 VM_ENTRY_MARK; 703 bool flag2 = ((flags().as_int() & JVM_MH_INVOKE_BITS) == JVM_MH_INVOKE_BITS);
700 bool flag2 = get_methodOop()->is_method_handle_invoke(); 704 {
701 assert(flag == flag2, "consistent"); 705 VM_ENTRY_MARK;
706 bool flag3 = get_methodOop()->is_method_handle_invoke();
707 assert(flag2 == flag3, "consistent");
708 assert(flag == flag3, "consistent");
709 }
702 } 710 }
703 #endif //ASSERT 711 #endif //ASSERT
704 return flag; 712 return flag;
705 } 713 }
706 714
715 // ------------------------------------------------------------------
716 // ciMethod::is_method_handle_adapter
717 //
718 // Return true if the method is a generated MethodHandle adapter.
707 bool ciMethod::is_method_handle_adapter() const { 719 bool ciMethod::is_method_handle_adapter() const {
708 check_is_loaded(); 720 check_is_loaded();
709 VM_ENTRY_MARK; 721 VM_ENTRY_MARK;
710 return get_methodOop()->is_method_handle_adapter(); 722 return get_methodOop()->is_method_handle_adapter();
711 } 723 }