< prev index next >

src/hotspot/share/interpreter/abstractInterpreter.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.

   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  72     java_lang_math_cos,                                         // implementation of java.lang.Math.cos   (x)
  73     java_lang_math_tan,                                         // implementation of java.lang.Math.tan   (x)
  74     java_lang_math_abs,                                         // implementation of java.lang.Math.abs   (x)
  75     java_lang_math_sqrt,                                        // implementation of java.lang.Math.sqrt  (x)
  76     java_lang_math_log,                                         // implementation of java.lang.Math.log   (x)
  77     java_lang_math_log10,                                       // implementation of java.lang.Math.log10 (x)
  78     java_lang_math_pow,                                         // implementation of java.lang.Math.pow   (x,y)
  79     java_lang_math_exp,                                         // implementation of java.lang.Math.exp   (x)
  80     java_lang_math_fmaF,                                        // implementation of java.lang.Math.fma   (x, y, z)
  81     java_lang_math_fmaD,                                        // implementation of java.lang.Math.fma   (x, y, z)
  82     java_lang_ref_reference_get,                                // implementation of java.lang.ref.Reference.get()
  83     java_util_zip_CRC32_update,                                 // implementation of java.util.zip.CRC32.update()
  84     java_util_zip_CRC32_updateBytes,                            // implementation of java.util.zip.CRC32.updateBytes()
  85     java_util_zip_CRC32_updateByteBuffer,                       // implementation of java.util.zip.CRC32.updateByteBuffer()
  86     java_util_zip_CRC32C_updateBytes,                           // implementation of java.util.zip.CRC32C.updateBytes(crc, b[], off, end)
  87     java_util_zip_CRC32C_updateDirectByteBuffer,                // implementation of java.util.zip.CRC32C.updateDirectByteBuffer(crc, address, off, end)
  88     java_lang_Float_intBitsToFloat,                             // implementation of java.lang.Float.intBitsToFloat()
  89     java_lang_Float_floatToRawIntBits,                          // implementation of java.lang.Float.floatToRawIntBits()
  90     java_lang_Double_longBitsToDouble,                          // implementation of java.lang.Double.longBitsToDouble()
  91     java_lang_Double_doubleToRawLongBits,                       // implementation of java.lang.Double.doubleToRawLongBits()









  92     number_of_method_entries,
  93     invalid = -1
  94   };
  95 
  96   // Conversion from the part of the above enum to vmIntrinsics::_invokeExact, etc.
  97   static vmIntrinsics::ID method_handle_intrinsic(MethodKind kind) {
  98     if (kind >= method_handle_invoke_FIRST && kind <= method_handle_invoke_LAST)
  99       return (vmIntrinsics::ID)( vmIntrinsics::FIRST_MH_SIG_POLY + (kind - method_handle_invoke_FIRST) );
 100     else
 101       return vmIntrinsics::_none;
 102   }
 103 
 104   enum SomeConstants {
 105     number_of_result_handlers = 10                              // number of result handlers for native calls
 106   };
 107 
 108  protected:
 109   static StubQueue* _code;                                      // the interpreter code (codelets)
 110 
 111   static bool       _notice_safepoints;                         // true if safepoints are activated


 138   static address entry_for_cds_method(const methodHandle& m) {
 139     MethodKind k = method_kind(m);
 140     assert(0 <= k && k < number_of_method_entries, "illegal kind");
 141     return _cds_entry_table[k];
 142   }
 143 
 144   // used by class data sharing
 145   static void       update_cds_entry_table(MethodKind kind) NOT_CDS_RETURN;
 146 
 147   static address    get_trampoline_code_buffer(AbstractInterpreter::MethodKind kind) NOT_CDS_RETURN_(0);
 148 
 149   // used for bootstrapping method handles:
 150   static void       set_entry_for_kind(MethodKind k, address e);
 151 
 152   static void       print_method_kind(MethodKind kind)          PRODUCT_RETURN;
 153 
 154   // These should never be compiled since the interpreter will prefer
 155   // the compiled version to the intrinsic version.
 156   static bool       can_be_compiled(const methodHandle& m) {
 157     switch (m->intrinsic_id()) {







 158       case vmIntrinsics::_dsin  : // fall thru
 159       case vmIntrinsics::_dcos  : // fall thru
 160       case vmIntrinsics::_dtan  : // fall thru
 161       case vmIntrinsics::_dabs  : // fall thru
 162       case vmIntrinsics::_dsqrt : // fall thru
 163       case vmIntrinsics::_dlog  : // fall thru
 164       case vmIntrinsics::_dlog10: // fall thru
 165       case vmIntrinsics::_dpow  : // fall thru
 166       case vmIntrinsics::_dexp  : // fall thru
 167       case vmIntrinsics::_fmaD  : // fall thru
 168       case vmIntrinsics::_fmaF  : // fall thru
 169         return false;
 170       default:
 171         return true;
 172     }
 173   }
 174 
 175   // Runtime support
 176 
 177   // length = invoke bytecode length (to advance to next bytecode)


   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2015-2018, Azul Systems, Inc. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


  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 #ifdef AARCH32
  94     com_sun_crypto_provider_AESCrypt_encryptBlock,              // implementation of com/sun/crypto/provider/AESCrypt/encryptBlock()
  95     com_sun_crypto_provider_AESCrypt_decryptBlock,              // implementation of com/sun/crypto/provider/AESCrypt/decryptBlock()
  96     com_sun_crypto_provider_CipherBlockChaining_encrypt,        // implementation of com/sun/crypto/provider/CipherBlockChaining/encrypt()
  97     com_sun_crypto_provider_CipherBlockChaining_decrypt,        // implementation of com/sun/crypto/provider/CipherBlockChaining/decrypt()
  98     sun_security_provider_SHA_implCompress,                     // implementation of sun/security/provider/SHA2/implCompress()
  99     sun_security_provider_SHA2_implCompress,                    // implementation of sun/security/provider/SHA2/implCompress()
 100     sun_security_provider_SHA5_implCompress,                    // implementation of sun/security/provider/SHA5/implCompress()
 101 #endif
 102     number_of_method_entries,
 103     invalid = -1
 104   };
 105 
 106   // Conversion from the part of the above enum to vmIntrinsics::_invokeExact, etc.
 107   static vmIntrinsics::ID method_handle_intrinsic(MethodKind kind) {
 108     if (kind >= method_handle_invoke_FIRST && kind <= method_handle_invoke_LAST)
 109       return (vmIntrinsics::ID)( vmIntrinsics::FIRST_MH_SIG_POLY + (kind - method_handle_invoke_FIRST) );
 110     else
 111       return vmIntrinsics::_none;
 112   }
 113 
 114   enum SomeConstants {
 115     number_of_result_handlers = 10                              // number of result handlers for native calls
 116   };
 117 
 118  protected:
 119   static StubQueue* _code;                                      // the interpreter code (codelets)
 120 
 121   static bool       _notice_safepoints;                         // true if safepoints are activated


 148   static address entry_for_cds_method(const methodHandle& m) {
 149     MethodKind k = method_kind(m);
 150     assert(0 <= k && k < number_of_method_entries, "illegal kind");
 151     return _cds_entry_table[k];
 152   }
 153 
 154   // used by class data sharing
 155   static void       update_cds_entry_table(MethodKind kind) NOT_CDS_RETURN;
 156 
 157   static address    get_trampoline_code_buffer(AbstractInterpreter::MethodKind kind) NOT_CDS_RETURN_(0);
 158 
 159   // used for bootstrapping method handles:
 160   static void       set_entry_for_kind(MethodKind k, address e);
 161 
 162   static void       print_method_kind(MethodKind kind)          PRODUCT_RETURN;
 163 
 164   // These should never be compiled since the interpreter will prefer
 165   // the compiled version to the intrinsic version.
 166   static bool       can_be_compiled(const methodHandle& m) {
 167     switch (m->intrinsic_id()) {
 168 #ifdef AARCH32
 169       case vmIntrinsics::_aescrypt_encryptBlock:
 170       case vmIntrinsics::_aescrypt_decryptBlock:
 171       case vmIntrinsics::_sha_implCompress:
 172       case vmIntrinsics::_sha2_implCompress:
 173       case vmIntrinsics::_sha5_implCompress:
 174 #endif // AARCH32
 175       case vmIntrinsics::_dsin  : // fall thru
 176       case vmIntrinsics::_dcos  : // fall thru
 177       case vmIntrinsics::_dtan  : // fall thru
 178       case vmIntrinsics::_dabs  : // fall thru
 179       case vmIntrinsics::_dsqrt : // fall thru
 180       case vmIntrinsics::_dlog  : // fall thru
 181       case vmIntrinsics::_dlog10: // fall thru
 182       case vmIntrinsics::_dpow  : // fall thru
 183       case vmIntrinsics::_dexp  : // fall thru
 184       case vmIntrinsics::_fmaD  : // fall thru
 185       case vmIntrinsics::_fmaF  : // fall thru
 186         return false;
 187       default:
 188         return true;
 189     }
 190   }
 191 
 192   // Runtime support
 193 
 194   // length = invoke bytecode length (to advance to next bytecode)


< prev index next >