comparison src/share/vm/oops/method.hpp @ 14727:8b772174c514

Backport of 8504393de66b from jdk9
author Doug Simon <doug.simon@oracle.com>
date Mon, 24 Mar 2014 23:50:18 +0100
parents 92aa6797d639
children 4ca6dc0799b6
comparison
equal deleted inserted replaced
14726:92aa6797d639 14727:8b772174c514
106 #ifdef CC_INTERP 106 #ifdef CC_INTERP
107 int _result_index; // C++ interpreter needs for converting results to/from stack 107 int _result_index; // C++ interpreter needs for converting results to/from stack
108 #endif 108 #endif
109 u2 _method_size; // size of this object 109 u2 _method_size; // size of this object
110 u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) 110 u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none)
111 u1 _jfr_towrite : 1, // Flags 111 // Flags
112 _caller_sensitive : 1, 112 enum Flags {
113 _force_inline : 1, 113 _jfr_towrite = 1 << 0,
114 _hidden : 1, 114 _caller_sensitive = 1 << 1,
115 _dont_inline : 1, 115 _force_inline = 1 << 2,
116 : 3; 116 _dont_inline = 1 << 3,
117 _hidden = 1 << 4
118 };
119 u1 _flags;
117 120
118 #ifndef PRODUCT 121 #ifndef PRODUCT
119 int _compiled_invocation_count; // Number of nmethod invocations so far (for perf. debugging) 122 int _compiled_invocation_count; // Number of nmethod invocations so far (for perf. debugging)
120 #endif 123 #endif
121 // Entry point for calling both from and to the interpreter. 124 // Entry point for calling both from and to the interpreter.
757 760
758 // Helper routines for intrinsic_id() and vmIntrinsics::method(). 761 // Helper routines for intrinsic_id() and vmIntrinsics::method().
759 void init_intrinsic_id(); // updates from _none if a match 762 void init_intrinsic_id(); // updates from _none if a match
760 static vmSymbols::SID klass_id_for_intrinsics(Klass* holder); 763 static vmSymbols::SID klass_id_for_intrinsics(Klass* holder);
761 764
762 bool jfr_towrite() { return _jfr_towrite; } 765 bool jfr_towrite() {
763 void set_jfr_towrite(bool x) { _jfr_towrite = x; } 766 return (_flags & _jfr_towrite) != 0;
764 bool caller_sensitive() { return _caller_sensitive; } 767 }
765 void set_caller_sensitive(bool x) { _caller_sensitive = x; } 768 void set_jfr_towrite(bool x) {
766 bool force_inline() { return _force_inline; } 769 _flags = x ? (_flags | _jfr_towrite) : (_flags & ~_jfr_towrite);
767 void set_force_inline(bool x) { _force_inline = x; } 770 }
768 bool dont_inline() { return _dont_inline; } 771
769 void set_dont_inline(bool x) { _dont_inline = x; } 772 bool caller_sensitive() {
770 bool is_hidden() { return _hidden; } 773 return (_flags & _caller_sensitive) != 0;
771 void set_hidden(bool x) { _hidden = x; } 774 }
775 void set_caller_sensitive(bool x) {
776 _flags = x ? (_flags | _caller_sensitive) : (_flags & ~_caller_sensitive);
777 }
778
779 bool force_inline() {
780 return (_flags & _force_inline) != 0;
781 }
782 void set_force_inline(bool x) {
783 _flags = x ? (_flags | _force_inline) : (_flags & ~_force_inline);
784 }
785
786 bool dont_inline() {
787 return (_flags & _dont_inline) != 0;
788 }
789 void set_dont_inline(bool x) {
790 _flags = x ? (_flags | _dont_inline) : (_flags & ~_dont_inline);
791 }
792
793 bool is_hidden() {
794 return (_flags & _hidden) != 0;
795 }
796 void set_hidden(bool x) {
797 _flags = x ? (_flags | _hidden) : (_flags & ~_hidden);
798 }
799
772 ConstMethod::MethodType method_type() const { 800 ConstMethod::MethodType method_type() const {
773 return _constMethod->method_type(); 801 return _constMethod->method_type();
774 } 802 }
775 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; } 803 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; }
776 804