src/share/vm/ci/ciInstanceKlass.cpp

changeset 2658
c7f3d0b4570f
parent 2551
4f26f535a225
child 3137
e6b1331a51d2
     1.1 --- a/src/share/vm/ci/ciInstanceKlass.cpp	Fri Mar 18 15:52:42 2011 -0700
     1.2 +++ b/src/share/vm/ci/ciInstanceKlass.cpp	Fri Mar 18 16:00:34 2011 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -85,7 +85,6 @@
    1.11      if (h_k() != SystemDictionary::Object_klass()) {
    1.12        super();
    1.13      }
    1.14 -    java_mirror();
    1.15      //compute_nonstatic_fields();  // done outside of constructor
    1.16    }
    1.17  
    1.18 @@ -320,6 +319,9 @@
    1.19  // Get the instance of java.lang.Class corresponding to this klass.
    1.20  // Cache it on this->_java_mirror.
    1.21  ciInstance* ciInstanceKlass::java_mirror() {
    1.22 +  if (is_shared()) {
    1.23 +    return ciKlass::java_mirror();
    1.24 +  }
    1.25    if (_java_mirror == NULL) {
    1.26      _java_mirror = ciKlass::java_mirror();
    1.27    }

mercurial