1.1 --- a/src/share/vm/runtime/stackValue.cpp Wed Sep 10 14:29:32 2008 -0700 1.2 +++ b/src/share/vm/runtime/stackValue.cpp Wed Sep 10 18:23:32 2008 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -86,6 +86,22 @@ 1.11 case Location::lng: 1.12 // Long value in an aligned adjacent pair 1.13 return new StackValue(*(intptr_t*)value_addr); 1.14 + case Location::narrowoop: { 1.15 + union { intptr_t p; narrowOop noop;} value; 1.16 + value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF); 1.17 + if (loc.is_register()) { 1.18 + // The callee has no clue whether the register holds an int, 1.19 + // long or is unused. He always saves a long. Here we know 1.20 + // a long was saved, but we only want an int back. Narrow the 1.21 + // saved long to the int that the JVM wants. 1.22 + value.noop = (narrowOop) *(julong*) value_addr; 1.23 + } else { 1.24 + value.noop = *(narrowOop*) value_addr; 1.25 + } 1.26 + // Decode narrowoop and wrap a handle around the oop 1.27 + Handle h(oopDesc::decode_heap_oop(value.noop)); 1.28 + return new StackValue(h); 1.29 + } 1.30 #endif 1.31 case Location::oop: { 1.32 Handle h(*(oop *)value_addr); // Wrap a handle around the oop