< prev index next >

src/hotspot/share/classfile/vmSymbols.hpp

Print this page




  45 #define VM_SYMBOL_ENUM_NAME(name)    name##_enum
  46 #define VM_INTRINSIC_IGNORE(id, class, name, sig, flags) /*ignored*/
  47 #define VM_SYMBOL_IGNORE(id, name)                       /*ignored*/
  48 #define VM_ALIAS_IGNORE(id, id2)                         /*ignored*/
  49 
  50 // Mapping function names to values. New entries should be added below.
  51 
  52 #define VM_SYMBOLS_DO(template, do_alias)                                                         \
  53   /* commonly used class, package, module names */                                                \
  54   template(java_base,                                 "java.base")                                \
  55   template(java_lang_System,                          "java/lang/System")                         \
  56   template(java_lang_Object,                          "java/lang/Object")                         \
  57   template(java_lang_Class,                           "java/lang/Class")                          \
  58   template(java_lang_Package,                         "java/lang/Package")                        \
  59   template(java_lang_Module,                          "java/lang/Module")                         \
  60   template(java_lang_String,                          "java/lang/String")                         \
  61   template(java_lang_StringLatin1,                    "java/lang/StringLatin1")                   \
  62   template(java_lang_StringUTF16,                     "java/lang/StringUTF16")                    \
  63   template(java_lang_Thread,                          "java/lang/Thread")                         \
  64   template(java_lang_ThreadGroup,                     "java/lang/ThreadGroup")                    \

  65   template(java_lang_Cloneable,                       "java/lang/Cloneable")                      \
  66   template(java_lang_Throwable,                       "java/lang/Throwable")                      \
  67   template(java_lang_ClassLoader,                     "java/lang/ClassLoader")                    \
  68   template(java_lang_ClassLoader_NativeLibrary,       "java/lang/ClassLoader\x024NativeLibrary")  \
  69   template(java_lang_ThreadDeath,                     "java/lang/ThreadDeath")                    \



  70   template(java_lang_Boolean,                         "java/lang/Boolean")                        \
  71   template(java_lang_Character,                       "java/lang/Character")                      \
  72   template(java_lang_Character_CharacterCache,        "java/lang/Character$CharacterCache")       \
  73   template(java_lang_CharacterDataLatin1,             "java/lang/CharacterDataLatin1")            \
  74   template(java_lang_Float,                           "java/lang/Float")                          \
  75   template(java_lang_Double,                          "java/lang/Double")                         \
  76   template(java_lang_Byte,                            "java/lang/Byte")                           \
  77   template(java_lang_Byte_ByteCache,                  "java/lang/Byte$ByteCache")                 \
  78   template(java_lang_Short,                           "java/lang/Short")                          \
  79   template(java_lang_Short_ShortCache,                "java/lang/Short$ShortCache")               \
  80   template(java_lang_Integer,                         "java/lang/Integer")                        \
  81   template(java_lang_Integer_IntegerCache,            "java/lang/Integer$IntegerCache")           \
  82   template(java_lang_Long,                            "java/lang/Long")                           \
  83   template(java_lang_Long_LongCache,                  "java/lang/Long$LongCache")                 \
  84   template(java_lang_Shutdown,                        "java/lang/Shutdown")                       \
  85   template(java_lang_ref_Reference,                   "java/lang/ref/Reference")                  \
  86   template(java_lang_ref_SoftReference,               "java/lang/ref/SoftReference")              \
  87   template(java_lang_ref_WeakReference,               "java/lang/ref/WeakReference")              \
  88   template(java_lang_ref_FinalReference,              "java/lang/ref/FinalReference")             \
  89   template(java_lang_ref_PhantomReference,            "java/lang/ref/PhantomReference")           \


 346   template(group_name,                                "group")                                    \
 347   template(daemon_name,                               "daemon")                                   \
 348   template(run_method_name,                           "run")                                      \
 349   template(exit_method_name,                          "exit")                                     \
 350   template(add_method_name,                           "add")                                      \
 351   template(remove_method_name,                        "remove")                                   \
 352   template(parent_name,                               "parent")                                   \
 353   template(threads_name,                              "threads")                                  \
 354   template(groups_name,                               "groups")                                   \
 355   template(maxPriority_name,                          "maxPriority")                              \
 356   template(destroyed_name,                            "destroyed")                                \
 357   template(nthreads_name,                             "nthreads")                                 \
 358   template(ngroups_name,                              "ngroups")                                  \
 359   template(shutdown_name,                             "shutdown")                                 \
 360   template(finalize_method_name,                      "finalize")                                 \
 361   template(reference_lock_name,                       "lock")                                     \
 362   template(reference_discovered_name,                 "discovered")                               \
 363   template(run_finalization_name,                     "runFinalization")                          \
 364   template(dispatchUncaughtException_name,            "dispatchUncaughtException")                \
 365   template(loadClass_name,                            "loadClass")                                \




























 366   template(get_name,                                  "get")                                      \
 367   template(put_name,                                  "put")                                      \
 368   template(type_name,                                 "type")                                     \
 369   template(findNative_name,                           "findNative")                               \
 370   template(deadChild_name,                            "deadChild")                                \
 371   template(getFromClass_name,                         "getFromClass")                             \
 372   template(dispatch_name,                             "dispatch")                                 \
 373   template(getPlatformClassLoader_name,               "getPlatformClassLoader")                   \
 374   template(getSystemClassLoader_name,                 "getSystemClassLoader")                     \
 375   template(fillInStackTrace_name,                     "fillInStackTrace")                         \
 376   template(getCause_name,                             "getCause")                                 \
 377   template(initCause_name,                            "initCause")                                \
 378   template(getProperty_name,                          "getProperty")                              \
 379   template(context_name,                              "context")                                  \
 380   template(contextClassLoader_name,                   "contextClassLoader")                       \
 381   template(inheritedAccessControlContext_name,        "inheritedAccessControlContext")            \
 382   template(getClassContext_name,                      "getClassContext")                          \
 383   template(wait_name,                                 "wait")                                     \
 384   template(checkPackageAccess_name,                   "checkPackageAccess")                       \
 385   template(newInstance0_name,                         "newInstance0")                             \
 386   template(forName_name,                              "forName")                                  \
 387   template(forName0_name,                             "forName0")                                 \
 388   template(isJavaIdentifierStart_name,                "isJavaIdentifierStart")                    \
 389   template(isJavaIdentifierPart_name,                 "isJavaIdentifierPart")                     \
 390   template(cache_field_name,                          "cache")                                    \
 391   template(value_name,                                "value")                                    \
 392   template(compact_strings_name,                      "COMPACT_STRINGS")                          \
 393   template(numberOfLeadingZeros_name,                 "numberOfLeadingZeros")                     \
 394   template(numberOfTrailingZeros_name,                "numberOfTrailingZeros")                    \
 395   template(bitCount_name,                             "bitCount")                                 \
 396   template(profile_name,                              "profile")                                  \
 397   template(equals_name,                               "equals")                                   \
 398   template(length_name,                               "length")                                   \
 399   template(target_name,                               "target")                                   \
 400   template(toString_name,                             "toString")                                 \
 401   template(values_name,                               "values")                                   \
 402   template(receiver_name,                             "receiver")                                 \
 403   template(vmtarget_name,                             "vmtarget")                                 \


 476   template(double_long_signature,                     "(D)J")                                     \
 477   template(double_double_signature,                   "(D)D")                                     \
 478   template(float_float_signature,                     "(F)F")                                     \
 479   template(int_float_signature,                       "(I)F")                                     \
 480   template(long_int_signature,                        "(J)I")                                     \
 481   template(long_long_signature,                       "(J)J")                                     \
 482   template(long_double_signature,                     "(J)D")                                     \
 483   template(byte_signature,                            "B")                                        \
 484   template(char_signature,                            "C")                                        \
 485   template(double_signature,                          "D")                                        \
 486   template(float_signature,                           "F")                                        \
 487   template(int_signature,                             "I")                                        \
 488   template(long_signature,                            "J")                                        \
 489   template(short_signature,                           "S")                                        \
 490   template(bool_signature,                            "Z")                                        \
 491   template(void_signature,                            "V")                                        \
 492   template(bool_array_signature,                      "[Z")                                       \
 493   template(byte_array_signature,                      "[B")                                       \
 494   template(char_array_signature,                      "[C")                                       \
 495   template(int_array_signature,                       "[I")                                       \




 496   template(object_void_signature,                     "(Ljava/lang/Object;)V")                    \
 497   template(object_int_signature,                      "(Ljava/lang/Object;)I")                    \
 498   template(object_boolean_signature,                  "(Ljava/lang/Object;)Z")                    \
 499   template(object_object_signature,                   "(Ljava/lang/Object;)Ljava/lang/Object;")   \
 500   template(string_void_signature,                     "(Ljava/lang/String;)V")                    \
 501   template(string_int_signature,                      "(Ljava/lang/String;)I")                    \
 502   template(throwable_void_signature,                  "(Ljava/lang/Throwable;)V")                 \
 503   template(void_throwable_signature,                  "()Ljava/lang/Throwable;")                  \
 504   template(throwable_throwable_signature,             "(Ljava/lang/Throwable;)Ljava/lang/Throwable;")             \
 505   template(class_void_signature,                      "(Ljava/lang/Class;)V")                     \
 506   template(class_int_signature,                       "(Ljava/lang/Class;)I")                     \
 507   template(class_long_signature,                      "(Ljava/lang/Class;)J")                     \
 508   template(class_boolean_signature,                   "(Ljava/lang/Class;)Z")                     \
 509   template(throwable_string_void_signature,           "(Ljava/lang/Throwable;Ljava/lang/String;)V")               \
 510   template(string_array_void_signature,               "([Ljava/lang/String;)V")                                   \
 511   template(string_array_string_array_void_signature,  "([Ljava/lang/String;[Ljava/lang/String;)V")                \
 512   template(thread_throwable_void_signature,           "(Ljava/lang/Thread;Ljava/lang/Throwable;)V")               \
 513   template(thread_void_signature,                     "(Ljava/lang/Thread;)V")                                    \
 514   template(threadgroup_runnable_void_signature,       "(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;)V")           \
 515   template(threadgroup_string_void_signature,         "(Ljava/lang/ThreadGroup;Ljava/lang/String;)V")             \


 840   do_intrinsic(_reverseBytes_s,           java_lang_Short,        reverseBytes_name,        short_short_signature, F_S) \
 841     /*  (symbol reverseBytes_name defined above) */                                                                     \
 842                                                                                                                         \
 843   do_intrinsic(_identityHashCode,         java_lang_System,       identityHashCode_name, object_int_signature,   F_S)   \
 844    do_name(     identityHashCode_name,                           "identityHashCode")                                    \
 845   do_intrinsic(_currentTimeMillis,        java_lang_System,       currentTimeMillis_name, void_long_signature,   F_S)   \
 846                                                                                                                         \
 847    do_name(     currentTimeMillis_name,                          "currentTimeMillis")                                   \
 848   do_intrinsic(_nanoTime,                 java_lang_System,       nanoTime_name,          void_long_signature,   F_S)   \
 849    do_name(     nanoTime_name,                                   "nanoTime")                                            \
 850                                                                                                                         \
 851   JFR_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias)                                               \
 852                                                                                                                         \
 853   do_intrinsic(_arraycopy,                java_lang_System,       arraycopy_name, arraycopy_signature,           F_S)   \
 854    do_name(     arraycopy_name,                                  "arraycopy")                                           \
 855    do_signature(arraycopy_signature,                             "(Ljava/lang/Object;ILjava/lang/Object;II)V")          \
 856   do_intrinsic(_isInterrupted,            java_lang_Thread,       isInterrupted_name, isInterrupted_signature,   F_R)   \
 857    do_name(     isInterrupted_name,                              "isInterrupted")                                       \
 858    do_signature(isInterrupted_signature,                         "(Z)Z")                                                \
 859   do_intrinsic(_currentThread,            java_lang_Thread,       currentThread_name, currentThread_signature,   F_S)   \
 860    do_name(     currentThread_name,                              "currentThread")                                       \
 861    do_signature(currentThread_signature,                         "()Ljava/lang/Thread;")                                \
 862                                                                                                                         \
 863   /* reflective intrinsics, for java/lang/Class, etc. */                                                                \
 864   do_intrinsic(_isAssignableFrom,         java_lang_Class,        isAssignableFrom_name, class_boolean_signature, F_RN) \
 865    do_name(     isAssignableFrom_name,                           "isAssignableFrom")                                    \
 866   do_intrinsic(_isInstance,               java_lang_Class,        isInstance_name, object_boolean_signature,     F_RN)  \
 867    do_name(     isInstance_name,                                 "isInstance")                                          \
 868   do_intrinsic(_getModifiers,             java_lang_Class,        getModifiers_name, void_int_signature,         F_RN)  \
 869    do_name(     getModifiers_name,                               "getModifiers")                                        \
 870   do_intrinsic(_isInterface,              java_lang_Class,        isInterface_name, void_boolean_signature,      F_RN)  \
 871    do_name(     isInterface_name,                                "isInterface")                                         \
 872   do_intrinsic(_isArray,                  java_lang_Class,        isArray_name, void_boolean_signature,          F_RN)  \
 873    do_name(     isArray_name,                                    "isArray")                                             \
 874   do_intrinsic(_isPrimitive,              java_lang_Class,        isPrimitive_name, void_boolean_signature,      F_RN)  \
 875    do_name(     isPrimitive_name,                                "isPrimitive")                                         \
 876   do_intrinsic(_getSuperclass,            java_lang_Class,        getSuperclass_name, void_class_signature,      F_RN)  \
 877    do_name(     getSuperclass_name,                              "getSuperclass")                                       \
 878   do_intrinsic(_Class_cast,               java_lang_Class,        Class_cast_name, object_object_signature,      F_R)   \
 879    do_name(     Class_cast_name,                                 "cast")                                                \
 880                                                                                                                         \


1063   do_intrinsic(_updateBytesCRC32,          java_util_zip_CRC32,   updateBytes_name, updateBytes_signature,       F_SN)  \
1064    do_name(     updateBytes_name,                                "updateBytes0")                                        \
1065    do_signature(updateBytes_signature,                           "(I[BII)I")                                            \
1066   do_intrinsic(_updateByteBufferCRC32,     java_util_zip_CRC32,   updateByteBuffer_name, updateByteBuffer_signature, F_SN) \
1067    do_name(     updateByteBuffer_name,                           "updateByteBuffer0")                                   \
1068    do_signature(updateByteBuffer_signature,                      "(IJII)I")                                             \
1069                                                                                                                         \
1070   /* support for java.util.zip.CRC32C */                                                                                \
1071   do_class(java_util_zip_CRC32C,          "java/util/zip/CRC32C")                                                       \
1072   do_intrinsic(_updateBytesCRC32C,         java_util_zip_CRC32C,  updateBytes_C_name, updateBytes_signature,       F_S) \
1073    do_name(     updateBytes_C_name,                               "updateBytes")                                        \
1074   do_intrinsic(_updateDirectByteBufferCRC32C, java_util_zip_CRC32C, updateDirectByteBuffer_C_name, updateByteBuffer_signature, F_S) \
1075    do_name(    updateDirectByteBuffer_C_name,                     "updateDirectByteBuffer")                             \
1076                                                                                                                         \
1077    /* support for java.util.zip.Adler32 */                                                                              \
1078   do_class(java_util_zip_Adler32,        "java/util/zip/Adler32")                                                       \
1079   do_intrinsic(_updateBytesAdler32,       java_util_zip_Adler32,  updateBytes_C_name,  updateBytes_signature,  F_SN)    \
1080   do_intrinsic(_updateByteBufferAdler32,  java_util_zip_Adler32,  updateByteBuffer_A_name,  updateByteBuffer_signature,  F_SN) \
1081    do_name(     updateByteBuffer_A_name,                          "updateByteBuffer")                                   \
1082                                                                                                                         \





















1083   /* support for UnsafeConstants */                                                                                     \
1084   do_class(jdk_internal_misc_UnsafeConstants,      "jdk/internal/misc/UnsafeConstants")                                 \
1085                                                                                                                         \
1086   /* support for Unsafe */                                                                                              \
1087   do_class(jdk_internal_misc_Unsafe,               "jdk/internal/misc/Unsafe")                                          \
1088   do_class(sun_misc_Unsafe,                        "sun/misc/Unsafe")                                                   \
1089                                                                                                                         \
1090   do_intrinsic(_allocateInstance,         jdk_internal_misc_Unsafe,     allocateInstance_name, allocateInstance_signature, F_RN) \
1091    do_name(     allocateInstance_name,                                  "allocateInstance")                                      \
1092    do_signature(allocateInstance_signature,                             "(Ljava/lang/Class;)Ljava/lang/Object;")                 \
1093   do_intrinsic(_allocateUninitializedArray, jdk_internal_misc_Unsafe,   allocateUninitializedArray_name, newArray_signature,  F_R) \
1094    do_name(     allocateUninitializedArray_name,                        "allocateUninitializedArray0")                           \
1095   do_intrinsic(_copyMemory,               jdk_internal_misc_Unsafe,     copyMemory_name, copyMemory_signature,         F_RN)     \
1096    do_name(     copyMemory_name,                                        "copyMemory0")                                           \
1097    do_signature(copyMemory_signature,                                   "(Ljava/lang/Object;JLjava/lang/Object;JJ)V")            \
1098   do_intrinsic(_loadFence,                jdk_internal_misc_Unsafe,     loadFence_name, loadFence_signature,           F_RN)     \
1099    do_name(     loadFence_name,                                         "loadFence")                                             \
1100    do_alias(    loadFence_signature,                                    void_method_signature)                                   \
1101   do_intrinsic(_storeFence,               jdk_internal_misc_Unsafe,     storeFence_name, storeFence_signature,         F_RN)     \
1102    do_name(     storeFence_name,                                        "storeFence")                                            \


1489   friend class VMStructs;
1490   friend class JVMCIVMStructs;
1491  public:
1492   // enum for figuring positions and size of array holding Symbol*s
1493   enum SID {
1494     NO_SID = 0,
1495 
1496     #define VM_SYMBOL_ENUM(name, string) VM_SYMBOL_ENUM_NAME(name),
1497     VM_SYMBOLS_DO(VM_SYMBOL_ENUM, VM_ALIAS_IGNORE)
1498     #undef VM_SYMBOL_ENUM
1499 
1500     SID_LIMIT,
1501 
1502     #define VM_ALIAS_ENUM(name, def) VM_SYMBOL_ENUM_NAME(name) = VM_SYMBOL_ENUM_NAME(def),
1503     VM_SYMBOLS_DO(VM_SYMBOL_IGNORE, VM_ALIAS_ENUM)
1504     #undef VM_ALIAS_ENUM
1505 
1506     FIRST_SID = NO_SID + 1
1507   };
1508   enum {
1509     log2_SID_LIMIT = 10         // checked by an assert at start-up
1510   };
1511 
1512  private:
1513   // The symbol array
1514   static Symbol* _symbols[];
1515 
1516   // Field signatures indexed by BasicType.
1517   static Symbol* _type_signatures[T_VOID+1];
1518 
1519  public:
1520   // Initialization
1521   static void initialize(TRAPS);
1522   // Accessing
1523   #define VM_SYMBOL_DECLARE(name, ignore)                 \
1524     static Symbol* name() {                               \
1525       return _symbols[VM_SYMBOL_ENUM_NAME(name)];         \
1526     }
1527   VM_SYMBOLS_DO(VM_SYMBOL_DECLARE, VM_SYMBOL_DECLARE)
1528   #undef VM_SYMBOL_DECLARE
1529 




  45 #define VM_SYMBOL_ENUM_NAME(name)    name##_enum
  46 #define VM_INTRINSIC_IGNORE(id, class, name, sig, flags) /*ignored*/
  47 #define VM_SYMBOL_IGNORE(id, name)                       /*ignored*/
  48 #define VM_ALIAS_IGNORE(id, id2)                         /*ignored*/
  49 
  50 // Mapping function names to values. New entries should be added below.
  51 
  52 #define VM_SYMBOLS_DO(template, do_alias)                                                         \
  53   /* commonly used class, package, module names */                                                \
  54   template(java_base,                                 "java.base")                                \
  55   template(java_lang_System,                          "java/lang/System")                         \
  56   template(java_lang_Object,                          "java/lang/Object")                         \
  57   template(java_lang_Class,                           "java/lang/Class")                          \
  58   template(java_lang_Package,                         "java/lang/Package")                        \
  59   template(java_lang_Module,                          "java/lang/Module")                         \
  60   template(java_lang_String,                          "java/lang/String")                         \
  61   template(java_lang_StringLatin1,                    "java/lang/StringLatin1")                   \
  62   template(java_lang_StringUTF16,                     "java/lang/StringUTF16")                    \
  63   template(java_lang_Thread,                          "java/lang/Thread")                         \
  64   template(java_lang_ThreadGroup,                     "java/lang/ThreadGroup")                    \
  65   template(java_lang_Fiber,                           "java/lang/Fiber")                          \
  66   template(java_lang_Cloneable,                       "java/lang/Cloneable")                      \
  67   template(java_lang_Throwable,                       "java/lang/Throwable")                      \
  68   template(java_lang_ClassLoader,                     "java/lang/ClassLoader")                    \
  69   template(java_lang_ClassLoader_NativeLibrary,       "java/lang/ClassLoader\x024NativeLibrary")  \
  70   template(java_lang_ThreadDeath,                     "java/lang/ThreadDeath")                    \
  71   template(java_lang_Runnable,                        "java/lang/Runnable")                       \
  72   /*template(java_lang_Continuation,                    "java/lang/Continuation")                 */\
  73   template(java_lang_ContinuationScope,               "java/lang/ContinuationScope")              \
  74   template(java_lang_Boolean,                         "java/lang/Boolean")                        \
  75   template(java_lang_Character,                       "java/lang/Character")                      \
  76   template(java_lang_Character_CharacterCache,        "java/lang/Character$CharacterCache")       \
  77   template(java_lang_CharacterDataLatin1,             "java/lang/CharacterDataLatin1")            \
  78   template(java_lang_Float,                           "java/lang/Float")                          \
  79   template(java_lang_Double,                          "java/lang/Double")                         \
  80   template(java_lang_Byte,                            "java/lang/Byte")                           \
  81   template(java_lang_Byte_ByteCache,                  "java/lang/Byte$ByteCache")                 \
  82   template(java_lang_Short,                           "java/lang/Short")                          \
  83   template(java_lang_Short_ShortCache,                "java/lang/Short$ShortCache")               \
  84   template(java_lang_Integer,                         "java/lang/Integer")                        \
  85   template(java_lang_Integer_IntegerCache,            "java/lang/Integer$IntegerCache")           \
  86   template(java_lang_Long,                            "java/lang/Long")                           \
  87   template(java_lang_Long_LongCache,                  "java/lang/Long$LongCache")                 \
  88   template(java_lang_Shutdown,                        "java/lang/Shutdown")                       \
  89   template(java_lang_ref_Reference,                   "java/lang/ref/Reference")                  \
  90   template(java_lang_ref_SoftReference,               "java/lang/ref/SoftReference")              \
  91   template(java_lang_ref_WeakReference,               "java/lang/ref/WeakReference")              \
  92   template(java_lang_ref_FinalReference,              "java/lang/ref/FinalReference")             \
  93   template(java_lang_ref_PhantomReference,            "java/lang/ref/PhantomReference")           \


 350   template(group_name,                                "group")                                    \
 351   template(daemon_name,                               "daemon")                                   \
 352   template(run_method_name,                           "run")                                      \
 353   template(exit_method_name,                          "exit")                                     \
 354   template(add_method_name,                           "add")                                      \
 355   template(remove_method_name,                        "remove")                                   \
 356   template(parent_name,                               "parent")                                   \
 357   template(threads_name,                              "threads")                                  \
 358   template(groups_name,                               "groups")                                   \
 359   template(maxPriority_name,                          "maxPriority")                              \
 360   template(destroyed_name,                            "destroyed")                                \
 361   template(nthreads_name,                             "nthreads")                                 \
 362   template(ngroups_name,                              "ngroups")                                  \
 363   template(shutdown_name,                             "shutdown")                                 \
 364   template(finalize_method_name,                      "finalize")                                 \
 365   template(reference_lock_name,                       "lock")                                     \
 366   template(reference_discovered_name,                 "discovered")                               \
 367   template(run_finalization_name,                     "runFinalization")                          \
 368   template(dispatchUncaughtException_name,            "dispatchUncaughtException")                \
 369   template(loadClass_name,                            "loadClass")                                \
 370   template(doYield_name,                              "doYield")                                  \
 371   template(jump_name,                                 "jump")                                     \
 372   template(doContinue_name,                           "doContinue")                               \
 373   template(getSP_name,                                "getSP")                                    \
 374   template(getFP_name,                                "getFP")                                    \
 375   template(runLevel_name,                             "runLevel")                                 \
 376   template(getPC_name,                                "getPC")                                    \
 377   template(enter_name,                                "enter")                                    \
 378   template(onContinue_name,                           "onContinue0")                              \
 379   template(getStacks_name,                            "getStacks")                                \
 380   template(onPinned_name,                             "onPinned0")                                \
 381   template(scope_name,                                "scope")                                    \
 382   template(yieldInfo_name,                            "yieldInfo")                                \
 383   template(entrySP_name,                              "entrySP")                                  \
 384   template(entryFP_name,                              "entryFP")                                  \
 385   template(entryPC_name,                              "entryPC")                                  \
 386   template(stack_name,                                "stack")                                    \
 387   template(maxSize_name,                              "maxSize")                                  \
 388   template(reset_name,                                "reset")                                    \
 389   template(mounted_name,                              "mounted")                                  \
 390   template(numFrames_name,                            "numFrames")                                \
 391   template(numInterpretedFrames_name,                 "numInterpretedFrames")                     \
 392   template(fp_name,                                   "fp")                                       \
 393   template(sp_name,                                   "sp")                                       \
 394   template(pc_name,                                   "pc")                                       \
 395   template(cs_name,                                   "cs")                                       \
 396   template(refStack_name,                             "refStack")                                 \
 397   template(refSP_name,                                "refSP")                                    \
 398   template(get_name,                                  "get")                                      \
 399   template(put_name,                                  "put")                                      \
 400   template(type_name,                                 "type")                                     \
 401   template(findNative_name,                           "findNative")                               \
 402   template(deadChild_name,                            "deadChild")                                \
 403   template(getFromClass_name,                         "getFromClass")                             \
 404   template(dispatch_name,                             "dispatch")                                 \
 405   template(getPlatformClassLoader_name,               "getPlatformClassLoader")                   \
 406   template(getSystemClassLoader_name,                 "getSystemClassLoader")                     \
 407   template(fillInStackTrace_name,                     "fillInStackTrace")                         \
 408   template(getCause_name,                             "getCause")                                 \
 409   template(initCause_name,                            "initCause")                                \
 410   template(getProperty_name,                          "getProperty")                              \
 411   template(context_name,                              "context")                                  \
 412   template(contextClassLoader_name,                   "contextClassLoader")                       \
 413   template(inheritedAccessControlContext_name,        "inheritedAccessControlContext")            \
 414   template(getClassContext_name,                      "getClassContext")                          \
 415   template(wait_name,                                 "wait0")                                     \
 416   template(checkPackageAccess_name,                   "checkPackageAccess")                       \
 417   template(newInstance0_name,                         "newInstance0")                             \
 418   template(forName_name,                              "forName")                                  \
 419   template(forName0_name,                             "forName0")                                 \
 420   template(isJavaIdentifierStart_name,                "isJavaIdentifierStart")                    \
 421   template(isJavaIdentifierPart_name,                 "isJavaIdentifierPart")                     \
 422   template(cache_field_name,                          "cache")                                    \
 423   template(value_name,                                "value")                                    \
 424   template(compact_strings_name,                      "COMPACT_STRINGS")                          \
 425   template(numberOfLeadingZeros_name,                 "numberOfLeadingZeros")                     \
 426   template(numberOfTrailingZeros_name,                "numberOfTrailingZeros")                    \
 427   template(bitCount_name,                             "bitCount")                                 \
 428   template(profile_name,                              "profile")                                  \
 429   template(equals_name,                               "equals")                                   \
 430   template(length_name,                               "length")                                   \
 431   template(target_name,                               "target")                                   \
 432   template(toString_name,                             "toString")                                 \
 433   template(values_name,                               "values")                                   \
 434   template(receiver_name,                             "receiver")                                 \
 435   template(vmtarget_name,                             "vmtarget")                                 \


 508   template(double_long_signature,                     "(D)J")                                     \
 509   template(double_double_signature,                   "(D)D")                                     \
 510   template(float_float_signature,                     "(F)F")                                     \
 511   template(int_float_signature,                       "(I)F")                                     \
 512   template(long_int_signature,                        "(J)I")                                     \
 513   template(long_long_signature,                       "(J)J")                                     \
 514   template(long_double_signature,                     "(J)D")                                     \
 515   template(byte_signature,                            "B")                                        \
 516   template(char_signature,                            "C")                                        \
 517   template(double_signature,                          "D")                                        \
 518   template(float_signature,                           "F")                                        \
 519   template(int_signature,                             "I")                                        \
 520   template(long_signature,                            "J")                                        \
 521   template(short_signature,                           "S")                                        \
 522   template(bool_signature,                            "Z")                                        \
 523   template(void_signature,                            "V")                                        \
 524   template(bool_array_signature,                      "[Z")                                       \
 525   template(byte_array_signature,                      "[B")                                       \
 526   template(char_array_signature,                      "[C")                                       \
 527   template(int_array_signature,                       "[I")                                       \
 528   template(runnable_signature,                        "Ljava/lang/Runnable;")                     \
 529   template(continuation_signature,                    "Ljava/lang/Continuation;")                 \
 530   template(continuationscope_signature,               "Ljava/lang/ContinuationScope;")            \
 531   template(fiber_signature,                           "Ljava/lang/Fiber;")                        \
 532   template(object_void_signature,                     "(Ljava/lang/Object;)V")                    \
 533   template(object_int_signature,                      "(Ljava/lang/Object;)I")                    \
 534   template(object_boolean_signature,                  "(Ljava/lang/Object;)Z")                    \
 535   template(object_object_signature,                   "(Ljava/lang/Object;)Ljava/lang/Object;")   \
 536   template(string_void_signature,                     "(Ljava/lang/String;)V")                    \
 537   template(string_int_signature,                      "(Ljava/lang/String;)I")                    \
 538   template(throwable_void_signature,                  "(Ljava/lang/Throwable;)V")                 \
 539   template(void_throwable_signature,                  "()Ljava/lang/Throwable;")                  \
 540   template(throwable_throwable_signature,             "(Ljava/lang/Throwable;)Ljava/lang/Throwable;")             \
 541   template(class_void_signature,                      "(Ljava/lang/Class;)V")                     \
 542   template(class_int_signature,                       "(Ljava/lang/Class;)I")                     \
 543   template(class_long_signature,                      "(Ljava/lang/Class;)J")                     \
 544   template(class_boolean_signature,                   "(Ljava/lang/Class;)Z")                     \
 545   template(throwable_string_void_signature,           "(Ljava/lang/Throwable;Ljava/lang/String;)V")               \
 546   template(string_array_void_signature,               "([Ljava/lang/String;)V")                                   \
 547   template(string_array_string_array_void_signature,  "([Ljava/lang/String;[Ljava/lang/String;)V")                \
 548   template(thread_throwable_void_signature,           "(Ljava/lang/Thread;Ljava/lang/Throwable;)V")               \
 549   template(thread_void_signature,                     "(Ljava/lang/Thread;)V")                                    \
 550   template(threadgroup_runnable_void_signature,       "(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;)V")           \
 551   template(threadgroup_string_void_signature,         "(Ljava/lang/ThreadGroup;Ljava/lang/String;)V")             \


 876   do_intrinsic(_reverseBytes_s,           java_lang_Short,        reverseBytes_name,        short_short_signature, F_S) \
 877     /*  (symbol reverseBytes_name defined above) */                                                                     \
 878                                                                                                                         \
 879   do_intrinsic(_identityHashCode,         java_lang_System,       identityHashCode_name, object_int_signature,   F_S)   \
 880    do_name(     identityHashCode_name,                           "identityHashCode")                                    \
 881   do_intrinsic(_currentTimeMillis,        java_lang_System,       currentTimeMillis_name, void_long_signature,   F_S)   \
 882                                                                                                                         \
 883    do_name(     currentTimeMillis_name,                          "currentTimeMillis")                                   \
 884   do_intrinsic(_nanoTime,                 java_lang_System,       nanoTime_name,          void_long_signature,   F_S)   \
 885    do_name(     nanoTime_name,                                   "nanoTime")                                            \
 886                                                                                                                         \
 887   JFR_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias)                                               \
 888                                                                                                                         \
 889   do_intrinsic(_arraycopy,                java_lang_System,       arraycopy_name, arraycopy_signature,           F_S)   \
 890    do_name(     arraycopy_name,                                  "arraycopy")                                           \
 891    do_signature(arraycopy_signature,                             "(Ljava/lang/Object;ILjava/lang/Object;II)V")          \
 892   do_intrinsic(_isInterrupted,            java_lang_Thread,       isInterrupted_name, isInterrupted_signature,   F_R)   \
 893    do_name(     isInterrupted_name,                              "isInterrupted")                                       \
 894    do_signature(isInterrupted_signature,                         "(Z)Z")                                                \
 895   do_intrinsic(_currentThread,            java_lang_Thread,       currentThread_name, currentThread_signature,   F_S)   \
 896    do_name(     currentThread_name,                              "currentThread0")                                      \
 897    do_signature(currentThread_signature,                         "()Ljava/lang/Thread;")                                \
 898                                                                                                                         \
 899   /* reflective intrinsics, for java/lang/Class, etc. */                                                                \
 900   do_intrinsic(_isAssignableFrom,         java_lang_Class,        isAssignableFrom_name, class_boolean_signature, F_RN) \
 901    do_name(     isAssignableFrom_name,                           "isAssignableFrom")                                    \
 902   do_intrinsic(_isInstance,               java_lang_Class,        isInstance_name, object_boolean_signature,     F_RN)  \
 903    do_name(     isInstance_name,                                 "isInstance")                                          \
 904   do_intrinsic(_getModifiers,             java_lang_Class,        getModifiers_name, void_int_signature,         F_RN)  \
 905    do_name(     getModifiers_name,                               "getModifiers")                                        \
 906   do_intrinsic(_isInterface,              java_lang_Class,        isInterface_name, void_boolean_signature,      F_RN)  \
 907    do_name(     isInterface_name,                                "isInterface")                                         \
 908   do_intrinsic(_isArray,                  java_lang_Class,        isArray_name, void_boolean_signature,          F_RN)  \
 909    do_name(     isArray_name,                                    "isArray")                                             \
 910   do_intrinsic(_isPrimitive,              java_lang_Class,        isPrimitive_name, void_boolean_signature,      F_RN)  \
 911    do_name(     isPrimitive_name,                                "isPrimitive")                                         \
 912   do_intrinsic(_getSuperclass,            java_lang_Class,        getSuperclass_name, void_class_signature,      F_RN)  \
 913    do_name(     getSuperclass_name,                              "getSuperclass")                                       \
 914   do_intrinsic(_Class_cast,               java_lang_Class,        Class_cast_name, object_object_signature,      F_R)   \
 915    do_name(     Class_cast_name,                                 "cast")                                                \
 916                                                                                                                         \


1099   do_intrinsic(_updateBytesCRC32,          java_util_zip_CRC32,   updateBytes_name, updateBytes_signature,       F_SN)  \
1100    do_name(     updateBytes_name,                                "updateBytes0")                                        \
1101    do_signature(updateBytes_signature,                           "(I[BII)I")                                            \
1102   do_intrinsic(_updateByteBufferCRC32,     java_util_zip_CRC32,   updateByteBuffer_name, updateByteBuffer_signature, F_SN) \
1103    do_name(     updateByteBuffer_name,                           "updateByteBuffer0")                                   \
1104    do_signature(updateByteBuffer_signature,                      "(IJII)I")                                             \
1105                                                                                                                         \
1106   /* support for java.util.zip.CRC32C */                                                                                \
1107   do_class(java_util_zip_CRC32C,          "java/util/zip/CRC32C")                                                       \
1108   do_intrinsic(_updateBytesCRC32C,         java_util_zip_CRC32C,  updateBytes_C_name, updateBytes_signature,       F_S) \
1109    do_name(     updateBytes_C_name,                               "updateBytes")                                        \
1110   do_intrinsic(_updateDirectByteBufferCRC32C, java_util_zip_CRC32C, updateDirectByteBuffer_C_name, updateByteBuffer_signature, F_S) \
1111    do_name(    updateDirectByteBuffer_C_name,                     "updateDirectByteBuffer")                             \
1112                                                                                                                         \
1113    /* support for java.util.zip.Adler32 */                                                                              \
1114   do_class(java_util_zip_Adler32,        "java/util/zip/Adler32")                                                       \
1115   do_intrinsic(_updateBytesAdler32,       java_util_zip_Adler32,  updateBytes_C_name,  updateBytes_signature,  F_SN)    \
1116   do_intrinsic(_updateByteBufferAdler32,  java_util_zip_Adler32,  updateByteBuffer_A_name,  updateByteBuffer_signature,  F_SN) \
1117    do_name(     updateByteBuffer_A_name,                          "updateByteBuffer")                                   \
1118                                                                                                                         \
1119   /* java/lang/Continuation */                                                                                                 \
1120   do_class(java_lang_Continuation,                      "java/lang/Continuation")                                              \
1121   do_intrinsic(_Continuation_enter,  java_lang_Continuation,       enter_name,    continuationEnter_signature, F_R)            \
1122     do_alias(continuationEnter_signature,                           void_method_signature)                                     \
1123   do_signature(continuationGetStacks_signature,                   "(III)V")                                                    \
1124   do_alias(continuationOnPinned_signature,                        int_void_signature)                                          \
1125   do_intrinsic(_Continuation_getSP,  java_lang_Continuation,       getSP_name,    continuationGetSP_signature, F_S)            \
1126     do_alias(continuationGetSP_signature,                            void_long_signature)                                      \
1127   do_intrinsic(_Continuation_getFP,  java_lang_Continuation,       getFP_name,    continuationGetFP_signature, F_S)            \
1128     do_alias(continuationGetFP_signature,                            void_long_signature)                                      \
1129   do_intrinsic(_Continuation_getPC,  java_lang_Continuation,       getPC_name,    continuationGetPC_signature, F_S)            \
1130     do_alias(continuationGetPC_signature,                            void_long_signature)                                      \
1131   do_intrinsic(_Continuation_doContinue,  java_lang_Continuation,  doContinue_name,    continuationDoContinue_signature, F_R)  \
1132     do_alias(continuationDoContinue_signature,                     void_method_signature)                                      \
1133   do_intrinsic(_Continuation_doYield,     java_lang_Continuation,  doYield_name,       continuationDoYield_signature, F_S)     \
1134     do_alias(continuationDoYield_signature,                          int_int_signature)                                        \
1135   do_intrinsic(_Continuation_jump,     java_lang_Continuation,     jump_name,       continuationJump_signature, F_S)           \
1136     do_signature(continuationJump_signature,                         "(JJJ)V")                                                 \
1137   do_intrinsic(_Continuation_runLevel,    java_lang_Continuation,  runLevel_name,    continuationrunLevel_signature, F_S)      \
1138     do_alias(continuationrunLevel_signature,                         void_int_signature)                                       \
1139                                                                                                                         \
1140   /* support for UnsafeConstants */                                                                                     \
1141   do_class(jdk_internal_misc_UnsafeConstants,      "jdk/internal/misc/UnsafeConstants")                                 \
1142                                                                                                                         \
1143   /* support for Unsafe */                                                                                              \
1144   do_class(jdk_internal_misc_Unsafe,               "jdk/internal/misc/Unsafe")                                          \
1145   do_class(sun_misc_Unsafe,                        "sun/misc/Unsafe")                                                   \
1146                                                                                                                         \
1147   do_intrinsic(_allocateInstance,         jdk_internal_misc_Unsafe,     allocateInstance_name, allocateInstance_signature, F_RN) \
1148    do_name(     allocateInstance_name,                                  "allocateInstance")                                      \
1149    do_signature(allocateInstance_signature,                             "(Ljava/lang/Class;)Ljava/lang/Object;")                 \
1150   do_intrinsic(_allocateUninitializedArray, jdk_internal_misc_Unsafe,   allocateUninitializedArray_name, newArray_signature,  F_R) \
1151    do_name(     allocateUninitializedArray_name,                        "allocateUninitializedArray0")                           \
1152   do_intrinsic(_copyMemory,               jdk_internal_misc_Unsafe,     copyMemory_name, copyMemory_signature,         F_RN)     \
1153    do_name(     copyMemory_name,                                        "copyMemory0")                                           \
1154    do_signature(copyMemory_signature,                                   "(Ljava/lang/Object;JLjava/lang/Object;JJ)V")            \
1155   do_intrinsic(_loadFence,                jdk_internal_misc_Unsafe,     loadFence_name, loadFence_signature,           F_RN)     \
1156    do_name(     loadFence_name,                                         "loadFence")                                             \
1157    do_alias(    loadFence_signature,                                    void_method_signature)                                   \
1158   do_intrinsic(_storeFence,               jdk_internal_misc_Unsafe,     storeFence_name, storeFence_signature,         F_RN)     \
1159    do_name(     storeFence_name,                                        "storeFence")                                            \


1546   friend class VMStructs;
1547   friend class JVMCIVMStructs;
1548  public:
1549   // enum for figuring positions and size of array holding Symbol*s
1550   enum SID {
1551     NO_SID = 0,
1552 
1553     #define VM_SYMBOL_ENUM(name, string) VM_SYMBOL_ENUM_NAME(name),
1554     VM_SYMBOLS_DO(VM_SYMBOL_ENUM, VM_ALIAS_IGNORE)
1555     #undef VM_SYMBOL_ENUM
1556 
1557     SID_LIMIT,
1558 
1559     #define VM_ALIAS_ENUM(name, def) VM_SYMBOL_ENUM_NAME(name) = VM_SYMBOL_ENUM_NAME(def),
1560     VM_SYMBOLS_DO(VM_SYMBOL_IGNORE, VM_ALIAS_ENUM)
1561     #undef VM_ALIAS_ENUM
1562 
1563     FIRST_SID = NO_SID + 1
1564   };
1565   enum {
1566     log2_SID_LIMIT = 11         // checked by an assert at start-up
1567   };
1568 
1569  private:
1570   // The symbol array
1571   static Symbol* _symbols[];
1572 
1573   // Field signatures indexed by BasicType.
1574   static Symbol* _type_signatures[T_VOID+1];
1575 
1576  public:
1577   // Initialization
1578   static void initialize(TRAPS);
1579   // Accessing
1580   #define VM_SYMBOL_DECLARE(name, ignore)                 \
1581     static Symbol* name() {                               \
1582       return _symbols[VM_SYMBOL_ENUM_NAME(name)];         \
1583     }
1584   VM_SYMBOLS_DO(VM_SYMBOL_DECLARE, VM_SYMBOL_DECLARE)
1585   #undef VM_SYMBOL_DECLARE
1586 


< prev index next >