Mercurial > hg > truffle
comparison src/share/vm/oops/klass.cpp @ 6152:958bb4b7be49
Merge
author | asaha |
---|---|
date | Tue, 10 Apr 2012 10:42:34 -0700 |
parents | 9a9bb0010c91 |
children | b632e80fc9dc |
comparison
equal
deleted
inserted
replaced
6151:e778c29768e6 | 6152:958bb4b7be49 |
---|---|
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. |
156 kl->set_access_flags(af); | 156 kl->set_access_flags(af); |
157 kl->set_subklass(NULL); | 157 kl->set_subklass(NULL); |
158 kl->set_next_sibling(NULL); | 158 kl->set_next_sibling(NULL); |
159 kl->set_alloc_count(0); | 159 kl->set_alloc_count(0); |
160 kl->set_alloc_size(0); | 160 kl->set_alloc_size(0); |
161 #ifdef TRACE_SET_KLASS_TRACE_ID | |
162 TRACE_SET_KLASS_TRACE_ID(kl, 0); | 161 TRACE_SET_KLASS_TRACE_ID(kl, 0); |
163 #endif | |
164 | 162 |
165 kl->set_prototype_header(markOopDesc::prototype()); | 163 kl->set_prototype_header(markOopDesc::prototype()); |
166 kl->set_biased_lock_revocation_count(0); | 164 kl->set_biased_lock_revocation_count(0); |
167 kl->set_last_biased_lock_bulk_revocation_time(0); | 165 kl->set_last_biased_lock_bulk_revocation_time(0); |
168 | 166 |
174 klassOop ek = base_create_klass_oop(klass, size, vtbl, THREAD); | 172 klassOop ek = base_create_klass_oop(klass, size, vtbl, THREAD); |
175 return KlassHandle(THREAD, ek); | 173 return KlassHandle(THREAD, ek); |
176 } | 174 } |
177 | 175 |
178 void Klass_vtbl::post_new_init_klass(KlassHandle& klass, | 176 void Klass_vtbl::post_new_init_klass(KlassHandle& klass, |
179 klassOop new_klass, | 177 klassOop new_klass) const { |
180 int size) const { | |
181 assert(!new_klass->klass_part()->null_vtbl(), "Not a complete klass"); | 178 assert(!new_klass->klass_part()->null_vtbl(), "Not a complete klass"); |
182 CollectedHeap::post_allocation_install_obj_klass(klass, new_klass, size); | 179 CollectedHeap::post_allocation_install_obj_klass(klass, new_klass); |
183 } | 180 } |
184 | 181 |
185 void* Klass_vtbl::operator new(size_t ignored, KlassHandle& klass, | 182 void* Klass_vtbl::operator new(size_t ignored, KlassHandle& klass, |
186 int size, TRAPS) { | 183 int size, TRAPS) { |
187 // The vtable pointer is installed during the execution of | 184 // The vtable pointer is installed during the execution of |