src/share/vm/ci/ciField.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6893268 Cdiff src/share/vm/ci/ciField.cpp

src/share/vm/ci/ciField.cpp

Print this page
rev 1083 : [mq]: indy.compiler.inline.patch

*** 1,7 **** /* ! * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 84,94 **** // field. if (field_type == T_OBJECT || field_type == T_ARRAY) { bool ignore; // This is not really a class reference; the index always refers to the // field's type signature, as a symbol. Linkage checks do not apply. ! _type = ciEnv::current(thread)->get_klass_by_index(klass, sig_index, ignore); } else { _type = ciType::make(field_type); } _name = (ciSymbol*)ciEnv::current(thread)->get_object(name()); --- 84,94 ---- // field. if (field_type == T_OBJECT || field_type == T_ARRAY) { bool ignore; // This is not really a class reference; the index always refers to the // field's type signature, as a symbol. Linkage checks do not apply. ! _type = ciEnv::current(thread)->get_klass_by_index(cpool, sig_index, ignore, klass); } else { _type = ciType::make(field_type); } _name = (ciSymbol*)ciEnv::current(thread)->get_object(name());
*** 98,110 **** // Note: we actually create a ciInstanceKlass for this klass, // even though we may not need to. int holder_index = cpool->klass_ref_index_at(index); bool holder_is_accessible; ciInstanceKlass* declared_holder = ! ciEnv::current(thread)->get_klass_by_index(klass, holder_index, ! holder_is_accessible) ! ->as_instance_klass(); // The declared holder of this field may not have been loaded. // Bail out with partial field information. if (!holder_is_accessible) { // _cp_index and _type have already been set. --- 98,110 ---- // Note: we actually create a ciInstanceKlass for this klass, // even though we may not need to. int holder_index = cpool->klass_ref_index_at(index); bool holder_is_accessible; ciInstanceKlass* declared_holder = ! ciEnv::current(thread)->get_klass_by_index(cpool, holder_index, ! holder_is_accessible, ! klass)->as_instance_klass(); // The declared holder of this field may not have been loaded. // Bail out with partial field information. if (!holder_is_accessible) { // _cp_index and _type have already been set.
*** 166,177 **** _flags = ciFlags(fd->access_flags()); _offset = fd->offset(); _holder = CURRENT_ENV->get_object(fd->field_holder())->as_instance_klass(); // Check to see if the field is constant. ! if (_holder->is_initialized() && ! this->is_final() && this->is_static()) { // This field just may be constant. The only cases where it will // not be constant are: // // 1. The field holds a non-perm-space oop. The field is, strictly // speaking, constant but we cannot embed non-perm-space oops into --- 166,187 ---- _flags = ciFlags(fd->access_flags()); _offset = fd->offset(); _holder = CURRENT_ENV->get_object(fd->field_holder())->as_instance_klass(); // Check to see if the field is constant. ! if (_holder->is_initialized() && this->is_final()) { ! if (!this->is_static()) { ! // A field can be constant if it's a final static field or if it's ! // a final non-static field of a trusted class ({java,sun}.dyn). ! if (_holder->is_in_package("java.dyn") || _holder->is_in_package("sun.dyn")) { ! _is_constant = true; ! return; ! } ! _is_constant = false; ! return; ! } ! // This field just may be constant. The only cases where it will // not be constant are: // // 1. The field holds a non-perm-space oop. The field is, strictly // speaking, constant but we cannot embed non-perm-space oops into
src/share/vm/ci/ciField.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File