hotspot/src/share/vm/runtime/stackValue.cpp
changeset 46271 979ebd346ecf
parent 24424 2658d7834c6e
equal deleted inserted replaced
46270:2e7898927798 46271:979ebd346ecf
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   101         value.noop =  (narrowOop) *(julong*) value_addr;
   101         value.noop =  (narrowOop) *(julong*) value_addr;
   102       } else {
   102       } else {
   103         value.noop = *(narrowOop*) value_addr;
   103         value.noop = *(narrowOop*) value_addr;
   104       }
   104       }
   105       // Decode narrowoop and wrap a handle around the oop
   105       // Decode narrowoop and wrap a handle around the oop
   106       Handle h(oopDesc::decode_heap_oop(value.noop));
   106       Handle h(Thread::current(), oopDesc::decode_heap_oop(value.noop));
   107       return new StackValue(h);
   107       return new StackValue(h);
   108     }
   108     }
   109 #endif
   109 #endif
   110     case Location::oop: {
   110     case Location::oop: {
   111       oop val = *(oop *)value_addr;
   111       oop val = *(oop *)value_addr;
   116          // The narrow_oop_base could be NULL or be the address
   116          // The narrow_oop_base could be NULL or be the address
   117          // of the page below heap. Use NULL value for both cases.
   117          // of the page below heap. Use NULL value for both cases.
   118          val = (oop)NULL;
   118          val = (oop)NULL;
   119       }
   119       }
   120 #endif
   120 #endif
   121       Handle h(val); // Wrap a handle around the oop
   121       Handle h(Thread::current(), val); // Wrap a handle around the oop
   122       return new StackValue(h);
   122       return new StackValue(h);
   123     }
   123     }
   124     case Location::addr: {
   124     case Location::addr: {
   125       ShouldNotReachHere(); // both C1 and C2 now inline jsrs
   125       ShouldNotReachHere(); // both C1 and C2 now inline jsrs
   126     }
   126     }