comparison src/share/vm/oops/klass.cpp @ 6275:957c266d8bc5

Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Tue, 21 Aug 2012 10:39:19 +0200
parents 18a5539bf19b b632e80fc9dc
children e522a00b91aa
comparison
equal deleted inserted replaced
5891:fd8832ae511d 6275:957c266d8bc5
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 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.
175 klassOop ek = base_create_klass_oop(klass, size, vtbl, THREAD); 175 klassOop ek = base_create_klass_oop(klass, size, vtbl, THREAD);
176 return KlassHandle(THREAD, ek); 176 return KlassHandle(THREAD, ek);
177 } 177 }
178 178
179 void Klass_vtbl::post_new_init_klass(KlassHandle& klass, 179 void Klass_vtbl::post_new_init_klass(KlassHandle& klass,
180 klassOop new_klass, 180 klassOop new_klass) const {
181 int size) const {
182 assert(!new_klass->klass_part()->null_vtbl(), "Not a complete klass"); 181 assert(!new_klass->klass_part()->null_vtbl(), "Not a complete klass");
183 CollectedHeap::post_allocation_install_obj_klass(klass, new_klass, size); 182 CollectedHeap::post_allocation_install_obj_klass(klass, new_klass);
184 } 183 }
185 184
186 void* Klass_vtbl::operator new(size_t ignored, KlassHandle& klass, 185 void* Klass_vtbl::operator new(size_t ignored, KlassHandle& klass,
187 int size, TRAPS) { 186 int size, TRAPS) {
188 // The vtable pointer is installed during the execution of 187 // The vtable pointer is installed during the execution of
583 guarantee(obj->is_oop(), "should be oop"); 582 guarantee(obj->is_oop(), "should be oop");
584 guarantee(obj->klass()->is_perm(), "should be in permspace"); 583 guarantee(obj->klass()->is_perm(), "should be in permspace");
585 guarantee(obj->klass()->is_klass(), "klass field is not a klass"); 584 guarantee(obj->klass()->is_klass(), "klass field is not a klass");
586 } 585 }
587 586
588
589 void Klass::oop_verify_old_oop(oop obj, oop* p, bool allow_dirty) {
590 /* $$$ I think this functionality should be handled by verification of
591 RememberedSet::verify_old_oop(obj, p, allow_dirty, false);
592 the card table. */
593 }
594 void Klass::oop_verify_old_oop(oop obj, narrowOop* p, bool allow_dirty) { }
595
596 #ifndef PRODUCT 587 #ifndef PRODUCT
597 588
598 void Klass::verify_vtable_index(int i) { 589 void Klass::verify_vtable_index(int i) {
599 assert(oop_is_instance() || oop_is_array(), "only instanceKlass and arrayKlass have vtables"); 590 assert(oop_is_instance() || oop_is_array(), "only instanceKlass and arrayKlass have vtables");
600 if (oop_is_instance()) { 591 if (oop_is_instance()) {