src/share/vm/runtime/stackValue.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/runtime/stackValue.cpp	Wed Sep 10 16:50:22 2008
--- new/src/share/vm/runtime/stackValue.cpp	Wed Sep 10 16:50:22 2008

*** 1,7 **** --- 1,7 ---- /* ! * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. ! * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 84,93 **** --- 84,109 ---- // Double value in an aligned adjacent pair return new StackValue(*(intptr_t*)value_addr); case Location::lng: // Long value in an aligned adjacent pair return new StackValue(*(intptr_t*)value_addr); + case Location::narrowoop: { + union { intptr_t p; narrowOop noop;} value; + value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF); + if (loc.is_register()) { + // The callee has no clue whether the register holds an int, + // long or is unused. He always saves a long. Here we know + // a long was saved, but we only want an int back. Narrow the + // saved long to the int that the JVM wants. + value.noop = (narrowOop) *(julong*) value_addr; + } else { + value.noop = *(narrowOop*) value_addr; + } + // Decode narrowoop and wrap a handle around the oop + Handle h(oopDesc::decode_heap_oop(value.noop)); + return new StackValue(h); + } #endif case Location::oop: { Handle h(*(oop *)value_addr); // Wrap a handle around the oop return new StackValue(h); }

src/share/vm/runtime/stackValue.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File