src/share/vm/opto/library_call.cpp

changeset 9703
2fdf635bcf28
parent 9572
624a0741915c
parent 9649
b2000ea410b0
child 9756
2be326848943
     1.1 --- a/src/share/vm/opto/library_call.cpp	Thu Sep 05 18:40:52 2019 +0800
     1.2 +++ b/src/share/vm/opto/library_call.cpp	Thu Sep 05 18:52:27 2019 +0800
     1.3 @@ -2608,9 +2608,10 @@
     1.4    Node* offset = top();
     1.5    Node* val;
     1.6  
     1.7 +  // The base is either a Java object or a value produced by Unsafe.staticFieldBase
     1.8 +  Node* base = argument(1);  // type: oop
     1.9 +
    1.10    if (!is_native_ptr) {
    1.11 -    // The base is either a Java object or a value produced by Unsafe.staticFieldBase
    1.12 -    Node* base = argument(1);  // type: oop
    1.13      // The offset is a value produced by Unsafe.staticFieldOffset or Unsafe.objectFieldOffset
    1.14      offset = argument(2);  // type: long
    1.15      // We currently rely on the cookies produced by Unsafe.xxxFieldOffset
    1.16 @@ -2630,9 +2631,7 @@
    1.17      val = is_store ? argument(3) : NULL;
    1.18    }
    1.19  
    1.20 -  // Can base be NULL? Otherwise, always on-heap access.
    1.21 -  bool can_access_non_heap = TypePtr::NULL_PTR->higher_equal(_gvn.type(heap_base_oop));
    1.22 -  if (can_access_non_heap && type == T_OBJECT) {
    1.23 +  if ((_gvn.type(base)->isa_ptr() == TypePtr::NULL_PTR) && type == T_OBJECT) {
    1.24      return false; // off-heap oop accesses are not supported
    1.25    }
    1.26  

mercurial