< prev index next >

src/share/vm/classfile/vmSymbols.hpp

Print this page




  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  *
  23  */
  24 
  25 #ifndef SHARE_VM_CLASSFILE_VMSYMBOLS_HPP
  26 #define SHARE_VM_CLASSFILE_VMSYMBOLS_HPP
  27 
  28 #include "oops/symbol.hpp"
  29 #include "memory/iterator.hpp"
  30 #include "trace/traceMacros.hpp"

  31 
  32 // The class vmSymbols is a name space for fast lookup of
  33 // symbols commonly used in the VM.
  34 //
  35 // Sample usage:
  36 //
  37 //   Symbol* obj       = vmSymbols::java_lang_Object();
  38 
  39 
  40 // Useful sub-macros exported by this header file:
  41 
  42 #define VM_SYMBOL_ENUM_NAME(name)    name##_enum
  43 #define VM_INTRINSIC_IGNORE(id, class, name, sig, flags) /*ignored*/
  44 #define VM_SYMBOL_IGNORE(id, name)                       /*ignored*/
  45 #define VM_ALIAS_IGNORE(id, id2)                         /*ignored*/
  46 
  47 
  48 // Mapping function names to values. New entries should be added below.
  49 
  50 #define VM_SYMBOLS_DO(template, do_alias)                                                         \
  51   /* commonly used class names */                                                                 \
  52   template(java_lang_System,                          "java/lang/System")                         \
  53   template(java_lang_Object,                          "java/lang/Object")                         \
  54   template(java_lang_Class,                           "java/lang/Class")                          \
  55   template(java_lang_String,                          "java/lang/String")                         \
  56   template(java_lang_Thread,                          "java/lang/Thread")                         \
  57   template(java_lang_ThreadGroup,                     "java/lang/ThreadGroup")                    \
  58   template(java_lang_Cloneable,                       "java/lang/Cloneable")                      \
  59   template(java_lang_Throwable,                       "java/lang/Throwable")                      \
  60   template(java_lang_ClassLoader,                     "java/lang/ClassLoader")                    \
  61   template(java_lang_ClassLoader_NativeLibrary,       "java/lang/ClassLoader\x024NativeLibrary")  \
  62   template(java_lang_ThreadDeath,                     "java/lang/ThreadDeath")                    \
  63   template(java_lang_Boolean,                         "java/lang/Boolean")                        \
  64   template(java_lang_Character,                       "java/lang/Character")                      \
  65   template(java_lang_Character_CharacterCache,        "java/lang/Character$CharacterCache")       \
  66   template(java_lang_Float,                           "java/lang/Float")                          \
  67   template(java_lang_Double,                          "java/lang/Double")                         \


 284   template(java_lang_invoke_Stable_signature,         "Ljava/lang/invoke/Stable;")                \
 285   template(java_lang_invoke_LambdaForm_Compiled_signature, "Ljava/lang/invoke/LambdaForm$Compiled;") \
 286   template(java_lang_invoke_LambdaForm_Hidden_signature, "Ljava/lang/invoke/LambdaForm$Hidden;")  \
 287   template(java_lang_invoke_MethodHandleNatives_CallSiteContext_signature, "Ljava/lang/invoke/MethodHandleNatives$CallSiteContext;") \
 288   /* internal up-calls made only by the JVM, via class sun.invoke.MethodHandleNatives: */         \
 289   template(findMethodHandleType_name,                 "findMethodHandleType")                     \
 290   template(findMethodHandleType_signature,       "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;") \
 291   template(linkMethodHandleConstant_name,             "linkMethodHandleConstant")                 \
 292   template(linkMethodHandleConstant_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;") \
 293   template(linkMethod_name,                           "linkMethod")                               \
 294   template(linkMethod_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;") \
 295   template(linkCallSite_name,                         "linkCallSite")                             \
 296   template(linkCallSite_signature, "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;") \
 297   template(setTargetNormal_name,                      "setTargetNormal")                          \
 298   template(setTargetVolatile_name,                    "setTargetVolatile")                        \
 299   template(setTarget_signature,                       "(Ljava/lang/invoke/MethodHandle;)V")       \
 300   template(DEFAULT_CONTEXT_name,                      "DEFAULT_CONTEXT")                          \
 301   NOT_LP64(  do_alias(intptr_signature,               int_signature)  )                           \
 302   LP64_ONLY( do_alias(intptr_signature,               long_signature) )                           \
 303                                                                                                   \



 304   /* common method and field names */                                                             \
 305   template(object_initializer_name,                   "<init>")                                   \
 306   template(class_initializer_name,                    "<clinit>")                                 \
 307   template(println_name,                              "println")                                  \
 308   template(printStackTrace_name,                      "printStackTrace")                          \
 309   template(main_name,                                 "main")                                     \
 310   template(name_name,                                 "name")                                     \
 311   template(priority_name,                             "priority")                                 \
 312   template(stillborn_name,                            "stillborn")                                \
 313   template(group_name,                                "group")                                    \
 314   template(daemon_name,                               "daemon")                                   \
 315   template(eetop_name,                                "eetop")                                    \
 316   template(thread_status_name,                        "threadStatus")                             \
 317   template(run_method_name,                           "run")                                      \
 318   template(exit_method_name,                          "exit")                                     \
 319   template(add_method_name,                           "add")                                      \
 320   template(remove_method_name,                        "remove")                                   \
 321   template(parent_name,                               "parent")                                   \
 322   template(threads_name,                              "threads")                                  \
 323   template(groups_name,                               "groups")                                   \


 365   template(newInstance0_name,                         "newInstance0")                             \
 366   template(limit_name,                                "limit")                                    \
 367   template(member_name,                               "member")                                   \
 368   template(forName_name,                              "forName")                                  \
 369   template(forName0_name,                             "forName0")                                 \
 370   template(isJavaIdentifierStart_name,                "isJavaIdentifierStart")                    \
 371   template(isJavaIdentifierPart_name,                 "isJavaIdentifierPart")                     \
 372   template(exclusive_owner_thread_name,               "exclusiveOwnerThread")                     \
 373   template(park_blocker_name,                         "parkBlocker")                              \
 374   template(park_event_name,                           "nativeParkEventPointer")                   \
 375   template(cache_field_name,                          "cache")                                    \
 376   template(value_name,                                "value")                                    \
 377   template(offset_name,                               "offset")                                   \
 378   template(count_name,                                "count")                                    \
 379   template(hash_name,                                 "hash")                                     \
 380   template(numberOfLeadingZeros_name,                 "numberOfLeadingZeros")                     \
 381   template(numberOfTrailingZeros_name,                "numberOfTrailingZeros")                    \
 382   template(bitCount_name,                             "bitCount")                                 \
 383   template(profile_name,                              "profile")                                  \
 384   template(equals_name,                               "equals")                                   \

 385   template(target_name,                               "target")                                   \
 386   template(toString_name,                             "toString")                                 \
 387   template(values_name,                               "values")                                   \
 388   template(receiver_name,                             "receiver")                                 \
 389   template(vmtarget_name,                             "vmtarget")                                 \
 390   template(next_target_name,                          "next_target")                              \
 391   template(vmloader_name,                             "vmloader")                                 \
 392   template(vmindex_name,                              "vmindex")                                  \
 393   template(vmcount_name,                              "vmcount")                                  \
 394   template(vmentry_name,                              "vmentry")                                  \
 395   template(flags_name,                                "flags")                                    \
 396   template(rtype_name,                                "rtype")                                    \
 397   template(ptypes_name,                               "ptypes")                                   \
 398   template(form_name,                                 "form")                                     \
 399   template(basicType_name,                            "basicType")                                \
 400   template(append_name,                               "append")                                   \
 401   template(klass_name,                                "klass")                                    \
 402   template(array_klass_name,                          "array_klass")                              \
 403   template(oop_size_name,                             "oop_size")                                 \
 404   template(static_oop_field_count_name,               "static_oop_field_count")                   \


 415   template(getProtectionDomain_signature,             "(Ljava/security/CodeSource;)Ljava/security/ProtectionDomain;") \
 416   template(url_code_signer_array_void_signature,      "(Ljava/net/URL;[Ljava/security/CodeSigner;)V") \
 417                                                                                                   \
 418   /* non-intrinsic name/signature pairs: */                                                       \
 419   template(register_method_name,                      "register")                                 \
 420   do_alias(register_method_signature,         object_void_signature)                              \
 421                                                                                                   \
 422   /* name symbols needed by intrinsics */                                                         \
 423   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, template, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
 424                                                                                                   \
 425   /* common signatures names */                                                                   \
 426   template(void_method_signature,                     "()V")                                      \
 427   template(void_boolean_signature,                    "()Z")                                      \
 428   template(void_byte_signature,                       "()B")                                      \
 429   template(void_char_signature,                       "()C")                                      \
 430   template(void_short_signature,                      "()S")                                      \
 431   template(void_int_signature,                        "()I")                                      \
 432   template(void_long_signature,                       "()J")                                      \
 433   template(void_float_signature,                      "()F")                                      \
 434   template(void_double_signature,                     "()D")                                      \

 435   template(int_void_signature,                        "(I)V")                                     \
 436   template(int_int_signature,                         "(I)I")                                     \
 437   template(char_char_signature,                       "(C)C")                                     \
 438   template(short_short_signature,                     "(S)S")                                     \
 439   template(int_bool_signature,                        "(I)Z")                                     \
 440   template(float_int_signature,                       "(F)I")                                     \
 441   template(double_long_signature,                     "(D)J")                                     \
 442   template(double_double_signature,                   "(D)D")                                     \
 443   template(int_float_signature,                       "(I)F")                                     \
 444   template(long_int_signature,                        "(J)I")                                     \
 445   template(long_long_signature,                       "(J)J")                                     \
 446   template(long_double_signature,                     "(J)D")                                     \
 447   template(byte_signature,                            "B")                                        \
 448   template(char_signature,                            "C")                                        \
 449   template(double_signature,                          "D")                                        \
 450   template(float_signature,                           "F")                                        \
 451   template(int_signature,                             "I")                                        \
 452   template(long_signature,                            "J")                                        \
 453   template(short_signature,                           "S")                                        \
 454   template(bool_signature,                            "Z")                                        \




  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  *
  23  */
  24 
  25 #ifndef SHARE_VM_CLASSFILE_VMSYMBOLS_HPP
  26 #define SHARE_VM_CLASSFILE_VMSYMBOLS_HPP
  27 
  28 #include "oops/symbol.hpp"
  29 #include "memory/iterator.hpp"
  30 #include "trace/traceMacros.hpp"
  31 #include "jvmci/vmSymbols_jvmci.hpp"
  32 
  33 // The class vmSymbols is a name space for fast lookup of
  34 // symbols commonly used in the VM.
  35 //
  36 // Sample usage:
  37 //
  38 //   Symbol* obj       = vmSymbols::java_lang_Object();
  39 
  40 
  41 // Useful sub-macros exported by this header file:
  42 
  43 #define VM_SYMBOL_ENUM_NAME(name)    name##_enum
  44 #define VM_INTRINSIC_IGNORE(id, class, name, sig, flags) /*ignored*/
  45 #define VM_SYMBOL_IGNORE(id, name)                       /*ignored*/
  46 #define VM_ALIAS_IGNORE(id, id2)                         /*ignored*/
  47 

  48 // Mapping function names to values. New entries should be added below.
  49 
  50 #define VM_SYMBOLS_DO(template, do_alias)                                                         \
  51   /* commonly used class names */                                                                 \
  52   template(java_lang_System,                          "java/lang/System")                         \
  53   template(java_lang_Object,                          "java/lang/Object")                         \
  54   template(java_lang_Class,                           "java/lang/Class")                          \
  55   template(java_lang_String,                          "java/lang/String")                         \
  56   template(java_lang_Thread,                          "java/lang/Thread")                         \
  57   template(java_lang_ThreadGroup,                     "java/lang/ThreadGroup")                    \
  58   template(java_lang_Cloneable,                       "java/lang/Cloneable")                      \
  59   template(java_lang_Throwable,                       "java/lang/Throwable")                      \
  60   template(java_lang_ClassLoader,                     "java/lang/ClassLoader")                    \
  61   template(java_lang_ClassLoader_NativeLibrary,       "java/lang/ClassLoader\x024NativeLibrary")  \
  62   template(java_lang_ThreadDeath,                     "java/lang/ThreadDeath")                    \
  63   template(java_lang_Boolean,                         "java/lang/Boolean")                        \
  64   template(java_lang_Character,                       "java/lang/Character")                      \
  65   template(java_lang_Character_CharacterCache,        "java/lang/Character$CharacterCache")       \
  66   template(java_lang_Float,                           "java/lang/Float")                          \
  67   template(java_lang_Double,                          "java/lang/Double")                         \


 284   template(java_lang_invoke_Stable_signature,         "Ljava/lang/invoke/Stable;")                \
 285   template(java_lang_invoke_LambdaForm_Compiled_signature, "Ljava/lang/invoke/LambdaForm$Compiled;") \
 286   template(java_lang_invoke_LambdaForm_Hidden_signature, "Ljava/lang/invoke/LambdaForm$Hidden;")  \
 287   template(java_lang_invoke_MethodHandleNatives_CallSiteContext_signature, "Ljava/lang/invoke/MethodHandleNatives$CallSiteContext;") \
 288   /* internal up-calls made only by the JVM, via class sun.invoke.MethodHandleNatives: */         \
 289   template(findMethodHandleType_name,                 "findMethodHandleType")                     \
 290   template(findMethodHandleType_signature,       "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;") \
 291   template(linkMethodHandleConstant_name,             "linkMethodHandleConstant")                 \
 292   template(linkMethodHandleConstant_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;") \
 293   template(linkMethod_name,                           "linkMethod")                               \
 294   template(linkMethod_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;") \
 295   template(linkCallSite_name,                         "linkCallSite")                             \
 296   template(linkCallSite_signature, "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;") \
 297   template(setTargetNormal_name,                      "setTargetNormal")                          \
 298   template(setTargetVolatile_name,                    "setTargetVolatile")                        \
 299   template(setTarget_signature,                       "(Ljava/lang/invoke/MethodHandle;)V")       \
 300   template(DEFAULT_CONTEXT_name,                      "DEFAULT_CONTEXT")                          \
 301   NOT_LP64(  do_alias(intptr_signature,               int_signature)  )                           \
 302   LP64_ONLY( do_alias(intptr_signature,               long_signature) )                           \
 303                                                                                                                                       \
 304   /* Support for JVMCI */                                                                                                             \
 305   JVMCI_VM_SYMBOLS_DO(template, do_alias)                                                         \
 306                                                                                                   \
 307   /* common method and field names */                                                             \
 308   template(object_initializer_name,                   "<init>")                                   \
 309   template(class_initializer_name,                    "<clinit>")                                 \
 310   template(println_name,                              "println")                                  \
 311   template(printStackTrace_name,                      "printStackTrace")                          \
 312   template(main_name,                                 "main")                                     \
 313   template(name_name,                                 "name")                                     \
 314   template(priority_name,                             "priority")                                 \
 315   template(stillborn_name,                            "stillborn")                                \
 316   template(group_name,                                "group")                                    \
 317   template(daemon_name,                               "daemon")                                   \
 318   template(eetop_name,                                "eetop")                                    \
 319   template(thread_status_name,                        "threadStatus")                             \
 320   template(run_method_name,                           "run")                                      \
 321   template(exit_method_name,                          "exit")                                     \
 322   template(add_method_name,                           "add")                                      \
 323   template(remove_method_name,                        "remove")                                   \
 324   template(parent_name,                               "parent")                                   \
 325   template(threads_name,                              "threads")                                  \
 326   template(groups_name,                               "groups")                                   \


 368   template(newInstance0_name,                         "newInstance0")                             \
 369   template(limit_name,                                "limit")                                    \
 370   template(member_name,                               "member")                                   \
 371   template(forName_name,                              "forName")                                  \
 372   template(forName0_name,                             "forName0")                                 \
 373   template(isJavaIdentifierStart_name,                "isJavaIdentifierStart")                    \
 374   template(isJavaIdentifierPart_name,                 "isJavaIdentifierPart")                     \
 375   template(exclusive_owner_thread_name,               "exclusiveOwnerThread")                     \
 376   template(park_blocker_name,                         "parkBlocker")                              \
 377   template(park_event_name,                           "nativeParkEventPointer")                   \
 378   template(cache_field_name,                          "cache")                                    \
 379   template(value_name,                                "value")                                    \
 380   template(offset_name,                               "offset")                                   \
 381   template(count_name,                                "count")                                    \
 382   template(hash_name,                                 "hash")                                     \
 383   template(numberOfLeadingZeros_name,                 "numberOfLeadingZeros")                     \
 384   template(numberOfTrailingZeros_name,                "numberOfTrailingZeros")                    \
 385   template(bitCount_name,                             "bitCount")                                 \
 386   template(profile_name,                              "profile")                                  \
 387   template(equals_name,                               "equals")                                   \
 388   template(length_name,                               "length")                                   \
 389   template(target_name,                               "target")                                   \
 390   template(toString_name,                             "toString")                                 \
 391   template(values_name,                               "values")                                   \
 392   template(receiver_name,                             "receiver")                                 \
 393   template(vmtarget_name,                             "vmtarget")                                 \
 394   template(next_target_name,                          "next_target")                              \
 395   template(vmloader_name,                             "vmloader")                                 \
 396   template(vmindex_name,                              "vmindex")                                  \
 397   template(vmcount_name,                              "vmcount")                                  \
 398   template(vmentry_name,                              "vmentry")                                  \
 399   template(flags_name,                                "flags")                                    \
 400   template(rtype_name,                                "rtype")                                    \
 401   template(ptypes_name,                               "ptypes")                                   \
 402   template(form_name,                                 "form")                                     \
 403   template(basicType_name,                            "basicType")                                \
 404   template(append_name,                               "append")                                   \
 405   template(klass_name,                                "klass")                                    \
 406   template(array_klass_name,                          "array_klass")                              \
 407   template(oop_size_name,                             "oop_size")                                 \
 408   template(static_oop_field_count_name,               "static_oop_field_count")                   \


 419   template(getProtectionDomain_signature,             "(Ljava/security/CodeSource;)Ljava/security/ProtectionDomain;") \
 420   template(url_code_signer_array_void_signature,      "(Ljava/net/URL;[Ljava/security/CodeSigner;)V") \
 421                                                                                                   \
 422   /* non-intrinsic name/signature pairs: */                                                       \
 423   template(register_method_name,                      "register")                                 \
 424   do_alias(register_method_signature,         object_void_signature)                              \
 425                                                                                                   \
 426   /* name symbols needed by intrinsics */                                                         \
 427   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, template, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
 428                                                                                                   \
 429   /* common signatures names */                                                                   \
 430   template(void_method_signature,                     "()V")                                      \
 431   template(void_boolean_signature,                    "()Z")                                      \
 432   template(void_byte_signature,                       "()B")                                      \
 433   template(void_char_signature,                       "()C")                                      \
 434   template(void_short_signature,                      "()S")                                      \
 435   template(void_int_signature,                        "()I")                                      \
 436   template(void_long_signature,                       "()J")                                      \
 437   template(void_float_signature,                      "()F")                                      \
 438   template(void_double_signature,                     "()D")                                      \
 439   template(bool_void_signature,                       "(Z)V")                                     \
 440   template(int_void_signature,                        "(I)V")                                     \
 441   template(int_int_signature,                         "(I)I")                                     \
 442   template(char_char_signature,                       "(C)C")                                     \
 443   template(short_short_signature,                     "(S)S")                                     \
 444   template(int_bool_signature,                        "(I)Z")                                     \
 445   template(float_int_signature,                       "(F)I")                                     \
 446   template(double_long_signature,                     "(D)J")                                     \
 447   template(double_double_signature,                   "(D)D")                                     \
 448   template(int_float_signature,                       "(I)F")                                     \
 449   template(long_int_signature,                        "(J)I")                                     \
 450   template(long_long_signature,                       "(J)J")                                     \
 451   template(long_double_signature,                     "(J)D")                                     \
 452   template(byte_signature,                            "B")                                        \
 453   template(char_signature,                            "C")                                        \
 454   template(double_signature,                          "D")                                        \
 455   template(float_signature,                           "F")                                        \
 456   template(int_signature,                             "I")                                        \
 457   template(long_signature,                            "J")                                        \
 458   template(short_signature,                           "S")                                        \
 459   template(bool_signature,                            "Z")                                        \


< prev index next >