comparison src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp @ 10265:92ef81e2f571

8003557: NPG: Klass* const k should be const Klass* k. Summary: With NPG, const KlassOop klass which is in fact a definition converted to Klass* const, which is not the original intention. The right usage is converting them to const Klass*. Reviewed-by: coleenp, kvn Contributed-by: yumin.qi@oracle.com
author minqi
date Fri, 10 May 2013 08:27:30 -0700
parents d8ce2825b193
children
comparison
equal deleted inserted replaced
10262:c272092594bd 10265:92ef81e2f571
1 /* 1 /*
2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2005, 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.
185 obj->follow_contents(this); 185 obj->follow_contents(this);
186 } 186 }
187 187
188 // Process ObjArrays one at a time to avoid marking stack bloat. 188 // Process ObjArrays one at a time to avoid marking stack bloat.
189 ObjArrayTask task; 189 ObjArrayTask task;
190 if (_objarray_stack.pop_overflow(task)) { 190 if (_objarray_stack.pop_overflow(task) || _objarray_stack.pop_local(task)) {
191 ObjArrayKlass* const k = (ObjArrayKlass*)task.obj()->klass(); 191 ObjArrayKlass* k = (ObjArrayKlass*)task.obj()->klass();
192 k->oop_follow_contents(this, task.obj(), task.index());
193 } else if (_objarray_stack.pop_local(task)) {
194 ObjArrayKlass* const k = (ObjArrayKlass*)task.obj()->klass();
195 k->oop_follow_contents(this, task.obj(), task.index()); 192 k->oop_follow_contents(this, task.obj(), task.index());
196 } 193 }
197 } while (!marking_stacks_empty()); 194 } while (!marking_stacks_empty());
198 195
199 assert(marking_stacks_empty(), "Sanity"); 196 assert(marking_stacks_empty(), "Sanity");