1.1 --- a/src/share/vm/oops/typeArrayOop.hpp Fri Aug 31 16:39:35 2012 -0700 1.2 +++ b/src/share/vm/oops/typeArrayOop.hpp Sat Sep 01 13:25:18 2012 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. 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 @@ -151,6 +151,23 @@ 1.11 jbyte byte_at_acquire(int which) const { return OrderAccess::load_acquire(byte_at_addr(which)); } 1.12 void release_byte_at_put(int which, jbyte contents) { OrderAccess::release_store(byte_at_addr(which), contents); } 1.13 1.14 + // Java thinks metadata arrays are just arrays of either long or int, since 1.15 + // there doesn't seem to be T_ADDRESS, so this is a bit of unfortunate 1.16 + // casting 1.17 +#ifdef _LP64 1.18 + Metadata* metadata_at(int which) const { 1.19 + return (Metadata*)*long_at_addr(which); } 1.20 + void metadata_at_put(int which, Metadata* contents) { 1.21 + *long_at_addr(which) = (long)contents; 1.22 + } 1.23 +#else 1.24 + Metadata* metadata_at(int which) const { 1.25 + return (Metadata*)*int_at_addr(which); } 1.26 + void metadata_at_put(int which, Metadata* contents) { 1.27 + *int_at_addr(which) = (int)contents; 1.28 + } 1.29 +#endif // _LP64 1.30 + 1.31 // Sizing 1.32 1.33 // Returns the number of words necessary to hold an array of "len"