comparison src/share/vm/oops/instanceMirrorKlass.hpp @ 12355:cefad50507d8

Merge with hs25-b53
author Gilles Duboscq <duboscq@ssw.jku.at>
date Fri, 11 Oct 2013 10:38:03 +0200
parents 190899198332
children
comparison
equal deleted inserted replaced
12058:ccb4f2af2319 12355:cefad50507d8
1 /* 1 /*
2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
64 virtual int oop_size(oop obj) const; 64 virtual int oop_size(oop obj) const;
65 65
66 // Static field offset is an offset into the Heap, should be converted by 66 // Static field offset is an offset into the Heap, should be converted by
67 // based on UseCompressedOop for traversal 67 // based on UseCompressedOop for traversal
68 static HeapWord* start_of_static_fields(oop obj) { 68 static HeapWord* start_of_static_fields(oop obj) {
69 return (HeapWord*)((intptr_t)obj + offset_of_static_fields()); 69 return (HeapWord*)(cast_from_oop<intptr_t>(obj) + offset_of_static_fields());
70 } 70 }
71 71
72 static void init_offset_of_static_fields() { 72 static void init_offset_of_static_fields() {
73 // Cache the offset of the static fields in the Class instance 73 // Cache the offset of the static fields in the Class instance
74 assert(_offset_of_static_fields == 0, "once"); 74 assert(_offset_of_static_fields == 0, "once");