       1 /*
       2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
       3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       4  *
       5  * This code is free software; you can redistribute it and/or modify it
       6  * under the terms of the GNU General Public License version 2 only, as
       7  * published by the Free Software Foundation.
       8  *
       9  * This code is distributed in the hope that it will be useful, but WITHOUT
      10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      12  * version 2 for more details (a copy is included in the LICENSE file that
      13  * accompanied this code).
      14  *
      15  * You should have received a copy of the GNU General Public License version
      16  * 2 along with this work; if not, write to the Free Software Foundation,
      17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
      18  *
      19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      20  * or visit www.oracle.com if you need additional information or have any
      21  * questions.
      22  *
      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")                         \
      68   template(java_lang_Byte,                            "java/lang/Byte")                           \
      69   template(java_lang_Byte_ByteCache,                  "java/lang/Byte$ByteCache")                 \
      70   template(java_lang_Short,                           "java/lang/Short")                          \
      71   template(java_lang_Short_ShortCache,                "java/lang/Short$ShortCache")               \
      72   template(java_lang_Integer,                         "java/lang/Integer")                        \
      73   template(java_lang_Integer_IntegerCache,            "java/lang/Integer$IntegerCache")           \
      74   template(java_lang_Long,                            "java/lang/Long")                           \
      75   template(java_lang_Long_LongCache,                  "java/lang/Long$LongCache")                 \
      76   template(java_lang_Shutdown,                        "java/lang/Shutdown")                       \
      77   template(java_lang_ref_Reference,                   "java/lang/ref/Reference")                  \
      78   template(java_lang_ref_SoftReference,               "java/lang/ref/SoftReference")              \
      79   template(java_lang_ref_WeakReference,               "java/lang/ref/WeakReference")              \
      80   template(java_lang_ref_FinalReference,              "java/lang/ref/FinalReference")             \
      81   template(java_lang_ref_PhantomReference,            "java/lang/ref/PhantomReference")           \
      82   template(sun_misc_Cleaner,                          "sun/misc/Cleaner")                         \
      83   template(java_lang_ref_Finalizer,                   "java/lang/ref/Finalizer")                  \
      84   template(java_lang_reflect_AccessibleObject,        "java/lang/reflect/AccessibleObject")       \
      85   template(java_lang_reflect_Method,                  "java/lang/reflect/Method")                 \
      86   template(java_lang_reflect_Constructor,             "java/lang/reflect/Constructor")            \
      87   template(java_lang_reflect_Field,                   "java/lang/reflect/Field")                  \
      88   template(java_lang_reflect_Parameter,               "java/lang/reflect/Parameter")              \
      89   template(java_lang_reflect_Array,                   "java/lang/reflect/Array")                  \
      90   template(java_lang_StringBuffer,                    "java/lang/StringBuffer")                   \
      91   template(java_lang_StringBuilder,                   "java/lang/StringBuilder")                  \
      92   template(java_lang_CharSequence,                    "java/lang/CharSequence")                   \
      93   template(java_lang_SecurityManager,                 "java/lang/SecurityManager")                \
      94   template(java_security_AccessControlContext,        "java/security/AccessControlContext")       \
      95   template(java_security_CodeSource,                  "java/security/CodeSource")                 \
      96   template(java_security_ProtectionDomain,            "java/security/ProtectionDomain")           \
      97   template(java_security_SecureClassLoader,           "java/security/SecureClassLoader")          \
      98   template(java_net_URLClassLoader,                   "java/net/URLClassLoader")                  \
      99   template(java_net_URL,                              "java/net/URL")                             \
     100   template(java_util_jar_Manifest,                    "java/util/jar/Manifest")                   \
     101   template(impliesCreateAccessControlContext_name,    "impliesCreateAccessControlContext")        \
     102   template(java_io_OutputStream,                      "java/io/OutputStream")                     \
     103   template(java_io_Reader,                            "java/io/Reader")                           \
     104   template(java_io_BufferedReader,                    "java/io/BufferedReader")                   \
     105   template(java_io_File,                              "java/io/File")                             \
     106   template(java_io_FileInputStream,                   "java/io/FileInputStream")                  \
     107   template(java_io_ByteArrayInputStream,              "java/io/ByteArrayInputStream")             \
     108   template(java_io_Serializable,                      "java/io/Serializable")                     \
     109   template(java_util_Arrays,                          "java/util/Arrays")                         \
     110   template(java_util_Properties,                      "java/util/Properties")                     \
     111   template(java_util_Vector,                          "java/util/Vector")                         \
     112   template(java_util_AbstractList,                    "java/util/AbstractList")                   \
     113   template(java_util_Hashtable,                       "java/util/Hashtable")                      \
     114   template(java_lang_Compiler,                        "java/lang/Compiler")                       \
     115   template(sun_misc_Signal,                           "sun/misc/Signal")                          \
     116   template(sun_misc_Launcher,                         "sun/misc/Launcher")                        \
     117   template(java_lang_AssertionStatusDirectives,       "java/lang/AssertionStatusDirectives")      \
     118   template(getBootClassPathEntryForClass_name,        "getBootClassPathEntryForClass")            \
     119   template(sun_misc_PostVMInitHook,                   "sun/misc/PostVMInitHook")                  \
     120   template(sun_misc_Launcher_ExtClassLoader,          "sun/misc/Launcher$ExtClassLoader")         \
     121                                                                                                   \
     122   /* Java runtime version access */                                                               \
     123   template(sun_misc_Version,                          "sun/misc/Version")                         \
     124   template(java_runtime_name_name,                    "java_runtime_name")                        \
     125   template(java_runtime_version_name,                 "java_runtime_version")                     \
     126                                                                                                   \
     127   /* class file format tags */                                                                    \
     128   template(tag_source_file,                           "SourceFile")                               \
     129   template(tag_inner_classes,                         "InnerClasses")                             \
     130   template(tag_constant_value,                        "ConstantValue")                            \
     131   template(tag_code,                                  "Code")                                     \
     132   template(tag_exceptions,                            "Exceptions")                               \
     133   template(tag_line_number_table,                     "LineNumberTable")                          \
     134   template(tag_local_variable_table,                  "LocalVariableTable")                       \
     135   template(tag_local_variable_type_table,             "LocalVariableTypeTable")                   \
     136   template(tag_method_parameters,                     "MethodParameters")                         \
     137   template(tag_stack_map_table,                       "StackMapTable")                            \
     138   template(tag_synthetic,                             "Synthetic")                                \
     139   template(tag_deprecated,                            "Deprecated")                               \
     140   template(tag_source_debug_extension,                "SourceDebugExtension")                     \
     141   template(tag_signature,                             "Signature")                                \
     142   template(tag_runtime_visible_annotations,           "RuntimeVisibleAnnotations")                \
     143   template(tag_runtime_invisible_annotations,         "RuntimeInvisibleAnnotations")              \
     144   template(tag_runtime_visible_parameter_annotations, "RuntimeVisibleParameterAnnotations")       \
     145   template(tag_runtime_invisible_parameter_annotations,"RuntimeInvisibleParameterAnnotations")    \
     146   template(tag_annotation_default,                    "AnnotationDefault")                        \
     147   template(tag_runtime_visible_type_annotations,      "RuntimeVisibleTypeAnnotations")            \
     148   template(tag_runtime_invisible_type_annotations,    "RuntimeInvisibleTypeAnnotations")          \
     149   template(tag_enclosing_method,                      "EnclosingMethod")                          \
     150   template(tag_bootstrap_methods,                     "BootstrapMethods")                         \
     151                                                                                                   \
     152   /* exception klasses: at least all exceptions thrown by the VM have entries here */             \
     153   template(java_lang_ArithmeticException,             "java/lang/ArithmeticException")            \
     154   template(java_lang_ArrayIndexOutOfBoundsException,  "java/lang/ArrayIndexOutOfBoundsException") \
     155   template(java_lang_ArrayStoreException,             "java/lang/ArrayStoreException")            \
     156   template(java_lang_ClassCastException,              "java/lang/ClassCastException")             \
     157   template(java_lang_ClassNotFoundException,          "java/lang/ClassNotFoundException")         \
     158   template(java_lang_CloneNotSupportedException,      "java/lang/CloneNotSupportedException")     \
     159   template(java_lang_IllegalAccessException,          "java/lang/IllegalAccessException")         \
     160   template(java_lang_IllegalArgumentException,        "java/lang/IllegalArgumentException")       \
     161   template(java_lang_IllegalStateException,           "java/lang/IllegalStateException")          \
     162   template(java_lang_IllegalMonitorStateException,    "java/lang/IllegalMonitorStateException")   \
     163   template(java_lang_IllegalThreadStateException,     "java/lang/IllegalThreadStateException")    \
     164   template(java_lang_IndexOutOfBoundsException,       "java/lang/IndexOutOfBoundsException")      \
     165   template(java_lang_InstantiationException,          "java/lang/InstantiationException")         \
     166   template(java_lang_InstantiationError,              "java/lang/InstantiationError")             \
     167   template(java_lang_InterruptedException,            "java/lang/InterruptedException")           \
     168   template(java_lang_BootstrapMethodError,            "java/lang/BootstrapMethodError")           \
     169   template(java_lang_LinkageError,                    "java/lang/LinkageError")                   \
     170   template(java_lang_NegativeArraySizeException,      "java/lang/NegativeArraySizeException")     \
     171   template(java_lang_NoSuchFieldException,            "java/lang/NoSuchFieldException")           \
     172   template(java_lang_NoSuchMethodException,           "java/lang/NoSuchMethodException")          \
     173   template(java_lang_NullPointerException,            "java/lang/NullPointerException")           \
     174   template(java_lang_StringIndexOutOfBoundsException, "java/lang/StringIndexOutOfBoundsException")\
     175   template(java_lang_UnsupportedOperationException,   "java/lang/UnsupportedOperationException")  \
     176   template(java_lang_InvalidClassException,           "java/lang/InvalidClassException")          \
     177   template(java_lang_reflect_InvocationTargetException, "java/lang/reflect/InvocationTargetException") \
     178   template(java_lang_Exception,                       "java/lang/Exception")                      \
     179   template(java_lang_RuntimeException,                "java/lang/RuntimeException")               \
     180   template(java_io_IOException,                       "java/io/IOException")                      \
     181   template(java_security_PrivilegedActionException,   "java/security/PrivilegedActionException")  \
     182                                                                                                   \
     183   /* error klasses: at least all errors thrown by the VM have entries here */                     \
     184   template(java_lang_AbstractMethodError,             "java/lang/AbstractMethodError")            \
     185   template(java_lang_ClassCircularityError,           "java/lang/ClassCircularityError")          \
     186   template(java_lang_ClassFormatError,                "java/lang/ClassFormatError")               \
     187   template(java_lang_UnsupportedClassVersionError,    "java/lang/UnsupportedClassVersionError")   \
     188   template(java_lang_Error,                           "java/lang/Error")                          \
     189   template(java_lang_ExceptionInInitializerError,     "java/lang/ExceptionInInitializerError")    \
     190   template(java_lang_IllegalAccessError,              "java/lang/IllegalAccessError")             \
     191   template(java_lang_IncompatibleClassChangeError,    "java/lang/IncompatibleClassChangeError")   \
     192   template(java_lang_InternalError,                   "java/lang/InternalError")                  \
     193   template(java_lang_NoClassDefFoundError,            "java/lang/NoClassDefFoundError")           \
     194   template(java_lang_NoSuchFieldError,                "java/lang/NoSuchFieldError")               \
     195   template(java_lang_NoSuchMethodError,               "java/lang/NoSuchMethodError")              \
     196   template(java_lang_OutOfMemoryError,                "java/lang/OutOfMemoryError")               \
     197   template(java_lang_UnsatisfiedLinkError,            "java/lang/UnsatisfiedLinkError")           \
     198   template(java_lang_VerifyError,                     "java/lang/VerifyError")                    \
     199   template(java_lang_SecurityException,               "java/lang/SecurityException")              \
     200   template(java_lang_VirtualMachineError,             "java/lang/VirtualMachineError")            \
     201   template(java_lang_StackOverflowError,              "java/lang/StackOverflowError")             \
     202   template(java_lang_StackTraceElement,               "java/lang/StackTraceElement")              \
     203                                                                                                   \
     204   /* Concurrency support */                                                                       \
     205   template(java_util_concurrent_locks_AbstractOwnableSynchronizer,   "java/util/concurrent/locks/AbstractOwnableSynchronizer") \
     206   template(sun_misc_Contended_signature,              "Lsun/misc/Contended;")                     \
     207                                                                                                   \
     208   /* class symbols needed by intrinsics */                                                        \
     209   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, template, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
     210                                                                                                   \
     211   /* Support for reflection based on dynamic bytecode generation (JDK 1.4 and above) */           \
     212                                                                                                   \
     213   template(sun_reflect_FieldInfo,                     "sun/reflect/FieldInfo")                    \
     214   template(sun_reflect_MethodInfo,                    "sun/reflect/MethodInfo")                   \
     215   template(sun_reflect_MagicAccessorImpl,             "sun/reflect/MagicAccessorImpl")            \
     216   template(sun_reflect_MethodAccessorImpl,            "sun/reflect/MethodAccessorImpl")           \
     217   template(sun_reflect_ConstructorAccessorImpl,       "sun/reflect/ConstructorAccessorImpl")      \
     218   template(sun_reflect_SerializationConstructorAccessorImpl, "sun/reflect/SerializationConstructorAccessorImpl") \
     219   template(sun_reflect_DelegatingClassLoader,         "sun/reflect/DelegatingClassLoader")        \
     220   template(sun_reflect_Reflection,                    "sun/reflect/Reflection")                   \
     221   template(sun_reflect_CallerSensitive,               "sun/reflect/CallerSensitive")              \
     222   template(sun_reflect_CallerSensitive_signature,     "Lsun/reflect/CallerSensitive;")            \
     223   template(checkedExceptions_name,                    "checkedExceptions")                        \
     224   template(clazz_name,                                "clazz")                                    \
     225   template(exceptionTypes_name,                       "exceptionTypes")                           \
     226   template(modifiers_name,                            "modifiers")                                \
     227   template(newConstructor_name,                       "newConstructor")                           \
     228   template(newConstructor_signature,                  "(Lsun/reflect/MethodInfo;)Ljava/lang/reflect/Constructor;") \
     229   template(newField_name,                             "newField")                                 \
     230   template(newField_signature,                        "(Lsun/reflect/FieldInfo;)Ljava/lang/reflect/Field;") \
     231   template(newMethod_name,                            "newMethod")                                \
     232   template(newMethod_signature,                       "(Lsun/reflect/MethodInfo;)Ljava/lang/reflect/Method;") \
     233   template(invokeBasic_name,                          "invokeBasic")                              \
     234   template(linkToVirtual_name,                        "linkToVirtual")                            \
     235   template(linkToStatic_name,                         "linkToStatic")                             \
     236   template(linkToSpecial_name,                        "linkToSpecial")                            \
     237   template(linkToInterface_name,                      "linkToInterface")                          \
     238   template(compiledLambdaForm_name,                   "<compiledLambdaForm>")  /*fake name*/      \
     239   template(star_name,                                 "*") /*not really a name*/                  \
     240   template(invoke_name,                               "invoke")                                   \
     241   template(override_name,                             "override")                                 \
     242   template(parameterTypes_name,                       "parameterTypes")                           \
     243   template(returnType_name,                           "returnType")                               \
     244   template(signature_name,                            "signature")                                \
     245   template(slot_name,                                 "slot")                                     \
     246                                                                                                   \
     247   /* Support for annotations (JDK 1.5 and above) */                                               \
     248                                                                                                   \
     249   template(annotations_name,                          "annotations")                              \
     250   template(index_name,                                "index")                                    \
     251   template(executable_name,                           "executable")                               \
     252   template(parameter_annotations_name,                "parameterAnnotations")                     \
     253   template(annotation_default_name,                   "annotationDefault")                        \
     254   template(sun_reflect_ConstantPool,                  "sun/reflect/ConstantPool")                 \
     255   template(ConstantPool_name,                         "constantPoolOop")                          \
     256   template(sun_reflect_UnsafeStaticFieldAccessorImpl, "sun/reflect/UnsafeStaticFieldAccessorImpl")\
     257   template(base_name,                                 "base")                                     \
     258   /* Type Annotations (JDK 8 and above) */                                                        \
     259   template(type_annotations_name,                     "typeAnnotations")                          \
     260                                                                                                   \
     261                                                                                                   \
     262   /* Support for JSR 292 & invokedynamic (JDK 1.7 and above) */                                   \
     263   template(java_lang_invoke_CallSite,                 "java/lang/invoke/CallSite")                \
     264   template(java_lang_invoke_ConstantCallSite,         "java/lang/invoke/ConstantCallSite")        \
     265   template(java_lang_invoke_DirectMethodHandle,       "java/lang/invoke/DirectMethodHandle")      \
     266   template(java_lang_invoke_MutableCallSite,          "java/lang/invoke/MutableCallSite")         \
     267   template(java_lang_invoke_VolatileCallSite,         "java/lang/invoke/VolatileCallSite")        \
     268   template(java_lang_invoke_MethodHandle,             "java/lang/invoke/MethodHandle")            \
     269   template(java_lang_invoke_MethodType,               "java/lang/invoke/MethodType")              \
     270   template(java_lang_invoke_MethodType_signature,     "Ljava/lang/invoke/MethodType;")            \
     271   template(java_lang_invoke_MemberName_signature,     "Ljava/lang/invoke/MemberName;")            \
     272   template(java_lang_invoke_LambdaForm_signature,     "Ljava/lang/invoke/LambdaForm;")            \
     273   template(java_lang_invoke_MethodHandle_signature,   "Ljava/lang/invoke/MethodHandle;")          \
     274   /* internal classes known only to the JVM: */                                                   \
     275   template(java_lang_invoke_MemberName,               "java/lang/invoke/MemberName")              \
     276   template(java_lang_invoke_MethodHandleNatives,      "java/lang/invoke/MethodHandleNatives")     \
     277   template(java_lang_invoke_LambdaForm,               "java/lang/invoke/LambdaForm")              \
     278   template(java_lang_invoke_ForceInline_signature,    "Ljava/lang/invoke/ForceInline;")           \
     279   template(java_lang_invoke_DontInline_signature,     "Ljava/lang/invoke/DontInline;")            \
     280   template(java_lang_invoke_Stable_signature,         "Ljava/lang/invoke/Stable;")                \
     281   template(java_lang_invoke_LambdaForm_Compiled_signature, "Ljava/lang/invoke/LambdaForm$Compiled;") \
     282   template(java_lang_invoke_LambdaForm_Hidden_signature, "Ljava/lang/invoke/LambdaForm$Hidden;")  \
     283   /* internal up-calls made only by the JVM, via class sun.invoke.MethodHandleNatives: */         \
     284   template(findMethodHandleType_name,                 "findMethodHandleType")                     \
     285   template(findMethodHandleType_signature,       "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;") \
     286   template(linkMethodHandleConstant_name,             "linkMethodHandleConstant")                 \
     287   template(linkMethodHandleConstant_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;") \
     288   template(linkMethod_name,                           "linkMethod")                               \
     289   template(linkMethod_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;") \
     290   template(linkCallSite_name,                         "linkCallSite")                             \
     291   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;") \
     292   template(setTargetNormal_name,                      "setTargetNormal")                          \
     293   template(setTargetVolatile_name,                    "setTargetVolatile")                        \
     294   template(setTarget_signature,                       "(Ljava/lang/invoke/MethodHandle;)V")       \
     295   NOT_LP64(  do_alias(intptr_signature,               int_signature)  )                           \
     296   LP64_ONLY( do_alias(intptr_signature,               long_signature) )                           \
     297                                                                                                   \
     298   /* common method and field names */                                                             \
     299   template(object_initializer_name,                   "<init>")                                   \
     300   template(class_initializer_name,                    "<clinit>")                                 \
     301   template(println_name,                              "println")                                  \
     302   template(printStackTrace_name,                      "printStackTrace")                          \
     303   template(main_name,                                 "main")                                     \
     304   template(name_name,                                 "name")                                     \
     305   template(priority_name,                             "priority")                                 \
     306   template(stillborn_name,                            "stillborn")                                \
     307   template(group_name,                                "group")                                    \
     308   template(daemon_name,                               "daemon")                                   \
     309   template(eetop_name,                                "eetop")                                    \
     310   template(thread_status_name,                        "threadStatus")                             \
     311   template(run_method_name,                           "run")                                      \
     312   template(exit_method_name,                          "exit")                                     \
     313   template(add_method_name,                           "add")                                      \
     314   template(remove_method_name,                        "remove")                                   \
     315   template(parent_name,                               "parent")                                   \
     316   template(threads_name,                              "threads")                                  \
     317   template(groups_name,                               "groups")                                   \
     318   template(maxPriority_name,                          "maxPriority")                              \
     319   template(destroyed_name,                            "destroyed")                                \
     320   template(vmAllowSuspension_name,                    "vmAllowSuspension")                        \
     321   template(nthreads_name,                             "nthreads")                                 \
     322   template(ngroups_name,                              "ngroups")                                  \
     323   template(shutdown_method_name,                      "shutdown")                                 \
     324   template(finalize_method_name,                      "finalize")                                 \
     325   template(reference_lock_name,                       "lock")                                     \
     326   template(reference_discovered_name,                 "discovered")                               \
     327   template(run_finalization_name,                     "runFinalization")                          \
     328   template(run_finalizers_on_exit_name,               "runFinalizersOnExit")                      \
     329   template(dispatchUncaughtException_name,            "dispatchUncaughtException")                \
     330   template(initializeSystemClass_name,                "initializeSystemClass")                    \
     331   template(loadClass_name,                            "loadClass")                                \
     332   template(loadClassInternal_name,                    "loadClassInternal")                        \
     333   template(get_name,                                  "get")                                      \
     334   template(put_name,                                  "put")                                      \
     335   template(type_name,                                 "type")                                     \
     336   template(findNative_name,                           "findNative")                               \
     337   template(deadChild_name,                            "deadChild")                                \
     338   template(addClass_name,                             "addClass")                                 \
     339   template(throwIllegalAccessError_name,              "throwIllegalAccessError")                  \
     340   template(getFromClass_name,                         "getFromClass")                             \
     341   template(dispatch_name,                             "dispatch")                                 \
     342   template(getSystemClassLoader_name,                 "getSystemClassLoader")                     \
     343   template(fillInStackTrace_name,                     "fillInStackTrace")                         \
     344   template(fillInStackTrace0_name,                    "fillInStackTrace0")                        \
     345   template(getCause_name,                             "getCause")                                 \
     346   template(initCause_name,                            "initCause")                                \
     347   template(setProperty_name,                          "setProperty")                              \
     348   template(getProperty_name,                          "getProperty")                              \
     349   template(context_name,                              "context")                                  \
     350   template(privilegedContext_name,                    "privilegedContext")                        \
     351   template(contextClassLoader_name,                   "contextClassLoader")                       \
     352   template(inheritedAccessControlContext_name,        "inheritedAccessControlContext")            \
     353   template(isPrivileged_name,                         "isPrivileged")                             \
     354   template(isAuthorized_name,                         "isAuthorized")                             \
     355   template(getClassContext_name,                      "getClassContext")                          \
     356   template(wait_name,                                 "wait")                                     \
     357   template(checkPackageAccess_name,                   "checkPackageAccess")                       \
     358   template(stackSize_name,                            "stackSize")                                \
     359   template(thread_id_name,                            "tid")                                      \
     360   template(newInstance0_name,                         "newInstance0")                             \
     361   template(limit_name,                                "limit")                                    \
     362   template(member_name,                               "member")                                   \
     363   template(forName_name,                              "forName")                                  \
     364   template(forName0_name,                             "forName0")                                 \
     365   template(isJavaIdentifierStart_name,                "isJavaIdentifierStart")                    \
     366   template(isJavaIdentifierPart_name,                 "isJavaIdentifierPart")                     \
     367   template(exclusive_owner_thread_name,               "exclusiveOwnerThread")                     \
     368   template(park_blocker_name,                         "parkBlocker")                              \
     369   template(park_event_name,                           "nativeParkEventPointer")                   \
     370   template(cache_field_name,                          "cache")                                    \
     371   template(value_name,                                "value")                                    \
     372   template(offset_name,                               "offset")                                   \
     373   template(count_name,                                "count")                                    \
     374   template(hash_name,                                 "hash")                                     \
     375   template(numberOfLeadingZeros_name,                 "numberOfLeadingZeros")                     \
     376   template(numberOfTrailingZeros_name,                "numberOfTrailingZeros")                    \
     377   template(bitCount_name,                             "bitCount")                                 \
     378   template(profile_name,                              "profile")                                  \
     379   template(equals_name,                               "equals")                                   \
     380   template(target_name,                               "target")                                   \
     381   template(toString_name,                             "toString")                                 \
     382   template(values_name,                               "values")                                   \
     383   template(receiver_name,                             "receiver")                                 \
     384   template(vmtarget_name,                             "vmtarget")                                 \
     385   template(next_target_name,                          "next_target")                              \
     386   template(vmloader_name,                             "vmloader")                                 \
     387   template(vmindex_name,                              "vmindex")                                  \
     388   template(vmcount_name,                              "vmcount")                                  \
     389   template(vmentry_name,                              "vmentry")                                  \
     390   template(flags_name,                                "flags")                                    \
     391   template(rtype_name,                                "rtype")                                    \
     392   template(ptypes_name,                               "ptypes")                                   \
     393   template(form_name,                                 "form")                                     \
     394   template(basicType_name,                            "basicType")                                \
     395   template(append_name,                               "append")                                   \
     396   template(klass_name,                                "klass")                                    \
     397   template(array_klass_name,                          "array_klass")                              \
     398   template(oop_size_name,                             "oop_size")                                 \
     399   template(static_oop_field_count_name,               "static_oop_field_count")                   \
     400   template(protection_domain_name,                    "protection_domain")                        \
     401   template(signers_name,                              "signers_name")                             \
     402   template(loader_data_name,                          "loader_data")                              \
     403   template(dependencies_name,                         "dependencies")                             \
     404   template(input_stream_void_signature,               "(Ljava/io/InputStream;)V")                 \
     405   template(getFileURL_name,                           "getFileURL")                               \
     406   template(getFileURL_signature,                      "(Ljava/io/File;)Ljava/net/URL;")           \
     407   template(definePackageInternal_name,                "definePackageInternal")                    \
     408   template(definePackageInternal_signature,           "(Ljava/lang/String;Ljava/util/jar/Manifest;Ljava/net/URL;)V") \
     409   template(getProtectionDomain_name,                  "getProtectionDomain")                      \
     410   template(getProtectionDomain_signature,             "(Ljava/security/CodeSource;)Ljava/security/ProtectionDomain;") \
     411   template(url_code_signer_array_void_signature,      "(Ljava/net/URL;[Ljava/security/CodeSigner;)V") \
     412                                                                                                   \
     413   /* non-intrinsic name/signature pairs: */                                                       \
     414   template(register_method_name,                      "register")                                 \
     415   do_alias(register_method_signature,         object_void_signature)                              \
     416                                                                                                   \
     417   /* name symbols needed by intrinsics */                                                         \
     418   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, template, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
     419                                                                                                   \
     420   /* common signatures names */                                                                   \
     421   template(void_method_signature,                     "()V")                                      \
     422   template(void_boolean_signature,                    "()Z")                                      \
     423   template(void_byte_signature,                       "()B")                                      \
     424   template(void_char_signature,                       "()C")                                      \
     425   template(void_short_signature,                      "()S")                                      \
     426   template(void_int_signature,                        "()I")                                      \
     427   template(void_long_signature,                       "()J")                                      \
     428   template(void_float_signature,                      "()F")                                      \
     429   template(void_double_signature,                     "()D")                                      \
     430   template(int_void_signature,                        "(I)V")                                     \
     431   template(int_int_signature,                         "(I)I")                                     \
     432   template(char_char_signature,                       "(C)C")                                     \
     433   template(short_short_signature,                     "(S)S")                                     \
     434   template(int_bool_signature,                        "(I)Z")                                     \
     435   template(float_int_signature,                       "(F)I")                                     \
     436   template(double_long_signature,                     "(D)J")                                     \
     437   template(double_double_signature,                   "(D)D")                                     \
     438   template(int_float_signature,                       "(I)F")                                     \
     439   template(long_int_signature,                        "(J)I")                                     \
     440   template(long_long_signature,                       "(J)J")                                     \
     441   template(long_double_signature,                     "(J)D")                                     \
     442   template(byte_signature,                            "B")                                        \
     443   template(char_signature,                            "C")                                        \
     444   template(double_signature,                          "D")                                        \
     445   template(float_signature,                           "F")                                        \
     446   template(int_signature,                             "I")                                        \
     447   template(long_signature,                            "J")                                        \
     448   template(short_signature,                           "S")                                        \
     449   template(bool_signature,                            "Z")                                        \
     450   template(void_signature,                            "V")                                        \
     451   template(byte_array_signature,                      "[B")                                       \
     452   template(char_array_signature,                      "[C")                                       \
     453   template(int_array_signature,                       "[I")                                       \
     454   template(object_void_signature,                     "(Ljava/lang/Object;)V")                    \
     455   template(object_int_signature,                      "(Ljava/lang/Object;)I")                    \
     456   template(object_boolean_signature,                  "(Ljava/lang/Object;)Z")                    \
     457   template(object_object_signature,                   "(Ljava/lang/Object;)Ljava/lang/Object;")   \
     458   template(string_void_signature,                     "(Ljava/lang/String;)V")                    \
     459   template(string_int_signature,                      "(Ljava/lang/String;)I")                    \
     460   template(throwable_void_signature,                  "(Ljava/lang/Throwable;)V")                 \
     461   template(void_throwable_signature,                  "()Ljava/lang/Throwable;")                  \
     462   template(throwable_throwable_signature,             "(Ljava/lang/Throwable;)Ljava/lang/Throwable;")             \
     463   template(class_void_signature,                      "(Ljava/lang/Class;)V")                     \
     464   template(class_int_signature,                       "(Ljava/lang/Class;)I")                     \
     465   template(class_long_signature,                      "(Ljava/lang/Class;)J")                     \
     466   template(class_boolean_signature,                   "(Ljava/lang/Class;)Z")                     \
     467   template(throwable_string_void_signature,           "(Ljava/lang/Throwable;Ljava/lang/String;)V")               \
     468   template(string_array_void_signature,               "([Ljava/lang/String;)V")                                   \
     469   template(string_array_string_array_void_signature,  "([Ljava/lang/String;[Ljava/lang/String;)V")                \
     470   template(thread_throwable_void_signature,           "(Ljava/lang/Thread;Ljava/lang/Throwable;)V")               \
     471   template(thread_void_signature,                     "(Ljava/lang/Thread;)V")                                    \
     472   template(threadgroup_runnable_void_signature,       "(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;)V")           \
     473   template(threadgroup_string_void_signature,         "(Ljava/lang/ThreadGroup;Ljava/lang/String;)V")             \
     474   template(string_class_signature,                    "(Ljava/lang/String;)Ljava/lang/Class;")                    \
     475   template(object_object_object_signature,            "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \
     476   template(string_string_string_signature,            "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;") \
     477   template(string_string_signature,                   "(Ljava/lang/String;)Ljava/lang/String;")                   \
     478   template(classloader_string_long_signature,         "(Ljava/lang/ClassLoader;Ljava/lang/String;)J")             \
     479   template(byte_array_void_signature,                 "([B)V")                                                    \
     480   template(char_array_void_signature,                 "([C)V")                                                    \
     481   template(int_int_void_signature,                    "(II)V")                                                    \
     482   template(long_long_void_signature,                  "(JJ)V")                                                    \
     483   template(void_classloader_signature,                "()Ljava/lang/ClassLoader;")                                \
     484   template(void_object_signature,                     "()Ljava/lang/Object;")                                     \
     485   template(void_class_signature,                      "()Ljava/lang/Class;")                                      \
     486   template(void_class_array_signature,                "()[Ljava/lang/Class;")                                     \
     487   template(void_string_signature,                     "()Ljava/lang/String;")                                     \
     488   template(object_array_object_signature,             "([Ljava/lang/Object;)Ljava/lang/Object;")                  \
     489   template(object_object_array_object_signature,      "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;")\
     490   template(exception_void_signature,                  "(Ljava/lang/Exception;)V")                                 \
     491   template(protectiondomain_signature,                "[Ljava/security/ProtectionDomain;")                        \
     492   template(accesscontrolcontext_signature,            "Ljava/security/AccessControlContext;")                     \
     493   template(class_protectiondomain_signature,          "(Ljava/lang/Class;Ljava/security/ProtectionDomain;)V")     \
     494   template(thread_signature,                          "Ljava/lang/Thread;")                                       \
     495   template(thread_array_signature,                    "[Ljava/lang/Thread;")                                      \
     496   template(threadgroup_signature,                     "Ljava/lang/ThreadGroup;")                                  \
     497   template(threadgroup_array_signature,               "[Ljava/lang/ThreadGroup;")                                 \
     498   template(class_array_signature,                     "[Ljava/lang/Class;")                                       \
     499   template(classloader_signature,                     "Ljava/lang/ClassLoader;")                                  \
     500   template(object_signature,                          "Ljava/lang/Object;")                                       \
     501   template(class_signature,                           "Ljava/lang/Class;")                                        \
     502   template(string_signature,                          "Ljava/lang/String;")                                       \
     503   template(reference_signature,                       "Ljava/lang/ref/Reference;")                                \
     504   template(executable_signature,                      "Ljava/lang/reflect/Executable;")                           \
     505   template(concurrenthashmap_signature,               "Ljava/util/concurrent/ConcurrentHashMap;")                 \
     506   template(String_StringBuilder_signature,            "(Ljava/lang/String;)Ljava/lang/StringBuilder;")            \
     507   template(int_StringBuilder_signature,               "(I)Ljava/lang/StringBuilder;")                             \
     508   template(char_StringBuilder_signature,              "(C)Ljava/lang/StringBuilder;")                             \
     509   template(String_StringBuffer_signature,             "(Ljava/lang/String;)Ljava/lang/StringBuffer;")             \
     510   template(int_StringBuffer_signature,                "(I)Ljava/lang/StringBuffer;")                              \
     511   template(char_StringBuffer_signature,               "(C)Ljava/lang/StringBuffer;")                              \
     512   template(int_String_signature,                      "(I)Ljava/lang/String;")                                    \
     513   template(codesource_permissioncollection_signature, "(Ljava/security/CodeSource;Ljava/security/PermissionCollection;)V") \
     514   /* signature symbols needed by intrinsics */                                                                    \
     515   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, template, VM_ALIAS_IGNORE)            \
     516                                                                                                                   \
     517   /* symbol aliases needed by intrinsics */                                                                       \
     518   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, do_alias)           \
     519                                                                                                                   \
     520   /* returned by the C1 compiler in case there's not enough memory to allocate a new symbol*/                     \
     521   template(dummy_symbol,                              "illegal symbol")                                           \
     522                                                                                                                   \
     523   /* used by ClassFormatError when class name is not known yet */                                                 \
     524   template(unknown_class_name,                        "<Unknown>")                                                \
     525                                                                                                                   \
     526   /* used to identify class loaders handling parallel class loading */                                            \
     527   template(parallelCapable_name,                      "parallelLockMap")                                          \
     528                                                                                                                   \
     529   /* JVM monitoring and management support */                                                                     \
     530   template(java_lang_StackTraceElement_array,          "[Ljava/lang/StackTraceElement;")                          \
     531   template(java_lang_management_ThreadState,           "java/lang/management/ThreadState")                        \
     532   template(java_lang_management_MemoryUsage,           "java/lang/management/MemoryUsage")                        \
     533   template(java_lang_management_ThreadInfo,            "java/lang/management/ThreadInfo")                         \
     534   template(sun_management_ManagementFactory,           "sun/management/ManagementFactory")                        \
     535   template(sun_management_Sensor,                      "sun/management/Sensor")                                   \
     536   template(sun_management_Agent,                       "sun/management/Agent")                                    \
     537   template(sun_management_DiagnosticCommandImpl,       "sun/management/DiagnosticCommandImpl")                    \
     538   template(sun_management_GarbageCollectorImpl,        "sun/management/GarbageCollectorImpl")                     \
     539   template(sun_management_ManagementFactoryHelper,     "sun/management/ManagementFactoryHelper")                  \
     540   template(getDiagnosticCommandMBean_name,             "getDiagnosticCommandMBean")                               \
     541   template(getDiagnosticCommandMBean_signature,        "()Lcom/sun/management/DiagnosticCommandMBean;")           \
     542   template(getGcInfoBuilder_name,                      "getGcInfoBuilder")                                        \
     543   template(getGcInfoBuilder_signature,                 "()Lsun/management/GcInfoBuilder;")                        \
     544   template(com_sun_management_GcInfo,                  "com/sun/management/GcInfo")                               \
     545   template(com_sun_management_GcInfo_constructor_signature, "(Lsun/management/GcInfoBuilder;JJJ[Ljava/lang/management/MemoryUsage;[Ljava/lang/management/MemoryUsage;[Ljava/lang/Object;)V") \
     546   template(createGCNotification_name,                  "createGCNotification")                                    \
     547   template(createGCNotification_signature,             "(JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/sun/management/GcInfo;)V") \
     548   template(createDiagnosticFrameworkNotification_name, "createDiagnosticFrameworkNotification")                   \
     549   template(createMemoryPoolMBean_name,                 "createMemoryPoolMBean")                                   \
     550   template(createMemoryManagerMBean_name,              "createMemoryManagerMBean")                                \
     551   template(createGarbageCollectorMBean_name,           "createGarbageCollectorMBean")                             \
     552   template(createMemoryPoolMBean_signature,            "(Ljava/lang/String;ZJJ)Ljava/lang/management/MemoryPoolMBean;") \
     553   template(createMemoryManagerMBean_signature,         "(Ljava/lang/String;)Ljava/lang/management/MemoryManagerMBean;") \
     554   template(createGarbageCollectorMBean_signature,      "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/management/GarbageCollectorMBean;") \
     555   template(trigger_name,                               "trigger")                                                 \
     556   template(clear_name,                                 "clear")                                                   \
     557   template(trigger_method_signature,                   "(ILjava/lang/management/MemoryUsage;)V")                                                 \
     558   template(startAgent_name,                            "startAgent")                                              \
     559   template(startRemoteAgent_name,                      "startRemoteManagementAgent")                              \
     560   template(startLocalAgent_name,                       "startLocalManagementAgent")                               \
     561   template(stopRemoteAgent_name,                       "stopRemoteManagementAgent")                               \
     562   template(java_lang_management_ThreadInfo_constructor_signature, "(Ljava/lang/Thread;ILjava/lang/Object;Ljava/lang/Thread;JJJJ[Ljava/lang/StackTraceElement;)V") \
     563   template(java_lang_management_ThreadInfo_with_locks_constructor_signature, "(Ljava/lang/Thread;ILjava/lang/Object;Ljava/lang/Thread;JJJJ[Ljava/lang/StackTraceElement;[Ljava/lang/Object;[I[Ljava/lang/Object;)V") \
     564   template(long_long_long_long_void_signature,         "(JJJJ)V")                                                 \
     565                                                                                                                   \
     566   template(java_lang_management_MemoryPoolMXBean,      "java/lang/management/MemoryPoolMXBean")                   \
     567   template(java_lang_management_MemoryManagerMXBean,   "java/lang/management/MemoryManagerMXBean")                \
     568   template(java_lang_management_GarbageCollectorMXBean,"java/lang/management/GarbageCollectorMXBean")             \
     569   template(gcInfoBuilder_name,                         "gcInfoBuilder")                                           \
     570   template(createMemoryPool_name,                      "createMemoryPool")                                        \
     571   template(createMemoryManager_name,                   "createMemoryManager")                                     \
     572   template(createGarbageCollector_name,                "createGarbageCollector")                                  \
     573   template(createMemoryPool_signature,                 "(Ljava/lang/String;ZJJ)Ljava/lang/management/MemoryPoolMXBean;") \
     574   template(createMemoryManager_signature,              "(Ljava/lang/String;)Ljava/lang/management/MemoryManagerMXBean;") \
     575   template(createGarbageCollector_signature,           "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/management/GarbageCollectorMXBean;") \
     576   template(addThreadDumpForMonitors_name,              "addThreadDumpForMonitors")                                \
     577   template(addThreadDumpForSynchronizers_name,         "addThreadDumpForSynchronizers")                           \
     578   template(addThreadDumpForMonitors_signature,         "(Ljava/lang/management/ThreadInfo;[Ljava/lang/Object;[I)V") \
     579   template(addThreadDumpForSynchronizers_signature,    "(Ljava/lang/management/ThreadInfo;[Ljava/lang/Object;)V")   \
     580                                                                                                                   \
     581   /* JVMTI/java.lang.instrument support and VM Attach mechanism */                                                \
     582   template(sun_misc_VMSupport,                         "sun/misc/VMSupport")                                      \
     583   template(appendToClassPathForInstrumentation_name,   "appendToClassPathForInstrumentation")                     \
     584   do_alias(appendToClassPathForInstrumentation_signature, string_void_signature)                                  \
     585   template(serializePropertiesToByteArray_name,        "serializePropertiesToByteArray")                          \
     586   template(serializePropertiesToByteArray_signature,   "()[B")                                                    \
     587   template(serializeAgentPropertiesToByteArray_name,   "serializeAgentPropertiesToByteArray")                     \
     588   template(classRedefinedCount_name,                   "classRedefinedCount")                                     \
     589   template(classLoader_name,                           "classLoader")                                             \
     590   template(componentType_name,                         "componentType")                                           \
     591                                                                                                                   \
     592   /* trace signatures */                                                                                          \
     593   TRACE_TEMPLATES(template)                                                                                       \
     594                                                                                                                   \
     595   /*end*/
     596
     597 // Here are all the intrinsics known to the runtime and the CI.
     598 // Each intrinsic consists of a public enum name (like _hashCode),
     599 // followed by a specification of its klass, name, and signature:
     600 //    template(<id>,  <klass>,  <name>, <sig>, <FCODE>)
     601 //
     602 // If you add an intrinsic here, you must also define its name
     603 // and signature as members of the VM symbols.  The VM symbols for
     604 // the intrinsic name and signature may be defined above.
     605 //
     606 // Because the VM_SYMBOLS_DO macro makes reference to VM_INTRINSICS_DO,
     607 // you can also define an intrinsic's name and/or signature locally to the
     608 // intrinsic, if this makes sense.  (It often does make sense.)
     609 //
     610 // For example:
     611 //    do_intrinsic(_foo,  java_lang_Object,  foo_name, foo_signature, F_xx)
     612 //     do_name(     foo_name, "foo")
     613 //     do_signature(foo_signature, "()F")
     614 // klass      = vmSymbols::java_lang_Object()
     615 // name       = vmSymbols::foo_name()
     616 // signature  = vmSymbols::foo_signature()
     617 //
     618 // The name and/or signature might be a "well known" symbol
     619 // like "equal" or "()I", in which case there will be no local
     620 // re-definition of the symbol.
     621 //
     622 // The do_class, do_name, and do_signature calls are all used for the
     623 // same purpose:  Define yet another VM symbol.  They could all be merged
     624 // into a common 'do_symbol' call, but it seems useful to record our
     625 // intentions here about kinds of symbols (class vs. name vs. signature).
     626 //
     627 // The F_xx is one of the Flags enum; see below.
     628 //
     629 // for Emacs: (let ((c-backslash-column 120) (c-backslash-max-column 120)) (c-backslash-region (point) (point-max) nil t))
     630 #define VM_INTRINSICS_DO(do_intrinsic, do_class, do_name, do_signature, do_alias)                                       \
     631   do_intrinsic(_hashCode,                 java_lang_Object,       hashCode_name, void_int_signature,             F_R)   \
     632    do_name(     hashCode_name,                                   "hashCode")                                            \
     633   do_intrinsic(_getClass,                 java_lang_Object,       getClass_name, void_class_signature,           F_R)   \
     634    do_name(     getClass_name,                                   "getClass")                                            \
     635   do_intrinsic(_clone,                    java_lang_Object,       clone_name, void_object_signature,             F_R)   \
     636    do_name(     clone_name,                                      "clone")                                               \
     637                                                                                                                         \
     638   /* Math & StrictMath intrinsics are defined in terms of just a few signatures: */                                     \
     639   do_class(java_lang_Math,                "java/lang/Math")                                                             \
     640   do_class(java_lang_StrictMath,          "java/lang/StrictMath")                                                       \
     641   do_signature(double2_double_signature,  "(DD)D")                                                                      \
     642   do_signature(int2_int_signature,        "(II)I")                                                                      \
     643   do_signature(long2_long_signature,      "(JJ)J")                                                                         \
     644                                                                                                                         \
     645   /* here are the math names, all together: */                                                                          \
     646   do_name(abs_name,"abs")       do_name(sin_name,"sin")         do_name(cos_name,"cos")                                 \
     647   do_name(tan_name,"tan")       do_name(atan2_name,"atan2")     do_name(sqrt_name,"sqrt")                               \
     648   do_name(log_name,"log")       do_name(log10_name,"log10")     do_name(pow_name,"pow")                                 \
     649   do_name(exp_name,"exp")       do_name(min_name,"min")         do_name(max_name,"max")                                 \
     650                                                                                                                         \
     651   do_name(addExact_name,"addExact")                                                                                     \
     652   do_name(decrementExact_name,"decrementExact")                                                                         \
     653   do_name(incrementExact_name,"incrementExact")                                                                         \
     654   do_name(multiplyExact_name,"multiplyExact")                                                                           \
     655   do_name(negateExact_name,"negateExact")                                                                               \
     656   do_name(subtractExact_name,"subtractExact")                                                                           \
     657                                                                                                                         \
     658   do_intrinsic(_dabs,                     java_lang_Math,         abs_name,   double_double_signature,           F_S)   \
     659   do_intrinsic(_dsin,                     java_lang_Math,         sin_name,   double_double_signature,           F_S)   \
     660   do_intrinsic(_dcos,                     java_lang_Math,         cos_name,   double_double_signature,           F_S)   \
     661   do_intrinsic(_dtan,                     java_lang_Math,         tan_name,   double_double_signature,           F_S)   \
     662   do_intrinsic(_datan2,                   java_lang_Math,         atan2_name, double2_double_signature,          F_S)   \
     663   do_intrinsic(_dsqrt,                    java_lang_Math,         sqrt_name,  double_double_signature,           F_S)   \
     664   do_intrinsic(_dlog,                     java_lang_Math,         log_name,   double_double_signature,           F_S)   \
     665   do_intrinsic(_dlog10,                   java_lang_Math,         log10_name, double_double_signature,           F_S)   \
     666   do_intrinsic(_dpow,                     java_lang_Math,         pow_name,   double2_double_signature,          F_S)   \
     667   do_intrinsic(_dexp,                     java_lang_Math,         exp_name,   double_double_signature,           F_S)   \
     668   do_intrinsic(_min,                      java_lang_Math,         min_name,   int2_int_signature,                F_S)   \
     669   do_intrinsic(_max,                      java_lang_Math,         max_name,   int2_int_signature,                F_S)   \
     670   do_intrinsic(_addExactI,                java_lang_Math,         addExact_name, int2_int_signature,             F_S)   \
     671   do_intrinsic(_addExactL,                java_lang_Math,         addExact_name, long2_long_signature,           F_S)   \
     672   do_intrinsic(_decrementExactI,          java_lang_Math,         decrementExact_name, int_int_signature,        F_S)   \
     673   do_intrinsic(_decrementExactL,          java_lang_Math,         decrementExact_name, long_long_signature,      F_S)   \
     674   do_intrinsic(_incrementExactI,          java_lang_Math,         incrementExact_name, int_int_signature,        F_S)   \
     675   do_intrinsic(_incrementExactL,          java_lang_Math,         incrementExact_name, long_long_signature,      F_S)   \
     676   do_intrinsic(_multiplyExactI,           java_lang_Math,         multiplyExact_name, int2_int_signature,        F_S)   \
     677   do_intrinsic(_multiplyExactL,           java_lang_Math,         multiplyExact_name, long2_long_signature,      F_S)   \
     678   do_intrinsic(_negateExactI,             java_lang_Math,         negateExact_name, int_int_signature,           F_S)   \
     679   do_intrinsic(_negateExactL,             java_lang_Math,         negateExact_name, long_long_signature,         F_S)   \
     680   do_intrinsic(_subtractExactI,           java_lang_Math,         subtractExact_name, int2_int_signature,        F_S)   \
     681   do_intrinsic(_subtractExactL,           java_lang_Math,         subtractExact_name, long2_long_signature,      F_S)   \
     682                                                                                                                         \
     683   do_intrinsic(_floatToRawIntBits,        java_lang_Float,        floatToRawIntBits_name,   float_int_signature, F_S)   \
     684    do_name(     floatToRawIntBits_name,                          "floatToRawIntBits")                                   \
     685   do_intrinsic(_floatToIntBits,           java_lang_Float,        floatToIntBits_name,      float_int_signature, F_S)   \
     686    do_name(     floatToIntBits_name,                             "floatToIntBits")                                      \
     687   do_intrinsic(_intBitsToFloat,           java_lang_Float,        intBitsToFloat_name,      int_float_signature, F_S)   \
     688    do_name(     intBitsToFloat_name,                             "intBitsToFloat")                                      \
     689   do_intrinsic(_doubleToRawLongBits,      java_lang_Double,       doubleToRawLongBits_name, double_long_signature, F_S) \
     690    do_name(     doubleToRawLongBits_name,                        "doubleToRawLongBits")                                 \
     691   do_intrinsic(_doubleToLongBits,         java_lang_Double,       doubleToLongBits_name,    double_long_signature, F_S) \
     692    do_name(     doubleToLongBits_name,                           "doubleToLongBits")                                    \
     693   do_intrinsic(_longBitsToDouble,         java_lang_Double,       longBitsToDouble_name,    long_double_signature, F_S) \
     694    do_name(     longBitsToDouble_name,                           "longBitsToDouble")                                    \
     695                                                                                                                         \
     696   do_intrinsic(_numberOfLeadingZeros_i,   java_lang_Integer,      numberOfLeadingZeros_name,int_int_signature,   F_S)   \
     697   do_intrinsic(_numberOfLeadingZeros_l,   java_lang_Long,         numberOfLeadingZeros_name,long_int_signature,  F_S)   \
     698                                                                                                                         \
     699   do_intrinsic(_numberOfTrailingZeros_i,  java_lang_Integer,      numberOfTrailingZeros_name,int_int_signature,  F_S)   \
     700   do_intrinsic(_numberOfTrailingZeros_l,  java_lang_Long,         numberOfTrailingZeros_name,long_int_signature, F_S)   \
     701                                                                                                                         \
     702   do_intrinsic(_bitCount_i,               java_lang_Integer,      bitCount_name,            int_int_signature,   F_S)   \
     703   do_intrinsic(_bitCount_l,               java_lang_Long,         bitCount_name,            long_int_signature,  F_S)   \
     704                                                                                                                         \
     705   do_intrinsic(_reverseBytes_i,           java_lang_Integer,      reverseBytes_name,        int_int_signature,   F_S)   \
     706    do_name(     reverseBytes_name,                               "reverseBytes")                                        \
     707   do_intrinsic(_reverseBytes_l,           java_lang_Long,         reverseBytes_name,        long_long_signature, F_S)   \
     708     /*  (symbol reverseBytes_name defined above) */                                                                     \
     709   do_intrinsic(_reverseBytes_c,           java_lang_Character,    reverseBytes_name,        char_char_signature, F_S)   \
     710     /*  (symbol reverseBytes_name defined above) */                                                                     \
     711   do_intrinsic(_reverseBytes_s,           java_lang_Short,        reverseBytes_name,        short_short_signature, F_S) \
     712     /*  (symbol reverseBytes_name defined above) */                                                                     \
     713                                                                                                                         \
     714   do_intrinsic(_identityHashCode,         java_lang_System,       identityHashCode_name, object_int_signature,   F_S)   \
     715    do_name(     identityHashCode_name,                           "identityHashCode")                                    \
     716   do_intrinsic(_currentTimeMillis,        java_lang_System,       currentTimeMillis_name, void_long_signature,   F_S)   \
     717                                                                                                                         \
     718    do_name(     currentTimeMillis_name,                          "currentTimeMillis")                                   \
     719   do_intrinsic(_nanoTime,                 java_lang_System,       nanoTime_name,          void_long_signature,   F_S)   \
     720    do_name(     nanoTime_name,                                   "nanoTime")                                            \
     721                                                                                                                         \
     722   TRACE_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias)                                             \
     723                                                                                                                         \
     724   do_intrinsic(_arraycopy,                java_lang_System,       arraycopy_name, arraycopy_signature,           F_S)   \
     725    do_name(     arraycopy_name,                                  "arraycopy")                                           \
     726    do_signature(arraycopy_signature,                             "(Ljava/lang/Object;ILjava/lang/Object;II)V")          \
     727   do_intrinsic(_isInterrupted,            java_lang_Thread,       isInterrupted_name, isInterrupted_signature,   F_R)   \
     728    do_name(     isInterrupted_name,                              "isInterrupted")                                       \
     729    do_signature(isInterrupted_signature,                         "(Z)Z")                                                \
     730   do_intrinsic(_currentThread,            java_lang_Thread,       currentThread_name, currentThread_signature,   F_S)   \
     731    do_name(     currentThread_name,                              "currentThread")                                       \
     732    do_signature(currentThread_signature,                         "()Ljava/lang/Thread;")                                \
     733                                                                                                                         \
     734   /* reflective intrinsics, for java/lang/Class, etc. */                                                                \
     735   do_intrinsic(_isAssignableFrom,         java_lang_Class,        isAssignableFrom_name, class_boolean_signature, F_RN) \
     736    do_name(     isAssignableFrom_name,                           "isAssignableFrom")                                    \
     737   do_intrinsic(_isInstance,               java_lang_Class,        isInstance_name, object_boolean_signature,     F_RN)  \
     738    do_name(     isInstance_name,                                 "isInstance")                                          \
     739   do_intrinsic(_getModifiers,             java_lang_Class,        getModifiers_name, void_int_signature,         F_RN)  \
     740    do_name(     getModifiers_name,                               "getModifiers")                                        \
     741   do_intrinsic(_isInterface,              java_lang_Class,        isInterface_name, void_boolean_signature,      F_RN)  \
     742    do_name(     isInterface_name,                                "isInterface")                                         \
     743   do_intrinsic(_isArray,                  java_lang_Class,        isArray_name, void_boolean_signature,          F_RN)  \
     744    do_name(     isArray_name,                                    "isArray")                                             \
     745   do_intrinsic(_isPrimitive,              java_lang_Class,        isPrimitive_name, void_boolean_signature,      F_RN)  \
     746    do_name(     isPrimitive_name,                                "isPrimitive")                                         \
     747   do_intrinsic(_getSuperclass,            java_lang_Class,        getSuperclass_name, void_class_signature,      F_RN)  \
     748    do_name(     getSuperclass_name,                              "getSuperclass")                                       \
     749   do_intrinsic(_Class_cast,               java_lang_Class,        Class_cast_name, object_object_signature,      F_R)   \
     750    do_name(     Class_cast_name,                                 "cast")                                                \
     751                                                                                                                         \
     752   do_intrinsic(_getClassAccessFlags,      sun_reflect_Reflection, getClassAccessFlags_name, class_int_signature, F_SN)  \
     753    do_name(     getClassAccessFlags_name,                        "getClassAccessFlags")                                 \
     754   do_intrinsic(_getLength,                java_lang_reflect_Array, getLength_name, object_int_signature,         F_SN)  \
     755    do_name(     getLength_name,                                   "getLength")                                          \
     756                                                                                                                         \
     757   do_intrinsic(_getCallerClass,           sun_reflect_Reflection, getCallerClass_name, void_class_signature,     F_SN)  \
     758    do_name(     getCallerClass_name,                             "getCallerClass")                                      \
     759                                                                                                                         \
     760   do_intrinsic(_newArray,                 java_lang_reflect_Array, newArray_name, newArray_signature,            F_SN)  \
     761    do_name(     newArray_name,                                    "newArray")                                           \
     762    do_signature(newArray_signature,                               "(Ljava/lang/Class;I)Ljava/lang/Object;")             \
     763                                                                                                                         \
     764   do_intrinsic(_copyOf,                   java_util_Arrays,       copyOf_name, copyOf_signature,                 F_S)   \
     765    do_name(     copyOf_name,                                     "copyOf")                                              \
     766    do_signature(copyOf_signature,             "([Ljava/lang/Object;ILjava/lang/Class;)[Ljava/lang/Object;")             \
     767                                                                                                                         \
     768   do_intrinsic(_copyOfRange,              java_util_Arrays,       copyOfRange_name, copyOfRange_signature,       F_S)   \
     769    do_name(     copyOfRange_name,                                "copyOfRange")                                         \
     770    do_signature(copyOfRange_signature,        "([Ljava/lang/Object;IILjava/lang/Class;)[Ljava/lang/Object;")            \
     771                                                                                                                         \
     772   do_intrinsic(_equalsC,                  java_util_Arrays,       equals_name,    equalsC_signature,             F_S)   \
     773    do_signature(equalsC_signature,                               "([C[C)Z")                                             \
     774                                                                                                                         \
     775   do_intrinsic(_compareTo,                java_lang_String,       compareTo_name, string_int_signature,          F_R)   \
     776    do_name(     compareTo_name,                                  "compareTo")                                           \
     777   do_intrinsic(_indexOf,                  java_lang_String,       indexOf_name, string_int_signature,            F_R)   \
     778    do_name(     indexOf_name,                                    "indexOf")                                             \
     779   do_intrinsic(_equals,                   java_lang_String,       equals_name, object_boolean_signature,         F_R)   \
     780                                                                                                                         \
     781   do_class(java_nio_Buffer,               "java/nio/Buffer")                                                            \
     782   do_intrinsic(_checkIndex,               java_nio_Buffer,        checkIndex_name, int_int_signature,            F_R)   \
     783    do_name(     checkIndex_name,                                 "checkIndex")                                          \
     784                                                                                                                         \
     785   do_class(sun_nio_cs_iso8859_1_Encoder,  "sun/nio/cs/ISO_8859_1$Encoder")                                              \
     786   do_intrinsic(_encodeISOArray,     sun_nio_cs_iso8859_1_Encoder, encodeISOArray_name, encodeISOArray_signature, F_S)   \
     787    do_name(     encodeISOArray_name,                             "encodeISOArray")                                      \
     788    do_signature(encodeISOArray_signature,                        "([CI[BII)I")                                          \
     789                                                                                                                         \
     790   do_class(java_math_BigInteger,                      "java/math/BigInteger")                                           \
     791   do_intrinsic(_multiplyToLen,      java_math_BigInteger, multiplyToLen_name, multiplyToLen_signature, F_R)             \
     792    do_name(     multiplyToLen_name,                             "multiplyToLen")                                        \
     793    do_signature(multiplyToLen_signature,                        "([II[II[I)[I")                                         \
     794                                                                                                                         \
     795   do_intrinsic(_squareToLen, java_math_BigInteger, squareToLen_name, squareToLen_signature, F_S)                        \
     796    do_name(     squareToLen_name,                             "squareToLen")                                            \
     797    do_signature(squareToLen_signature,                        "([II[I)[I")                                              \
     798                                                                                                                         \
     799   do_intrinsic(_mulAdd, java_math_BigInteger, mulAdd_name, mulAdd_signature, F_S)                                       \
     800    do_name(     mulAdd_name,                                  "mulAdd")                                                 \
     801    do_signature(mulAdd_signature,                        "([I[IIII)I")                                                  \
     802                                                                                                                         \
     803   /* java/lang/ref/Reference */                                                                                         \
     804   do_intrinsic(_Reference_get,            java_lang_ref_Reference, get_name,    void_object_signature, F_R)             \
     805                                                                                                                         \
     806   /* support for com.sun.crypto.provider.AESCrypt and some of its callers */                                            \
     807   do_class(com_sun_crypto_provider_aescrypt,      "com/sun/crypto/provider/AESCrypt")                                   \
     808   do_intrinsic(_aescrypt_encryptBlock, com_sun_crypto_provider_aescrypt, encryptBlock_name, byteArray_int_byteArray_int_signature, F_R)   \
     809   do_intrinsic(_aescrypt_decryptBlock, com_sun_crypto_provider_aescrypt, decryptBlock_name, byteArray_int_byteArray_int_signature, F_R)   \
     810    do_name(     encryptBlock_name,                                 "encryptBlock")                                      \
     811    do_name(     decryptBlock_name,                                 "decryptBlock")                                      \
     812    do_signature(byteArray_int_byteArray_int_signature,             "([BI[BI)V")                                         \
     813                                                                                                                         \
     814   do_class(com_sun_crypto_provider_cipherBlockChaining,            "com/sun/crypto/provider/CipherBlockChaining")       \
     815    do_intrinsic(_cipherBlockChaining_encryptAESCrypt, com_sun_crypto_provider_cipherBlockChaining, encrypt_name, byteArray_int_int_byteArray_int_signature, F_R)   \
     816    do_intrinsic(_cipherBlockChaining_decryptAESCrypt, com_sun_crypto_provider_cipherBlockChaining, decrypt_name, byteArray_int_int_byteArray_int_signature, F_R)   \
     817    do_name(     encrypt_name,                                      "encrypt")                                           \
     818    do_name(     decrypt_name,                                      "decrypt")                                           \
     819    do_signature(byteArray_int_int_byteArray_int_signature,         "([BII[BI)I")                                        \
     820                                                                                                                         \
     821   /* support for sun.security.provider.SHA */                                                                           \
     822   do_class(sun_security_provider_sha,                              "sun/security/provider/SHA")                         \
     823   do_intrinsic(_sha_implCompress, sun_security_provider_sha, implCompress_name, implCompress_signature, F_R)            \
     824    do_name(     implCompress_name,                                 "implCompress")                                      \
     825    do_signature(implCompress_signature,                            "([BI)V")                                            \
     826                                                                                                                         \
     827   /* support for sun.security.provider.SHA2 */                                                                          \
     828   do_class(sun_security_provider_sha2,                             "sun/security/provider/SHA2")                        \
     829   do_intrinsic(_sha2_implCompress, sun_security_provider_sha2, implCompress_name, implCompress_signature, F_R)          \
     830                                                                                                                         \
     831   /* support for sun.security.provider.SHA5 */                                                                          \
     832   do_class(sun_security_provider_sha5,                             "sun/security/provider/SHA5")                        \
     833   do_intrinsic(_sha5_implCompress, sun_security_provider_sha5, implCompress_name, implCompress_signature, F_R)          \
     834                                                                                                                         \
     835   /* support for sun.security.provider.DigestBase */                                                                    \
     836   do_class(sun_security_provider_digestbase,                       "sun/security/provider/DigestBase")                  \
     837   do_intrinsic(_digestBase_implCompressMB, sun_security_provider_digestbase, implCompressMB_name, implCompressMB_signature, F_R)   \
     838    do_name(     implCompressMB_name,                               "implCompressMultiBlock")                            \
     839    do_signature(implCompressMB_signature,                          "([BII)I")                                           \
     840                                                                                                                         \
     841   /* support for java.util.zip */                                                                                       \
     842   do_class(java_util_zip_CRC32,           "java/util/zip/CRC32")                                                        \
     843   do_intrinsic(_updateCRC32,               java_util_zip_CRC32,   update_name, int2_int_signature,               F_SN)  \
     844    do_name(     update_name,                                      "update")                                             \
     845   do_intrinsic(_updateBytesCRC32,          java_util_zip_CRC32,   updateBytes_name, updateBytes_signature,       F_SN)  \
     846    do_name(     updateBytes_name,                                "updateBytes")                                         \
     847    do_signature(updateBytes_signature,                           "(I[BII)I")                                            \
     848   do_intrinsic(_updateByteBufferCRC32,     java_util_zip_CRC32,   updateByteBuffer_name, updateByteBuffer_signature, F_SN) \
     849    do_name(     updateByteBuffer_name,                           "updateByteBuffer")                                    \
     850    do_signature(updateByteBuffer_signature,                      "(IJII)I")                                             \
     851                                                                                                                         \
     852   /* support for sun.misc.Unsafe */                                                                                     \
     853   do_class(sun_misc_Unsafe,               "sun/misc/Unsafe")                                                            \
     854                                                                                                                         \
     855   do_intrinsic(_allocateInstance,         sun_misc_Unsafe,        allocateInstance_name, allocateInstance_signature, F_RN) \
     856    do_name(     allocateInstance_name,                           "allocateInstance")                                    \
     857    do_signature(allocateInstance_signature,   "(Ljava/lang/Class;)Ljava/lang/Object;")                                  \
     858   do_intrinsic(_copyMemory,               sun_misc_Unsafe,        copyMemory_name, copyMemory_signature,         F_RN)  \
     859    do_name(     copyMemory_name,                                 "copyMemory")                                          \
     860    do_signature(copyMemory_signature,         "(Ljava/lang/Object;JLjava/lang/Object;JJ)V")                             \
     861   do_intrinsic(_park,                     sun_misc_Unsafe,        park_name, park_signature,                     F_RN)  \
     862    do_name(     park_name,                                       "park")                                                \
     863    do_signature(park_signature,                                  "(ZJ)V")                                               \
     864   do_intrinsic(_unpark,                   sun_misc_Unsafe,        unpark_name, unpark_signature,                 F_RN)  \
     865    do_name(     unpark_name,                                     "unpark")                                              \
     866    do_alias(    unpark_signature,                               /*(LObject;)V*/ object_void_signature)                  \
     867   do_intrinsic(_loadFence,                sun_misc_Unsafe,        loadFence_name, loadFence_signature,           F_RN)  \
     868    do_name(     loadFence_name,                                  "loadFence")                                           \
     869    do_alias(    loadFence_signature,                              void_method_signature)                                \
     870   do_intrinsic(_storeFence,               sun_misc_Unsafe,        storeFence_name, storeFence_signature,         F_RN)  \
     871    do_name(     storeFence_name,                                 "storeFence")                                          \
     872    do_alias(    storeFence_signature,                             void_method_signature)                                \
     873   do_intrinsic(_fullFence,                sun_misc_Unsafe,        fullFence_name, fullFence_signature,           F_RN)  \
     874    do_name(     fullFence_name,                                  "fullFence")                                           \
     875    do_alias(    fullFence_signature,                              void_method_signature)                                \
     876                                                                                                                         \
     877   /* Custom branch frequencies profiling support for JSR292 */                                                          \
     878   do_class(java_lang_invoke_MethodHandleImpl,               "java/lang/invoke/MethodHandleImpl")                        \
     879   do_intrinsic(_profileBoolean, java_lang_invoke_MethodHandleImpl, profileBoolean_name, profileBoolean_signature,    F_S)  \
     880    do_name(     profileBoolean_name,                               "profileBoolean")                                     \
     881    do_signature(profileBoolean_signature,                           "(Z[I)Z")                                            \
     882                                                                                                                         \
     883   /* unsafe memory references (there are a lot of them...) */                                                           \
     884   do_signature(getObject_signature,       "(Ljava/lang/Object;J)Ljava/lang/Object;")                                    \
     885   do_signature(putObject_signature,       "(Ljava/lang/Object;JLjava/lang/Object;)V")                                   \
     886   do_signature(getBoolean_signature,      "(Ljava/lang/Object;J)Z")                                                     \
     887   do_signature(putBoolean_signature,      "(Ljava/lang/Object;JZ)V")                                                    \
     888   do_signature(getByte_signature,         "(Ljava/lang/Object;J)B")                                                     \
     889   do_signature(putByte_signature,         "(Ljava/lang/Object;JB)V")                                                    \
     890   do_signature(getShort_signature,        "(Ljava/lang/Object;J)S")                                                     \
     891   do_signature(putShort_signature,        "(Ljava/lang/Object;JS)V")                                                    \
     892   do_signature(getChar_signature,         "(Ljava/lang/Object;J)C")                                                     \
     893   do_signature(putChar_signature,         "(Ljava/lang/Object;JC)V")                                                    \
     894   do_signature(getInt_signature,          "(Ljava/lang/Object;J)I")                                                     \
     895   do_signature(putInt_signature,          "(Ljava/lang/Object;JI)V")                                                    \
     896   do_signature(getLong_signature,         "(Ljava/lang/Object;J)J")                                                     \
     897   do_signature(putLong_signature,         "(Ljava/lang/Object;JJ)V")                                                    \
     898   do_signature(getFloat_signature,        "(Ljava/lang/Object;J)F")                                                     \
     899   do_signature(putFloat_signature,        "(Ljava/lang/Object;JF)V")                                                    \
     900   do_signature(getDouble_signature,       "(Ljava/lang/Object;J)D")                                                     \
     901   do_signature(putDouble_signature,       "(Ljava/lang/Object;JD)V")                                                    \
     902                                                                                                                         \
     903   do_name(getObject_name,"getObject")           do_name(putObject_name,"putObject")                                     \
     904   do_name(getBoolean_name,"getBoolean")         do_name(putBoolean_name,"putBoolean")                                   \
     905   do_name(getByte_name,"getByte")               do_name(putByte_name,"putByte")                                         \
     906   do_name(getShort_name,"getShort")             do_name(putShort_name,"putShort")                                       \
     907   do_name(getChar_name,"getChar")               do_name(putChar_name,"putChar")                                         \
     908   do_name(getInt_name,"getInt")                 do_name(putInt_name,"putInt")                                           \
     909   do_name(getLong_name,"getLong")               do_name(putLong_name,"putLong")                                         \
     910   do_name(getFloat_name,"getFloat")             do_name(putFloat_name,"putFloat")                                       \
     911   do_name(getDouble_name,"getDouble")           do_name(putDouble_name,"putDouble")                                     \
     912                                                                                                                         \
     913   do_intrinsic(_getObject,                sun_misc_Unsafe,        getObject_name, getObject_signature,           F_RN)  \
     914   do_intrinsic(_getBoolean,               sun_misc_Unsafe,        getBoolean_name, getBoolean_signature,         F_RN)  \
     915   do_intrinsic(_getByte,                  sun_misc_Unsafe,        getByte_name, getByte_signature,               F_RN)  \
     916   do_intrinsic(_getShort,                 sun_misc_Unsafe,        getShort_name, getShort_signature,             F_RN)  \
     917   do_intrinsic(_getChar,                  sun_misc_Unsafe,        getChar_name, getChar_signature,               F_RN)  \
     918   do_intrinsic(_getInt,                   sun_misc_Unsafe,        getInt_name, getInt_signature,                 F_RN)  \
     919   do_intrinsic(_getLong,                  sun_misc_Unsafe,        getLong_name, getLong_signature,               F_RN)  \
     920   do_intrinsic(_getFloat,                 sun_misc_Unsafe,        getFloat_name, getFloat_signature,             F_RN)  \
     921   do_intrinsic(_getDouble,                sun_misc_Unsafe,        getDouble_name, getDouble_signature,           F_RN)  \
     922   do_intrinsic(_putObject,                sun_misc_Unsafe,        putObject_name, putObject_signature,           F_RN)  \
     923   do_intrinsic(_putBoolean,               sun_misc_Unsafe,        putBoolean_name, putBoolean_signature,         F_RN)  \
     924   do_intrinsic(_putByte,                  sun_misc_Unsafe,        putByte_name, putByte_signature,               F_RN)  \
     925   do_intrinsic(_putShort,                 sun_misc_Unsafe,        putShort_name, putShort_signature,             F_RN)  \
     926   do_intrinsic(_putChar,                  sun_misc_Unsafe,        putChar_name, putChar_signature,               F_RN)  \
     927   do_intrinsic(_putInt,                   sun_misc_Unsafe,        putInt_name, putInt_signature,                 F_RN)  \
     928   do_intrinsic(_putLong,                  sun_misc_Unsafe,        putLong_name, putLong_signature,               F_RN)  \
     929   do_intrinsic(_putFloat,                 sun_misc_Unsafe,        putFloat_name, putFloat_signature,             F_RN)  \
     930   do_intrinsic(_putDouble,                sun_misc_Unsafe,        putDouble_name, putDouble_signature,           F_RN)  \
     931                                                                                                                         \
     932   do_name(getObjectVolatile_name,"getObjectVolatile")   do_name(putObjectVolatile_name,"putObjectVolatile")             \
     933   do_name(getBooleanVolatile_name,"getBooleanVolatile") do_name(putBooleanVolatile_name,"putBooleanVolatile")           \
     934   do_name(getByteVolatile_name,"getByteVolatile")       do_name(putByteVolatile_name,"putByteVolatile")                 \
     935   do_name(getShortVolatile_name,"getShortVolatile")     do_name(putShortVolatile_name,"putShortVolatile")               \
     936   do_name(getCharVolatile_name,"getCharVolatile")       do_name(putCharVolatile_name,"putCharVolatile")                 \
     937   do_name(getIntVolatile_name,"getIntVolatile")         do_name(putIntVolatile_name,"putIntVolatile")                   \
     938   do_name(getLongVolatile_name,"getLongVolatile")       do_name(putLongVolatile_name,"putLongVolatile")                 \
     939   do_name(getFloatVolatile_name,"getFloatVolatile")     do_name(putFloatVolatile_name,"putFloatVolatile")               \
     940   do_name(getDoubleVolatile_name,"getDoubleVolatile")   do_name(putDoubleVolatile_name,"putDoubleVolatile")             \
     941                                                                                                                         \
     942   do_intrinsic(_getObjectVolatile,        sun_misc_Unsafe,        getObjectVolatile_name, getObject_signature,   F_RN)  \
     943   do_intrinsic(_getBooleanVolatile,       sun_misc_Unsafe,        getBooleanVolatile_name, getBoolean_signature, F_RN)  \
     944   do_intrinsic(_getByteVolatile,          sun_misc_Unsafe,        getByteVolatile_name, getByte_signature,       F_RN)  \
     945   do_intrinsic(_getShortVolatile,         sun_misc_Unsafe,        getShortVolatile_name, getShort_signature,     F_RN)  \
     946   do_intrinsic(_getCharVolatile,          sun_misc_Unsafe,        getCharVolatile_name, getChar_signature,       F_RN)  \
     947   do_intrinsic(_getIntVolatile,           sun_misc_Unsafe,        getIntVolatile_name, getInt_signature,         F_RN)  \
     948   do_intrinsic(_getLongVolatile,          sun_misc_Unsafe,        getLongVolatile_name, getLong_signature,       F_RN)  \
     949   do_intrinsic(_getFloatVolatile,         sun_misc_Unsafe,        getFloatVolatile_name, getFloat_signature,     F_RN)  \
     950   do_intrinsic(_getDoubleVolatile,        sun_misc_Unsafe,        getDoubleVolatile_name, getDouble_signature,   F_RN)  \
     951   do_intrinsic(_putObjectVolatile,        sun_misc_Unsafe,        putObjectVolatile_name, putObject_signature,   F_RN)  \
     952   do_intrinsic(_putBooleanVolatile,       sun_misc_Unsafe,        putBooleanVolatile_name, putBoolean_signature, F_RN)  \
     953   do_intrinsic(_putByteVolatile,          sun_misc_Unsafe,        putByteVolatile_name, putByte_signature,       F_RN)  \
     954   do_intrinsic(_putShortVolatile,         sun_misc_Unsafe,        putShortVolatile_name, putShort_signature,     F_RN)  \
     955   do_intrinsic(_putCharVolatile,          sun_misc_Unsafe,        putCharVolatile_name, putChar_signature,       F_RN)  \
     956   do_intrinsic(_putIntVolatile,           sun_misc_Unsafe,        putIntVolatile_name, putInt_signature,         F_RN)  \
     957   do_intrinsic(_putLongVolatile,          sun_misc_Unsafe,        putLongVolatile_name, putLong_signature,       F_RN)  \
     958   do_intrinsic(_putFloatVolatile,         sun_misc_Unsafe,        putFloatVolatile_name, putFloat_signature,     F_RN)  \
     959   do_intrinsic(_putDoubleVolatile,        sun_misc_Unsafe,        putDoubleVolatile_name, putDouble_signature,   F_RN)  \
     960                                                                                                                         \
     961   /* %%% these are redundant except perhaps for getAddress, but Unsafe has native methods for them */                   \
     962   do_signature(getByte_raw_signature,     "(J)B")                                                                       \
     963   do_signature(putByte_raw_signature,     "(JB)V")                                                                      \
     964   do_signature(getShort_raw_signature,    "(J)S")                                                                       \
     965   do_signature(putShort_raw_signature,    "(JS)V")                                                                      \
     966   do_signature(getChar_raw_signature,     "(J)C")                                                                       \
     967   do_signature(putChar_raw_signature,     "(JC)V")                                                                      \
     968   do_signature(putInt_raw_signature,      "(JI)V")                                                                      \
     969       do_alias(getLong_raw_signature,    /*(J)J*/ long_long_signature)                                                  \
     970       do_alias(putLong_raw_signature,    /*(JJ)V*/ long_long_void_signature)                                            \
     971   do_signature(getFloat_raw_signature,    "(J)F")                                                                       \
     972   do_signature(putFloat_raw_signature,    "(JF)V")                                                                      \
     973       do_alias(getDouble_raw_signature,  /*(J)D*/ long_double_signature)                                                \
     974   do_signature(putDouble_raw_signature,   "(JD)V")                                                                      \
     975       do_alias(getAddress_raw_signature, /*(J)J*/ long_long_signature)                                                  \
     976       do_alias(putAddress_raw_signature, /*(JJ)V*/ long_long_void_signature)                                            \
     977                                                                                                                         \
     978    do_name(    getAddress_name,           "getAddress")                                                                 \
     979    do_name(    putAddress_name,           "putAddress")                                                                 \
     980                                                                                                                         \
     981   do_intrinsic(_getByte_raw,              sun_misc_Unsafe,        getByte_name, getByte_raw_signature,           F_RN)  \
     982   do_intrinsic(_getShort_raw,             sun_misc_Unsafe,        getShort_name, getShort_raw_signature,         F_RN)  \
     983   do_intrinsic(_getChar_raw,              sun_misc_Unsafe,        getChar_name, getChar_raw_signature,           F_RN)  \
     984   do_intrinsic(_getInt_raw,               sun_misc_Unsafe,        getInt_name, long_int_signature,               F_RN)  \
     985   do_intrinsic(_getLong_raw,              sun_misc_Unsafe,        getLong_name, getLong_raw_signature,           F_RN)  \
     986   do_intrinsic(_getFloat_raw,             sun_misc_Unsafe,        getFloat_name, getFloat_raw_signature,         F_RN)  \
     987   do_intrinsic(_getDouble_raw,            sun_misc_Unsafe,        getDouble_name, getDouble_raw_signature,       F_RN)  \
     988   do_intrinsic(_getAddress_raw,           sun_misc_Unsafe,        getAddress_name, getAddress_raw_signature,     F_RN)  \
     989   do_intrinsic(_putByte_raw,              sun_misc_Unsafe,        putByte_name, putByte_raw_signature,           F_RN)  \
     990   do_intrinsic(_putShort_raw,             sun_misc_Unsafe,        putShort_name, putShort_raw_signature,         F_RN)  \
     991   do_intrinsic(_putChar_raw,              sun_misc_Unsafe,        putChar_name, putChar_raw_signature,           F_RN)  \
     992   do_intrinsic(_putInt_raw,               sun_misc_Unsafe,        putInt_name, putInt_raw_signature,             F_RN)  \
     993   do_intrinsic(_putLong_raw,              sun_misc_Unsafe,        putLong_name, putLong_raw_signature,           F_RN)  \
     994   do_intrinsic(_putFloat_raw,             sun_misc_Unsafe,        putFloat_name, putFloat_raw_signature,         F_RN)  \
     995   do_intrinsic(_putDouble_raw,            sun_misc_Unsafe,        putDouble_name, putDouble_raw_signature,       F_RN)  \
     996   do_intrinsic(_putAddress_raw,           sun_misc_Unsafe,        putAddress_name, putAddress_raw_signature,     F_RN)  \
     997                                                                                                                         \
     998   do_intrinsic(_compareAndSwapObject,     sun_misc_Unsafe,        compareAndSwapObject_name, compareAndSwapObject_signature, F_RN) \
     999    do_name(     compareAndSwapObject_name,                       "compareAndSwapObject")                                \
    1000    do_signature(compareAndSwapObject_signature,  "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z")          \
    1001   do_intrinsic(_compareAndSwapLong,       sun_misc_Unsafe,        compareAndSwapLong_name, compareAndSwapLong_signature, F_RN) \
    1002    do_name(     compareAndSwapLong_name,                         "compareAndSwapLong")                                  \
    1003    do_signature(compareAndSwapLong_signature,                    "(Ljava/lang/Object;JJJ)Z")                            \
    1004   do_intrinsic(_compareAndSwapInt,        sun_misc_Unsafe,        compareAndSwapInt_name, compareAndSwapInt_signature, F_RN) \
    1005    do_name(     compareAndSwapInt_name,                          "compareAndSwapInt")                                   \
    1006    do_signature(compareAndSwapInt_signature,                     "(Ljava/lang/Object;JII)Z")                            \
    1007   do_intrinsic(_putOrderedObject,         sun_misc_Unsafe,        putOrderedObject_name, putOrderedObject_signature, F_RN) \
    1008    do_name(     putOrderedObject_name,                           "putOrderedObject")                                    \
    1009    do_alias(    putOrderedObject_signature,                     /*(LObject;JLObject;)V*/ putObject_signature)           \
    1010   do_intrinsic(_putOrderedLong,           sun_misc_Unsafe,        putOrderedLong_name, putOrderedLong_signature, F_RN)  \
    1011    do_name(     putOrderedLong_name,                             "putOrderedLong")                                      \
    1012    do_alias(    putOrderedLong_signature,                       /*(Ljava/lang/Object;JJ)V*/ putLong_signature)          \
    1013   do_intrinsic(_putOrderedInt,            sun_misc_Unsafe,        putOrderedInt_name, putOrderedInt_signature,   F_RN)  \
    1014    do_name(     putOrderedInt_name,                              "putOrderedInt")                                       \
    1015    do_alias(    putOrderedInt_signature,                        /*(Ljava/lang/Object;JI)V*/ putInt_signature)           \
    1016                                                                                                                         \
    1017   do_intrinsic(_getAndAddInt,             sun_misc_Unsafe,        getAndAddInt_name, getAndAddInt_signature, F_R)       \
    1018    do_name(     getAndAddInt_name,                                "getAndAddInt")                                       \
    1019    do_signature(getAndAddInt_signature,                           "(Ljava/lang/Object;JI)I" )                           \
    1020   do_intrinsic(_getAndAddLong,            sun_misc_Unsafe,        getAndAddLong_name, getAndAddLong_signature, F_R)     \
    1021    do_name(     getAndAddLong_name,                               "getAndAddLong")                                      \
    1022    do_signature(getAndAddLong_signature,                          "(Ljava/lang/Object;JJ)J" )                           \
    1023   do_intrinsic(_getAndSetInt,             sun_misc_Unsafe,        getAndSetInt_name, getAndSetInt_signature, F_R)       \
    1024    do_name(     getAndSetInt_name,                                "getAndSetInt")                                       \
    1025    do_alias(    getAndSetInt_signature,                         /*"(Ljava/lang/Object;JI)I"*/ getAndAddInt_signature)   \
    1026   do_intrinsic(_getAndSetLong,            sun_misc_Unsafe,        getAndSetLong_name, getAndSetLong_signature, F_R)     \
    1027    do_name(     getAndSetLong_name,                               "getAndSetLong")                                      \
    1028    do_alias(    getAndSetLong_signature,                        /*"(Ljava/lang/Object;JJ)J"*/ getAndAddLong_signature)  \
    1029   do_intrinsic(_getAndSetObject,          sun_misc_Unsafe,        getAndSetObject_name, getAndSetObject_signature,  F_R)\
    1030    do_name(     getAndSetObject_name,                             "getAndSetObject")                                    \
    1031    do_signature(getAndSetObject_signature,                        "(Ljava/lang/Object;JLjava/lang/Object;)Ljava/lang/Object;" ) \
    1032     /*== LAST_COMPILER_INLINE*/                                                                                         \
    1033     /*the compiler does have special inlining code for these; bytecode inline is just fine */                           \
    1034                                                                                                                         \
    1035   do_intrinsic(_fillInStackTrace,         java_lang_Throwable, fillInStackTrace_name, void_throwable_signature,  F_RNY) \
    1036                                                                                                                           \
    1037   do_intrinsic(_StringBuilder_void,   java_lang_StringBuilder, object_initializer_name, void_method_signature,     F_R)   \
    1038   do_intrinsic(_StringBuilder_int,    java_lang_StringBuilder, object_initializer_name, int_void_signature,        F_R)   \
    1039   do_intrinsic(_StringBuilder_String, java_lang_StringBuilder, object_initializer_name, string_void_signature,     F_R)   \
    1040                                                                                                                           \
    1041   do_intrinsic(_StringBuilder_append_char,   java_lang_StringBuilder, append_name, char_StringBuilder_signature,   F_R)   \
    1042   do_intrinsic(_StringBuilder_append_int,    java_lang_StringBuilder, append_name, int_StringBuilder_signature,    F_R)   \
    1043   do_intrinsic(_StringBuilder_append_String, java_lang_StringBuilder, append_name, String_StringBuilder_signature, F_R)   \
    1044                                                                                                                           \
    1045   do_intrinsic(_StringBuilder_toString, java_lang_StringBuilder, toString_name, void_string_signature,             F_R)   \
    1046                                                                                                                           \
    1047   do_intrinsic(_StringBuffer_void,   java_lang_StringBuffer, object_initializer_name, void_method_signature,       F_R)   \
    1048   do_intrinsic(_StringBuffer_int,    java_lang_StringBuffer, object_initializer_name, int_void_signature,          F_R)   \
    1049   do_intrinsic(_StringBuffer_String, java_lang_StringBuffer, object_initializer_name, string_void_signature,       F_R)   \
    1050                                                                                                                           \
    1051   do_intrinsic(_StringBuffer_append_char,   java_lang_StringBuffer, append_name, char_StringBuffer_signature,      F_Y)   \
    1052   do_intrinsic(_StringBuffer_append_int,    java_lang_StringBuffer, append_name, int_StringBuffer_signature,       F_Y)   \
    1053   do_intrinsic(_StringBuffer_append_String, java_lang_StringBuffer, append_name, String_StringBuffer_signature,    F_Y)   \
    1054                                                                                                                           \
    1055   do_intrinsic(_StringBuffer_toString,  java_lang_StringBuffer, toString_name, void_string_signature,              F_Y)   \
    1056                                                                                                                           \
    1057   do_intrinsic(_Integer_toString,      java_lang_Integer, toString_name, int_String_signature,                     F_S)   \
    1058                                                                                                                           \
    1059   do_intrinsic(_String_String, java_lang_String, object_initializer_name, string_void_signature,                   F_R)   \
    1060                                                                                                                           \
    1061   do_intrinsic(_Object_init,              java_lang_Object, object_initializer_name, void_method_signature,        F_R)   \
    1062   /*    (symbol object_initializer_name defined above) */                                                                 \
    1063                                                                                                                           \
    1064   do_intrinsic(_invoke,                   java_lang_reflect_Method, invoke_name, object_object_array_object_signature, F_R) \
    1065   /*   (symbols invoke_name and invoke_signature defined above) */                                                      \
    1066   /* the polymorphic MH intrinsics must be in compact order, with _invokeGeneric first and _linkToInterface last */     \
    1067   do_intrinsic(_invokeGeneric,            java_lang_invoke_MethodHandle, invoke_name,           star_name, F_RN)        \
    1068   do_intrinsic(_invokeBasic,              java_lang_invoke_MethodHandle, invokeBasic_name,      star_name, F_RN)        \
    1069   do_intrinsic(_linkToVirtual,            java_lang_invoke_MethodHandle, linkToVirtual_name,    star_name, F_SN)        \
    1070   do_intrinsic(_linkToStatic,             java_lang_invoke_MethodHandle, linkToStatic_name,     star_name, F_SN)        \
    1071   do_intrinsic(_linkToSpecial,            java_lang_invoke_MethodHandle, linkToSpecial_name,    star_name, F_SN)        \
    1072   do_intrinsic(_linkToInterface,          java_lang_invoke_MethodHandle, linkToInterface_name,  star_name, F_SN)        \
    1073   /* special marker for bytecode generated for the JVM from a LambdaForm: */                                            \
    1074   do_intrinsic(_compiledLambdaForm,       java_lang_invoke_MethodHandle, compiledLambdaForm_name, star_name, F_RN)      \
    1075                                                                                                                         \
    1076   /* unboxing methods: */                                                                                               \
    1077   do_intrinsic(_booleanValue,             java_lang_Boolean,      booleanValue_name, void_boolean_signature, F_R)       \
    1078    do_name(     booleanValue_name,       "booleanValue")                                                                \
    1079   do_intrinsic(_byteValue,                java_lang_Byte,         byteValue_name, void_byte_signature, F_R)             \
    1080    do_name(     byteValue_name,          "byteValue")                                                                   \
    1081   do_intrinsic(_charValue,                java_lang_Character,    charValue_name, void_char_signature, F_R)             \
    1082    do_name(     charValue_name,          "charValue")                                                                   \
    1083   do_intrinsic(_shortValue,               java_lang_Short,        shortValue_name, void_short_signature, F_R)           \
    1084    do_name(     shortValue_name,         "shortValue")                                                                  \
    1085   do_intrinsic(_intValue,                 java_lang_Integer,      intValue_name, void_int_signature, F_R)               \
    1086    do_name(     intValue_name,           "intValue")                                                                    \
    1087   do_intrinsic(_longValue,                java_lang_Long,         longValue_name, void_long_signature, F_R)             \
    1088    do_name(     longValue_name,          "longValue")                                                                   \
    1089   do_intrinsic(_floatValue,               java_lang_Float,        floatValue_name, void_float_signature, F_R)           \
    1090    do_name(     floatValue_name,         "floatValue")                                                                  \
    1091   do_intrinsic(_doubleValue,              java_lang_Double,       doubleValue_name, void_double_signature, F_R)         \
    1092    do_name(     doubleValue_name,        "doubleValue")                                                                 \
    1093                                                                                                                         \
    1094   /* boxing methods: */                                                                                                 \
    1095    do_name(    valueOf_name,              "valueOf")                                                                    \
    1096   do_intrinsic(_Boolean_valueOf,          java_lang_Boolean,      valueOf_name, Boolean_valueOf_signature, F_S)         \
    1097    do_name(     Boolean_valueOf_signature,                       "(Z)Ljava/lang/Boolean;")                              \
    1098   do_intrinsic(_Byte_valueOf,             java_lang_Byte,         valueOf_name, Byte_valueOf_signature, F_S)            \
    1099    do_name(     Byte_valueOf_signature,                          "(B)Ljava/lang/Byte;")                                 \
    1100   do_intrinsic(_Character_valueOf,        java_lang_Character,    valueOf_name, Character_valueOf_signature, F_S)       \
    1101    do_name(     Character_valueOf_signature,                     "(C)Ljava/lang/Character;")                            \
    1102   do_intrinsic(_Short_valueOf,            java_lang_Short,        valueOf_name, Short_valueOf_signature, F_S)           \
    1103    do_name(     Short_valueOf_signature,                         "(S)Ljava/lang/Short;")                                \
    1104   do_intrinsic(_Integer_valueOf,          java_lang_Integer,      valueOf_name, Integer_valueOf_signature, F_S)         \
    1105    do_name(     Integer_valueOf_signature,                       "(I)Ljava/lang/Integer;")                              \
    1106   do_intrinsic(_Long_valueOf,             java_lang_Long,         valueOf_name, Long_valueOf_signature, F_S)            \
    1107    do_name(     Long_valueOf_signature,                          "(J)Ljava/lang/Long;")                                 \
    1108   do_intrinsic(_Float_valueOf,            java_lang_Float,        valueOf_name, Float_valueOf_signature, F_S)           \
    1109    do_name(     Float_valueOf_signature,                         "(F)Ljava/lang/Float;")                                \
    1110   do_intrinsic(_Double_valueOf,           java_lang_Double,       valueOf_name, Double_valueOf_signature, F_S)          \
    1111    do_name(     Double_valueOf_signature,                        "(D)Ljava/lang/Double;")                               \
    1112                                                                                                                         \
    1113     /*end*/
    1114
    1115
    1116
    1117
    1118 // Class vmSymbols
    1119
    1120 class vmSymbols: AllStatic {
    1121   friend class vmIntrinsics;
    1122   friend class VMStructs;
    1123  public:
    1124   // enum for figuring positions and size of array holding Symbol*s
    1125   enum SID {
    1126     NO_SID = 0,
    1127
    1128     #define VM_SYMBOL_ENUM(name, string) VM_SYMBOL_ENUM_NAME(name),
    1129     VM_SYMBOLS_DO(VM_SYMBOL_ENUM, VM_ALIAS_IGNORE)
    1130     #undef VM_SYMBOL_ENUM
    1131
    1132     SID_LIMIT,
    1133
    1134     #define VM_ALIAS_ENUM(name, def) VM_SYMBOL_ENUM_NAME(name) = VM_SYMBOL_ENUM_NAME(def),
    1135     VM_SYMBOLS_DO(VM_SYMBOL_IGNORE, VM_ALIAS_ENUM)
    1136     #undef VM_ALIAS_ENUM
    1137
    1138     FIRST_SID = NO_SID + 1
    1139   };
    1140   enum {
    1141     log2_SID_LIMIT = 10         // checked by an assert at start-up
    1142   };
    1143
    1144  private:
    1145   // The symbol array
    1146   static Symbol* _symbols[];
    1147
    1148   // Field signatures indexed by BasicType.
    1149   static Symbol* _type_signatures[T_VOID+1];
    1150
    1151  public:
    1152   // Initialization
    1153   static void initialize(TRAPS);
    1154   // Accessing
    1155   #define VM_SYMBOL_DECLARE(name, ignore)                 \
    1156     static Symbol* name() {                               \
    1157       return _symbols[VM_SYMBOL_ENUM_NAME(name)];         \
    1158     }
    1159   VM_SYMBOLS_DO(VM_SYMBOL_DECLARE, VM_SYMBOL_DECLARE)
    1160   #undef VM_SYMBOL_DECLARE
    1161
    1162   // Sharing support
    1163   static void symbols_do(SymbolClosure* f);
    1164   static void serialize(SerializeClosure* soc);
    1165
    1166   static Symbol* type_signature(BasicType t) {
    1167     assert((uint)t < T_VOID+1, "range check");
    1168     assert(_type_signatures[t] != NULL, "domain check");
    1169     return _type_signatures[t];
    1170   }
    1171   // inverse of type_signature; returns T_OBJECT if s is not recognized
    1172   static BasicType signature_type(Symbol* s);
    1173
    1174   static Symbol* symbol_at(SID id) {
    1175     assert(id >= FIRST_SID && id < SID_LIMIT, "oob");
    1176     assert(_symbols[id] != NULL, "init");
    1177     return _symbols[id];
    1178   }
    1179
    1180   // Returns symbol's SID if one is assigned, else NO_SID.
    1181   static SID find_sid(Symbol* symbol);
    1182   static SID find_sid(const char* symbol_name);
    1183
    1184 #ifndef PRODUCT
    1185   // No need for this in the product:
    1186   static const char* name_for(SID sid);
    1187 #endif //PRODUCT
    1188 };
    1189
    1190 // VM Intrinsic ID's uniquely identify some very special methods
    1191 class vmIntrinsics: AllStatic {
    1192   friend class vmSymbols;
    1193   friend class ciObjectFactory;
    1194
    1195  public:
    1196   // Accessing
    1197   enum ID {
    1198     _none = 0,                      // not an intrinsic (default answer)
    1199
    1200     #define VM_INTRINSIC_ENUM(id, klass, name, sig, flags)  id,
    1201     VM_INTRINSICS_DO(VM_INTRINSIC_ENUM,
    1202                      VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE)
    1203     #undef VM_INTRINSIC_ENUM
    1204
    1205     ID_LIMIT,
    1206     LAST_COMPILER_INLINE = _getAndSetObject,
    1207     FIRST_MH_SIG_POLY    = _invokeGeneric,
    1208     FIRST_MH_STATIC      = _linkToVirtual,
    1209     LAST_MH_SIG_POLY     = _linkToInterface,
    1210
    1211     FIRST_ID = _none + 1
    1212   };
    1213
    1214   enum Flags {
    1215     // AccessFlags syndromes relevant to intrinsics.
    1216     F_none = 0,
    1217     F_R,                        // !static ?native !synchronized (R="regular")
    1218     F_S,                        //  static ?native !synchronized
    1219     F_Y,                        // !static ?native  synchronized
    1220     F_RN,                       // !static  native !synchronized
    1221     F_SN,                       //  static  native !synchronized
    1222     F_RNY,                      // !static  native  synchronized
    1223
    1224     FLAG_LIMIT
    1225   };
    1226   enum {
    1227     log2_FLAG_LIMIT = 4         // checked by an assert at start-up
    1228   };
    1229
    1230 public:
    1231   static ID ID_from(int raw_id) {
    1232     assert(raw_id >= (int)_none && raw_id < (int)ID_LIMIT,
    1233            "must be a valid intrinsic ID");
    1234     return (ID)raw_id;
    1235   }
    1236
    1237   static const char* name_at(ID id);
    1238
    1239 private:
    1240   static ID find_id_impl(vmSymbols::SID holder,
    1241                          vmSymbols::SID name,
    1242                          vmSymbols::SID sig,
    1243                          jshort flags);
    1244
    1245 public:
    1246   // Given a method's class, name, signature, and access flags, report its ID.
    1247   static ID find_id(vmSymbols::SID holder,
    1248                     vmSymbols::SID name,
    1249                     vmSymbols::SID sig,
    1250                     jshort flags) {
    1251     ID id = find_id_impl(holder, name, sig, flags);
    1252 #ifdef ASSERT
    1253     // ID _none does not hold the following asserts.
    1254     if (id == _none)  return id;
    1255 #endif
    1256     assert(    class_for(id) == holder, "correct id");
    1257     assert(     name_for(id) == name,   "correct id");
    1258     assert(signature_for(id) == sig,    "correct id");
    1259     return id;
    1260   }
    1261
    1262   static void verify_method(ID actual_id, Method* m) PRODUCT_RETURN;
    1263
    1264   // Find out the symbols behind an intrinsic:
    1265   static vmSymbols::SID     class_for(ID id);
    1266   static vmSymbols::SID      name_for(ID id);
    1267   static vmSymbols::SID signature_for(ID id);
    1268   static Flags              flags_for(ID id);
    1269
    1270   static const char* short_name_as_C_string(ID id, char* buf, int size);
    1271
    1272   // Wrapper object methods:
    1273   static ID for_boxing(BasicType type);
    1274   static ID for_unboxing(BasicType type);
    1275
    1276   // Raw conversion:
    1277   static ID for_raw_conversion(BasicType src, BasicType dest);
    1278 };
    1279
    1280 #endif // SHARE_VM_CLASSFILE_VMSYMBOLS_HPP
    --- EOF ---