< prev index next >

src/hotspot/share/interpreter/abstractInterpreter.hpp

Print this page

 64     empty,                                                      // empty method (code: _return)
 65     getter,                                                     // getter method
 66     setter,                                                     // setter method
 67     abstract,                                                   // abstract method (throws an AbstractMethodException)
 68     method_handle_invoke_FIRST,                                 // java.lang.invoke.MethodHandles::invokeExact, etc.
 69     method_handle_invoke_LAST                                   = (method_handle_invoke_FIRST
 70                                                                    + (static_cast<int>(vmIntrinsics::LAST_MH_SIG_POLY)
 71                                                                       - static_cast<int>(vmIntrinsics::FIRST_MH_SIG_POLY))),
 72     java_lang_math_sin,                                         // implementation of java.lang.Math.sin   (x)
 73     java_lang_math_cos,                                         // implementation of java.lang.Math.cos   (x)
 74     java_lang_math_tan,                                         // implementation of java.lang.Math.tan   (x)
 75     java_lang_math_abs,                                         // implementation of java.lang.Math.abs   (x)
 76     java_lang_math_sqrt,                                        // implementation of java.lang.Math.sqrt  (x)
 77     java_lang_math_log,                                         // implementation of java.lang.Math.log   (x)
 78     java_lang_math_log10,                                       // implementation of java.lang.Math.log10 (x)
 79     java_lang_math_pow,                                         // implementation of java.lang.Math.pow   (x,y)
 80     java_lang_math_exp,                                         // implementation of java.lang.Math.exp   (x)
 81     java_lang_math_fmaF,                                        // implementation of java.lang.Math.fma   (x, y, z)
 82     java_lang_math_fmaD,                                        // implementation of java.lang.Math.fma   (x, y, z)
 83     java_lang_ref_reference_get,                                // implementation of java.lang.ref.Reference.get()

 84     java_util_zip_CRC32_update,                                 // implementation of java.util.zip.CRC32.update()
 85     java_util_zip_CRC32_updateBytes,                            // implementation of java.util.zip.CRC32.updateBytes()
 86     java_util_zip_CRC32_updateByteBuffer,                       // implementation of java.util.zip.CRC32.updateByteBuffer()
 87     java_util_zip_CRC32C_updateBytes,                           // implementation of java.util.zip.CRC32C.updateBytes(crc, b[], off, end)
 88     java_util_zip_CRC32C_updateDirectByteBuffer,                // implementation of java.util.zip.CRC32C.updateDirectByteBuffer(crc, address, off, end)
 89     java_lang_Float_intBitsToFloat,                             // implementation of java.lang.Float.intBitsToFloat()
 90     java_lang_Float_floatToRawIntBits,                          // implementation of java.lang.Float.floatToRawIntBits()
 91     java_lang_Double_longBitsToDouble,                          // implementation of java.lang.Double.longBitsToDouble()
 92     java_lang_Double_doubleToRawLongBits,                       // implementation of java.lang.Double.doubleToRawLongBits()
 93     number_of_method_entries,
 94     invalid = -1
 95   };
 96 
 97   // Conversion from the part of the above enum to vmIntrinsics::_invokeExact, etc.
 98   static vmIntrinsics::ID method_handle_intrinsic(MethodKind kind) {
 99     if (kind >= method_handle_invoke_FIRST && kind <= method_handle_invoke_LAST)
100       return vmIntrinsics::ID_from(static_cast<int>(vmIntrinsics::FIRST_MH_SIG_POLY) + (kind - method_handle_invoke_FIRST));
101     else
102       return vmIntrinsics::_none;
103   }

127  public:
128   // Initialization/debugging
129   static void       initialize();
130   static StubQueue* code()                                      { return _code; }
131 
132 
133   // Method activation
134   static MethodKind method_kind(const methodHandle& m);
135   static address    entry_for_kind(MethodKind k)                { assert(0 <= k && k < number_of_method_entries, "illegal kind"); return _entry_table[k]; }
136   static address    entry_for_method(const methodHandle& m)     { return entry_for_kind(method_kind(m)); }
137 
138   // used for bootstrapping method handles:
139   static void       set_entry_for_kind(MethodKind k, address e);
140 
141   static void       print_method_kind(MethodKind kind)          PRODUCT_RETURN;
142 
143   // These should never be compiled since the interpreter will prefer
144   // the compiled version to the intrinsic version.
145   static bool       can_be_compiled(const methodHandle& m) {
146     switch (m->intrinsic_id()) {
147       case vmIntrinsics::_dsin  : // fall thru
148       case vmIntrinsics::_dcos  : // fall thru
149       case vmIntrinsics::_dtan  : // fall thru
150       case vmIntrinsics::_dabs  : // fall thru
151       case vmIntrinsics::_dsqrt : // fall thru
152       case vmIntrinsics::_dlog  : // fall thru
153       case vmIntrinsics::_dlog10: // fall thru
154       case vmIntrinsics::_dpow  : // fall thru
155       case vmIntrinsics::_dexp  : // fall thru
156       case vmIntrinsics::_fmaD  : // fall thru
157       case vmIntrinsics::_fmaF  : // fall thru





158         return false;

159       default:
160         return true;
161     }
162   }
163 
164   // Runtime support
165 
166   // length = invoke bytecode length (to advance to next bytecode)
167   static address deopt_entry(TosState state, int length) { ShouldNotReachHere(); return NULL; }
168   static address return_entry(TosState state, int length, Bytecodes::Code code) { ShouldNotReachHere(); return NULL; }
169 
170   static address    rethrow_exception_entry()                   { return _rethrow_exception_entry; }
171 
172   // Activation size in words for a method that is just being called.
173   // Parameters haven't been pushed so count them too.
174   static int        size_top_interpreter_activation(Method* method);
175 
176   // Deoptimization support
177   // Compute the entry address for continuation after
178   static address deopt_continue_after_entry(Method* method,

 64     empty,                                                      // empty method (code: _return)
 65     getter,                                                     // getter method
 66     setter,                                                     // setter method
 67     abstract,                                                   // abstract method (throws an AbstractMethodException)
 68     method_handle_invoke_FIRST,                                 // java.lang.invoke.MethodHandles::invokeExact, etc.
 69     method_handle_invoke_LAST                                   = (method_handle_invoke_FIRST
 70                                                                    + (static_cast<int>(vmIntrinsics::LAST_MH_SIG_POLY)
 71                                                                       - static_cast<int>(vmIntrinsics::FIRST_MH_SIG_POLY))),
 72     java_lang_math_sin,                                         // implementation of java.lang.Math.sin   (x)
 73     java_lang_math_cos,                                         // implementation of java.lang.Math.cos   (x)
 74     java_lang_math_tan,                                         // implementation of java.lang.Math.tan   (x)
 75     java_lang_math_abs,                                         // implementation of java.lang.Math.abs   (x)
 76     java_lang_math_sqrt,                                        // implementation of java.lang.Math.sqrt  (x)
 77     java_lang_math_log,                                         // implementation of java.lang.Math.log   (x)
 78     java_lang_math_log10,                                       // implementation of java.lang.Math.log10 (x)
 79     java_lang_math_pow,                                         // implementation of java.lang.Math.pow   (x,y)
 80     java_lang_math_exp,                                         // implementation of java.lang.Math.exp   (x)
 81     java_lang_math_fmaF,                                        // implementation of java.lang.Math.fma   (x, y, z)
 82     java_lang_math_fmaD,                                        // implementation of java.lang.Math.fma   (x, y, z)
 83     java_lang_ref_reference_get,                                // implementation of java.lang.ref.Reference.get()
 84     java_lang_continuation_doYield,                             // implementation of jdk.internal.vm.Continuation.doYield()
 85     java_util_zip_CRC32_update,                                 // implementation of java.util.zip.CRC32.update()
 86     java_util_zip_CRC32_updateBytes,                            // implementation of java.util.zip.CRC32.updateBytes()
 87     java_util_zip_CRC32_updateByteBuffer,                       // implementation of java.util.zip.CRC32.updateByteBuffer()
 88     java_util_zip_CRC32C_updateBytes,                           // implementation of java.util.zip.CRC32C.updateBytes(crc, b[], off, end)
 89     java_util_zip_CRC32C_updateDirectByteBuffer,                // implementation of java.util.zip.CRC32C.updateDirectByteBuffer(crc, address, off, end)
 90     java_lang_Float_intBitsToFloat,                             // implementation of java.lang.Float.intBitsToFloat()
 91     java_lang_Float_floatToRawIntBits,                          // implementation of java.lang.Float.floatToRawIntBits()
 92     java_lang_Double_longBitsToDouble,                          // implementation of java.lang.Double.longBitsToDouble()
 93     java_lang_Double_doubleToRawLongBits,                       // implementation of java.lang.Double.doubleToRawLongBits()
 94     number_of_method_entries,
 95     invalid = -1
 96   };
 97 
 98   // Conversion from the part of the above enum to vmIntrinsics::_invokeExact, etc.
 99   static vmIntrinsics::ID method_handle_intrinsic(MethodKind kind) {
100     if (kind >= method_handle_invoke_FIRST && kind <= method_handle_invoke_LAST)
101       return vmIntrinsics::ID_from(static_cast<int>(vmIntrinsics::FIRST_MH_SIG_POLY) + (kind - method_handle_invoke_FIRST));
102     else
103       return vmIntrinsics::_none;
104   }

128  public:
129   // Initialization/debugging
130   static void       initialize();
131   static StubQueue* code()                                      { return _code; }
132 
133 
134   // Method activation
135   static MethodKind method_kind(const methodHandle& m);
136   static address    entry_for_kind(MethodKind k)                { assert(0 <= k && k < number_of_method_entries, "illegal kind"); return _entry_table[k]; }
137   static address    entry_for_method(const methodHandle& m)     { return entry_for_kind(method_kind(m)); }
138 
139   // used for bootstrapping method handles:
140   static void       set_entry_for_kind(MethodKind k, address e);
141 
142   static void       print_method_kind(MethodKind kind)          PRODUCT_RETURN;
143 
144   // These should never be compiled since the interpreter will prefer
145   // the compiled version to the intrinsic version.
146   static bool       can_be_compiled(const methodHandle& m) {
147     switch (m->intrinsic_id()) {
148       // math intrinsics
149       case vmIntrinsics::_dsin  :
150       case vmIntrinsics::_dcos  :
151       case vmIntrinsics::_dtan  :
152       case vmIntrinsics::_dabs  :
153       case vmIntrinsics::_dsqrt :
154       case vmIntrinsics::_dlog  :
155       case vmIntrinsics::_dlog10:
156       case vmIntrinsics::_dpow  :
157       case vmIntrinsics::_dexp  :
158       case vmIntrinsics::_fmaD  :
159       case vmIntrinsics::_fmaF  :
160 
161       // continuation intrinsics
162       case vmIntrinsics::_Continuation_doYield    :
163 
164         return false;
165 
166       default:
167         return true;
168     }
169   }
170 
171   // Runtime support
172 
173   // length = invoke bytecode length (to advance to next bytecode)
174   static address deopt_entry(TosState state, int length) { ShouldNotReachHere(); return NULL; }
175   static address return_entry(TosState state, int length, Bytecodes::Code code) { ShouldNotReachHere(); return NULL; }
176 
177   static address    rethrow_exception_entry()                   { return _rethrow_exception_entry; }
178 
179   // Activation size in words for a method that is just being called.
180   // Parameters haven't been pushed so count them too.
181   static int        size_top_interpreter_activation(Method* method);
182 
183   // Deoptimization support
184   // Compute the entry address for continuation after
185   static address deopt_continue_after_entry(Method* method,
< prev index next >