comparison src/share/vm/oops/instanceMirrorKlass.hpp @ 7745:6dc8db7164d2

Added tag jdk9-b49 for changeset 360cd1fc42f1
author katleman
date Thu, 05 Feb 2015 11:43:29 -0800
parents db9981fd3124
children 30ea4c772cb9
comparison
equal deleted inserted replaced
4:cc460b9e8e72 5:0dc55ba1a991
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");