Mercurial > hg > graal-compiler
comparison src/share/vm/oops/instanceMirrorKlass.cpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 89152779163c 9428a0b94204 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2011, 2014, 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. |
365 | 365 |
366 instanceOop InstanceMirrorKlass::allocate_instance(KlassHandle k, TRAPS) { | 366 instanceOop InstanceMirrorKlass::allocate_instance(KlassHandle k, TRAPS) { |
367 // Query before forming handle. | 367 // Query before forming handle. |
368 int size = instance_size(k); | 368 int size = instance_size(k); |
369 KlassHandle h_k(THREAD, this); | 369 KlassHandle h_k(THREAD, this); |
370 instanceOop i = (instanceOop) CollectedHeap::Class_obj_allocate(h_k, size, k, CHECK_NULL); | 370 instanceOop i = (instanceOop)CollectedHeap::obj_allocate(h_k, size, CHECK_NULL); |
371 | |
372 // Since mirrors can be variable sized because of the static fields, store | |
373 // the size in the mirror itself. | |
374 java_lang_Class::set_oop_size(i, size); | |
375 | |
371 return i; | 376 return i; |
372 } | 377 } |
373 | 378 |
374 int InstanceMirrorKlass::oop_size(oop obj) const { | 379 int InstanceMirrorKlass::oop_size(oop obj) const { |
375 return java_lang_Class::oop_size(obj); | 380 return java_lang_Class::oop_size(obj); |