1.1 --- a/src/share/vm/gc_implementation/g1/g1OopClosures.hpp Wed Sep 25 17:47:51 2013 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/g1OopClosures.hpp Thu Sep 26 10:25:02 2013 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2001, 2013, 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 @@ -91,12 +91,12 @@ 1.11 } 1.12 1.13 template <class T> inline T* set_partial_array_mask(T obj) { 1.14 - assert(((uintptr_t)obj & G1_PARTIAL_ARRAY_MASK) == 0, "Information loss!"); 1.15 - return (T*) ((uintptr_t)obj | G1_PARTIAL_ARRAY_MASK); 1.16 + assert(((uintptr_t)(void *)obj & G1_PARTIAL_ARRAY_MASK) == 0, "Information loss!"); 1.17 + return (T*) ((uintptr_t)(void *)obj | G1_PARTIAL_ARRAY_MASK); 1.18 } 1.19 1.20 template <class T> inline oop clear_partial_array_mask(T* ref) { 1.21 - return oop((intptr_t)ref & ~G1_PARTIAL_ARRAY_MASK); 1.22 + return cast_to_oop((intptr_t)ref & ~G1_PARTIAL_ARRAY_MASK); 1.23 } 1.24 1.25 class G1ParScanPartialArrayClosure : public G1ParClosureSuper {