511 // |
511 // |
512 // The F_xx is one of the Flags enum; see below. |
512 // The F_xx is one of the Flags enum; see below. |
513 // |
513 // |
514 // for Emacs: (let ((c-backslash-column 120) (c-backslash-max-column 120)) (c-backslash-region (point) (point-max) nil t)) |
514 // for Emacs: (let ((c-backslash-column 120) (c-backslash-max-column 120)) (c-backslash-region (point) (point-max) nil t)) |
515 #define VM_INTRINSICS_DO(do_intrinsic, do_class, do_name, do_signature, do_alias) \ |
515 #define VM_INTRINSICS_DO(do_intrinsic, do_class, do_name, do_signature, do_alias) \ |
516 do_intrinsic(_Object_init, java_lang_Object, object_initializer_name, void_method_signature, F_R) \ |
|
517 /* (symbol object_initializer_name defined above) */ \ |
|
518 \ |
|
519 do_intrinsic(_hashCode, java_lang_Object, hashCode_name, void_int_signature, F_R) \ |
516 do_intrinsic(_hashCode, java_lang_Object, hashCode_name, void_int_signature, F_R) \ |
520 do_name( hashCode_name, "hashCode") \ |
517 do_name( hashCode_name, "hashCode") \ |
521 do_intrinsic(_getClass, java_lang_Object, getClass_name, void_class_signature, F_R) \ |
518 do_intrinsic(_getClass, java_lang_Object, getClass_name, void_class_signature, F_R) \ |
522 do_name( getClass_name, "getClass") \ |
519 do_name( getClass_name, "getClass") \ |
523 do_intrinsic(_clone, java_lang_Object, clone_name, void_object_signature, F_R) \ |
520 do_intrinsic(_clone, java_lang_Object, clone_name, void_object_signature, F_R) \ |
633 do_signature(copyOfRange_signature, "([Ljava/lang/Object;IILjava/lang/Class;)[Ljava/lang/Object;") \ |
630 do_signature(copyOfRange_signature, "([Ljava/lang/Object;IILjava/lang/Class;)[Ljava/lang/Object;") \ |
634 \ |
631 \ |
635 do_intrinsic(_equalsC, java_util_Arrays, equals_name, equalsC_signature, F_S) \ |
632 do_intrinsic(_equalsC, java_util_Arrays, equals_name, equalsC_signature, F_S) \ |
636 do_signature(equalsC_signature, "([C[C)Z") \ |
633 do_signature(equalsC_signature, "([C[C)Z") \ |
637 \ |
634 \ |
638 do_intrinsic(_invoke, java_lang_reflect_Method, invoke_name, object_array_object_object_signature, F_R) \ |
|
639 /* (symbols invoke_name and invoke_signature defined above) */ \ |
|
640 \ |
|
641 do_intrinsic(_compareTo, java_lang_String, compareTo_name, string_int_signature, F_R) \ |
635 do_intrinsic(_compareTo, java_lang_String, compareTo_name, string_int_signature, F_R) \ |
642 do_name( compareTo_name, "compareTo") \ |
636 do_name( compareTo_name, "compareTo") \ |
643 do_intrinsic(_indexOf, java_lang_String, indexOf_name, string_int_signature, F_R) \ |
637 do_intrinsic(_indexOf, java_lang_String, indexOf_name, string_int_signature, F_R) \ |
644 do_name( indexOf_name, "indexOf") \ |
638 do_name( indexOf_name, "indexOf") \ |
645 do_intrinsic(_equals, java_lang_String, equals_name, object_boolean_signature, F_R) \ |
639 do_intrinsic(_equals, java_lang_String, equals_name, object_boolean_signature, F_R) \ |
653 /* (symbols get_name and void_long_signature defined above) */ \ |
647 /* (symbols get_name and void_long_signature defined above) */ \ |
654 \ |
648 \ |
655 do_intrinsic(_attemptUpdate, sun_misc_AtomicLongCSImpl, attemptUpdate_name, attemptUpdate_signature, F_R) \ |
649 do_intrinsic(_attemptUpdate, sun_misc_AtomicLongCSImpl, attemptUpdate_name, attemptUpdate_signature, F_R) \ |
656 do_name( attemptUpdate_name, "attemptUpdate") \ |
650 do_name( attemptUpdate_name, "attemptUpdate") \ |
657 do_signature(attemptUpdate_signature, "(JJ)Z") \ |
651 do_signature(attemptUpdate_signature, "(JJ)Z") \ |
658 \ |
|
659 do_intrinsic(_fillInStackTrace, java_lang_Throwable, fillInStackTrace_name, void_throwable_signature, F_RNY) \ |
|
660 \ |
652 \ |
661 /* support for sun.misc.Unsafe */ \ |
653 /* support for sun.misc.Unsafe */ \ |
662 do_class(sun_misc_Unsafe, "sun/misc/Unsafe") \ |
654 do_class(sun_misc_Unsafe, "sun/misc/Unsafe") \ |
663 \ |
655 \ |
664 do_intrinsic(_allocateInstance, sun_misc_Unsafe, allocateInstance_name, allocateInstance_signature, F_RN) \ |
656 do_intrinsic(_allocateInstance, sun_misc_Unsafe, allocateInstance_name, allocateInstance_signature, F_RN) \ |
817 do_name( prefetchWrite_name, "prefetchWrite") \ |
809 do_name( prefetchWrite_name, "prefetchWrite") \ |
818 do_intrinsic(_prefetchReadStatic, sun_misc_Unsafe, prefetchReadStatic_name, prefetch_signature, F_SN) \ |
810 do_intrinsic(_prefetchReadStatic, sun_misc_Unsafe, prefetchReadStatic_name, prefetch_signature, F_SN) \ |
819 do_name( prefetchReadStatic_name, "prefetchReadStatic") \ |
811 do_name( prefetchReadStatic_name, "prefetchReadStatic") \ |
820 do_intrinsic(_prefetchWriteStatic, sun_misc_Unsafe, prefetchWriteStatic_name, prefetch_signature, F_SN) \ |
812 do_intrinsic(_prefetchWriteStatic, sun_misc_Unsafe, prefetchWriteStatic_name, prefetch_signature, F_SN) \ |
821 do_name( prefetchWriteStatic_name, "prefetchWriteStatic") \ |
813 do_name( prefetchWriteStatic_name, "prefetchWriteStatic") \ |
|
814 /*== LAST_COMPILER_INLINE*/ \ |
|
815 /*the compiler does have special inlining code for these; bytecode inline is just fine */ \ |
|
816 \ |
|
817 do_intrinsic(_fillInStackTrace, java_lang_Throwable, fillInStackTrace_name, void_throwable_signature, F_RNY) \ |
|
818 \ |
|
819 do_intrinsic(_Object_init, java_lang_Object, object_initializer_name, void_method_signature, F_R) \ |
|
820 /* (symbol object_initializer_name defined above) */ \ |
|
821 \ |
|
822 do_intrinsic(_invoke, java_lang_reflect_Method, invoke_name, object_array_object_object_signature, F_R) \ |
|
823 /* (symbols invoke_name and invoke_signature defined above) */ \ |
|
824 \ |
822 /*end*/ |
825 /*end*/ |
|
826 |
823 |
827 |
824 |
828 |
825 |
829 |
826 // Class vmSymbols |
830 // Class vmSymbols |
827 |
831 |
933 VM_INTRINSICS_DO(VM_INTRINSIC_ENUM, |
937 VM_INTRINSICS_DO(VM_INTRINSIC_ENUM, |
934 VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) |
938 VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) |
935 #undef VM_INTRINSIC_ENUM |
939 #undef VM_INTRINSIC_ENUM |
936 |
940 |
937 ID_LIMIT, |
941 ID_LIMIT, |
|
942 LAST_COMPILER_INLINE = _prefetchWriteStatic, |
938 FIRST_ID = _none + 1 |
943 FIRST_ID = _none + 1 |
939 }; |
944 }; |
940 |
945 |
941 enum Flags { |
946 enum Flags { |
942 // AccessFlags syndromes relevant to intrinsics. |
947 // AccessFlags syndromes relevant to intrinsics. |
970 static vmSymbols::SID name_for(ID id); |
975 static vmSymbols::SID name_for(ID id); |
971 static vmSymbols::SID signature_for(ID id); |
976 static vmSymbols::SID signature_for(ID id); |
972 static Flags flags_for(ID id); |
977 static Flags flags_for(ID id); |
973 |
978 |
974 static const char* short_name_as_C_string(ID id, char* buf, int size); |
979 static const char* short_name_as_C_string(ID id, char* buf, int size); |
|
980 |
|
981 // Access to intrinsic methods: |
|
982 static methodOop method_for(ID id); |
975 }; |
983 }; |