1.1 --- a/src/share/vm/oops/cpCacheOop.cpp Tue Feb 01 03:38:44 2011 -0800 1.2 +++ b/src/share/vm/oops/cpCacheOop.cpp Tue Feb 01 05:51:24 2011 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1998, 2011, 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 @@ -98,15 +98,15 @@ 1.11 // Atomically sets f1 if it is still NULL, otherwise it keeps the 1.12 // current value. 1.13 void ConstantPoolCacheEntry::set_f1_if_null_atomic(oop f1) { 1.14 - // Use barriers as in oop_store 1.15 - HeapWord* f1_addr = (HeapWord*) &_f1; 1.16 - update_barrier_set_pre(f1_addr, f1); 1.17 - void* result = Atomic::cmpxchg_ptr(f1, f1_addr, NULL); 1.18 - bool success = (result == NULL); 1.19 - if (success) { 1.20 - update_barrier_set((void*) f1_addr, f1); 1.21 - } 1.22 + // Use barriers as in oop_store 1.23 + oop* f1_addr = (oop*) &_f1; 1.24 + update_barrier_set_pre(f1_addr, f1); 1.25 + void* result = Atomic::cmpxchg_ptr(f1, f1_addr, NULL); 1.26 + bool success = (result == NULL); 1.27 + if (success) { 1.28 + update_barrier_set(f1_addr, f1); 1.29 } 1.30 +} 1.31 1.32 #ifdef ASSERT 1.33 // It is possible to have two different dummy methodOops created