Mercurial > hg > graal-jvmci-8
comparison src/share/vm/ci/ciInstanceKlass.cpp @ 2376:c7f3d0b4570f
7017732: move static fields into Class to prepare for perm gen removal
Reviewed-by: kvn, coleenp, twisti, stefank
author | never |
---|---|
date | Fri, 18 Mar 2011 16:00:34 -0700 |
parents | 4f26f535a225 |
children | 0654ee04b214 e6b1331a51d2 |
comparison
equal
deleted
inserted
replaced
2375:d673ef06fe96 | 2376:c7f3d0b4570f |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2011, 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. |
83 | 83 |
84 if (is_shared()) { | 84 if (is_shared()) { |
85 if (h_k() != SystemDictionary::Object_klass()) { | 85 if (h_k() != SystemDictionary::Object_klass()) { |
86 super(); | 86 super(); |
87 } | 87 } |
88 java_mirror(); | |
89 //compute_nonstatic_fields(); // done outside of constructor | 88 //compute_nonstatic_fields(); // done outside of constructor |
90 } | 89 } |
91 | 90 |
92 _field_cache = NULL; | 91 _field_cache = NULL; |
93 } | 92 } |
318 // ciInstanceKlass::java_mirror | 317 // ciInstanceKlass::java_mirror |
319 // | 318 // |
320 // Get the instance of java.lang.Class corresponding to this klass. | 319 // Get the instance of java.lang.Class corresponding to this klass. |
321 // Cache it on this->_java_mirror. | 320 // Cache it on this->_java_mirror. |
322 ciInstance* ciInstanceKlass::java_mirror() { | 321 ciInstance* ciInstanceKlass::java_mirror() { |
322 if (is_shared()) { | |
323 return ciKlass::java_mirror(); | |
324 } | |
323 if (_java_mirror == NULL) { | 325 if (_java_mirror == NULL) { |
324 _java_mirror = ciKlass::java_mirror(); | 326 _java_mirror = ciKlass::java_mirror(); |
325 } | 327 } |
326 return _java_mirror; | 328 return _java_mirror; |
327 } | 329 } |