comparison src/share/vm/oops/objArrayKlass.inline.hpp @ 6948:e522a00b91aa

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author Doug Simon <doug.simon@oracle.com>
date Mon, 12 Nov 2012 23:14:12 +0100
parents d8ce2825b193
children db9981fd3124
comparison
equal deleted inserted replaced
6711:ae13cc658b80 6948:e522a00b91aa
1 /* 1 /*
2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2010, 2012, 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.
23 */ 23 */
24 24
25 #ifndef SHARE_VM_OOPS_OBJARRAYKLASS_INLINE_HPP 25 #ifndef SHARE_VM_OOPS_OBJARRAYKLASS_INLINE_HPP
26 #define SHARE_VM_OOPS_OBJARRAYKLASS_INLINE_HPP 26 #define SHARE_VM_OOPS_OBJARRAYKLASS_INLINE_HPP
27 27
28 #include "gc_implementation/shared/markSweep.inline.hpp"
28 #include "oops/objArrayKlass.hpp" 29 #include "oops/objArrayKlass.hpp"
29 #ifndef SERIALGC 30 #ifndef SERIALGC
30 #include "gc_implementation/parallelScavenge/psCompactionManager.inline.hpp" 31 #include "gc_implementation/parallelScavenge/psCompactionManager.inline.hpp"
31 #include "gc_implementation/parallelScavenge/psParallelCompact.hpp" 32 #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
32 #endif 33 #endif
33 34
34 void objArrayKlass::oop_follow_contents(oop obj, int index) { 35 void ObjArrayKlass::oop_follow_contents(oop obj, int index) {
35 if (UseCompressedOops) { 36 if (UseCompressedOops) {
36 objarray_follow_contents<narrowOop>(obj, index); 37 objarray_follow_contents<narrowOop>(obj, index);
37 } else { 38 } else {
38 objarray_follow_contents<oop>(obj, index); 39 objarray_follow_contents<oop>(obj, index);
39 } 40 }
40 } 41 }
41 42
42 template <class T> 43 template <class T>
43 void objArrayKlass::objarray_follow_contents(oop obj, int index) { 44 void ObjArrayKlass::objarray_follow_contents(oop obj, int index) {
44 objArrayOop a = objArrayOop(obj); 45 objArrayOop a = objArrayOop(obj);
45 const size_t len = size_t(a->length()); 46 const size_t len = size_t(a->length());
46 const size_t beg_index = size_t(index); 47 const size_t beg_index = size_t(index);
47 assert(beg_index < len || len == 0, "index too large"); 48 assert(beg_index < len || len == 0, "index too large");
48 49
61 MarkSweep::push_objarray(a, end_index); // Push the continuation. 62 MarkSweep::push_objarray(a, end_index); // Push the continuation.
62 } 63 }
63 } 64 }
64 65
65 #ifndef SERIALGC 66 #ifndef SERIALGC
66 void objArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj, 67 void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj,
67 int index) { 68 int index) {
68 if (UseCompressedOops) { 69 if (UseCompressedOops) {
69 objarray_follow_contents<narrowOop>(cm, obj, index); 70 objarray_follow_contents<narrowOop>(cm, obj, index);
70 } else { 71 } else {
71 objarray_follow_contents<oop>(cm, obj, index); 72 objarray_follow_contents<oop>(cm, obj, index);
72 } 73 }
73 } 74 }
74 75
75 template <class T> 76 template <class T>
76 void objArrayKlass::objarray_follow_contents(ParCompactionManager* cm, oop obj, 77 void ObjArrayKlass::objarray_follow_contents(ParCompactionManager* cm, oop obj,
77 int index) { 78 int index) {
78 objArrayOop a = objArrayOop(obj); 79 objArrayOop a = objArrayOop(obj);
79 const size_t len = size_t(a->length()); 80 const size_t len = size_t(a->length());
80 const size_t beg_index = size_t(index); 81 const size_t beg_index = size_t(index);
81 assert(beg_index < len || len == 0, "index too large"); 82 assert(beg_index < len || len == 0, "index too large");