646 public final long checkcastArraycopy = getFieldValue("StubRoutines::_checkcast_arraycopy", Long.class, "address"); |
646 public final long checkcastArraycopy = getFieldValue("StubRoutines::_checkcast_arraycopy", Long.class, "address"); |
647 public final long checkcastArraycopyUninit = getFieldValue("StubRoutines::_checkcast_arraycopy_uninit", Long.class, "address"); |
647 public final long checkcastArraycopyUninit = getFieldValue("StubRoutines::_checkcast_arraycopy_uninit", Long.class, "address"); |
648 public final long unsafeArraycopy = getFieldValue("StubRoutines::_unsafe_arraycopy", Long.class, "address"); |
648 public final long unsafeArraycopy = getFieldValue("StubRoutines::_unsafe_arraycopy", Long.class, "address"); |
649 public final long genericArraycopy = getFieldValue("StubRoutines::_generic_arraycopy", Long.class, "address"); |
649 public final long genericArraycopy = getFieldValue("StubRoutines::_generic_arraycopy", Long.class, "address"); |
650 |
650 |
|
651 // Allocation stubs that throw an exception when allocation fails |
651 public final long newInstanceAddress = getAddress("JVMCIRuntime::new_instance"); |
652 public final long newInstanceAddress = getAddress("JVMCIRuntime::new_instance"); |
652 public final long newArrayAddress = getAddress("JVMCIRuntime::new_array"); |
653 public final long newArrayAddress = getAddress("JVMCIRuntime::new_array"); |
653 public final long newMultiArrayAddress = getAddress("JVMCIRuntime::new_multi_array"); |
654 public final long newMultiArrayAddress = getAddress("JVMCIRuntime::new_multi_array"); |
654 public final long dynamicNewArrayAddress = getAddress("JVMCIRuntime::dynamic_new_array"); |
655 |
655 public final long dynamicNewInstanceAddress = getAddress("JVMCIRuntime::dynamic_new_instance"); |
656 // Allocation stubs that return null when allocation fails |
|
657 public final long newInstanceOrNullAddress = getAddress("JVMCIRuntime::new_instance_or_null", 0L); |
|
658 public final long newArrayOrNullAddress = getAddress("JVMCIRuntime::new_array_or_null", 0L); |
|
659 public final long newMultiArrayOrNullAddress = getAddress("JVMCIRuntime::new_multi_array_or_null", 0L); |
|
660 |
|
661 public boolean areNullAllocationStubsAvailable() { |
|
662 return newInstanceOrNullAddress != 0L; |
|
663 } |
|
664 |
|
665 /** |
|
666 * Checks that HotSpot implements all or none of the allocate-or-null stubs. |
|
667 */ |
|
668 private boolean checkNullAllocationStubs() { |
|
669 if (newInstanceOrNullAddress == 0L) { |
|
670 assert newArrayOrNullAddress == 0L; |
|
671 assert newMultiArrayOrNullAddress == 0L; |
|
672 } else { |
|
673 assert newArrayOrNullAddress != 0L; |
|
674 assert newMultiArrayOrNullAddress != 0L; |
|
675 } |
|
676 return true; |
|
677 } |
656 |
678 |
657 public final long threadIsInterruptedAddress = getAddress("JVMCIRuntime::thread_is_interrupted"); |
679 public final long threadIsInterruptedAddress = getAddress("JVMCIRuntime::thread_is_interrupted"); |
658 public final long vmMessageAddress = getAddress("JVMCIRuntime::vm_message"); |
680 public final long vmMessageAddress = getAddress("JVMCIRuntime::vm_message"); |
659 public final long identityHashCodeAddress = getAddress("JVMCIRuntime::identity_hash_code"); |
681 public final long identityHashCodeAddress = getAddress("JVMCIRuntime::identity_hash_code"); |
660 public final long exceptionHandlerForPcAddress = getAddress("JVMCIRuntime::exception_handler_for_pc"); |
682 public final long exceptionHandlerForPcAddress = getAddress("JVMCIRuntime::exception_handler_for_pc"); |