src/share/vm/interpreter/abstractInterpreter.hpp

changeset 3969
1d7922586cf6
parent 3787
6759698e3140
child 4037
da91efe96a93
equal deleted inserted replaced
3944:aba91a731143 3969:1d7922586cf6
97 native, // native method 97 native, // native method
98 native_synchronized, // native method & is synchronized 98 native_synchronized, // native method & is synchronized
99 empty, // empty method (code: _return) 99 empty, // empty method (code: _return)
100 accessor, // accessor method (code: _aload_0, _getfield, _(a|i)return) 100 accessor, // accessor method (code: _aload_0, _getfield, _(a|i)return)
101 abstract, // abstract method (throws an AbstractMethodException) 101 abstract, // abstract method (throws an AbstractMethodException)
102 method_handle, // java.lang.invoke.MethodHandles::invoke 102 method_handle_invoke_FIRST, // java.lang.invoke.MethodHandles::invokeExact, etc.
103 method_handle_invoke_LAST = (method_handle_invoke_FIRST
104 + (vmIntrinsics::LAST_MH_SIG_POLY
105 - vmIntrinsics::FIRST_MH_SIG_POLY)),
103 java_lang_math_sin, // implementation of java.lang.Math.sin (x) 106 java_lang_math_sin, // implementation of java.lang.Math.sin (x)
104 java_lang_math_cos, // implementation of java.lang.Math.cos (x) 107 java_lang_math_cos, // implementation of java.lang.Math.cos (x)
105 java_lang_math_tan, // implementation of java.lang.Math.tan (x) 108 java_lang_math_tan, // implementation of java.lang.Math.tan (x)
106 java_lang_math_abs, // implementation of java.lang.Math.abs (x) 109 java_lang_math_abs, // implementation of java.lang.Math.abs (x)
107 java_lang_math_sqrt, // implementation of java.lang.Math.sqrt (x) 110 java_lang_math_sqrt, // implementation of java.lang.Math.sqrt (x)
112 java_lang_ref_reference_get, // implementation of java.lang.ref.Reference.get() 115 java_lang_ref_reference_get, // implementation of java.lang.ref.Reference.get()
113 number_of_method_entries, 116 number_of_method_entries,
114 invalid = -1 117 invalid = -1
115 }; 118 };
116 119
120 // Conversion from the part of the above enum to vmIntrinsics::_invokeExact, etc.
121 static vmIntrinsics::ID method_handle_intrinsic(MethodKind kind) {
122 if (kind >= method_handle_invoke_FIRST && kind <= method_handle_invoke_LAST)
123 return (vmIntrinsics::ID)( vmIntrinsics::FIRST_MH_SIG_POLY + (kind - method_handle_invoke_FIRST) );
124 else
125 return vmIntrinsics::_none;
126 }
127
117 enum SomeConstants { 128 enum SomeConstants {
118 number_of_result_handlers = 10 // number of result handlers for native calls 129 number_of_result_handlers = 10 // number of result handlers for native calls
119 }; 130 };
120 131
121 protected: 132 protected:
145 156
146 // Method activation 157 // Method activation
147 static MethodKind method_kind(methodHandle m); 158 static MethodKind method_kind(methodHandle m);
148 static address entry_for_kind(MethodKind k) { assert(0 <= k && k < number_of_method_entries, "illegal kind"); return _entry_table[k]; } 159 static address entry_for_kind(MethodKind k) { assert(0 <= k && k < number_of_method_entries, "illegal kind"); return _entry_table[k]; }
149 static address entry_for_method(methodHandle m) { return entry_for_kind(method_kind(m)); } 160 static address entry_for_method(methodHandle m) { return entry_for_kind(method_kind(m)); }
161
162 // used for bootstrapping method handles:
163 static void set_entry_for_kind(MethodKind k, address e);
150 164
151 static void print_method_kind(MethodKind kind) PRODUCT_RETURN; 165 static void print_method_kind(MethodKind kind) PRODUCT_RETURN;
152 166
153 static bool can_be_compiled(methodHandle m); 167 static bool can_be_compiled(methodHandle m);
154 168

mercurial