constantPoolKlass.cpp revision 1472
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
# include "incls/_precompiled.incl"
# include "incls/_constantPoolKlass.cpp.incl"
constantPoolOop c =
c->set_length(length);
c->set_pool_holder(NULL);
c->set_flags(0);
// only set to non-zero if constant pool is merged by RedefineClasses
c->set_orig_length(0);
// if constant pool may change during RedefineClasses, it is created
// unsafe for GC concurrent processing.
// all fields are initialized; needed for GC
// initialize tag array
// Note: cannot introduce constant pool handle before since it is not
// completely initialized (no class) -> would cause assertion failure
}
return pool();
}
// Make sure size calculation is right
return k();
}
}
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::constantPoolKlassObj never moves.
// If the tags array is null we are in the middle of allocating this constant pool
// gc of constant pool contents
if (cp->is_pointer_entry(i)) {
}
base++;
}
// gc of constant pool instance variables
}
}
#ifndef SERIALGC
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::constantPoolKlassObj never moves.
// If the tags array is null we are in the middle of allocating this constant
// pool.
// gc of constant pool contents
if (cp->is_pointer_entry(i)) {
}
base++;
}
// gc of constant pool instance variables
}
}
#endif // SERIALGC
// Get size before changing pointers.
// Don't call size() or oop_size() since that is a virtual call.
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::constantPoolKlassObj never moves.
// If the tags array is null we are in the middle of allocating this constant
// pool.
if (cp->is_pointer_entry(i)) {
}
base++;
}
}
return size;
}
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::constantPoolKlassObj never moves.
// Get size before changing pointers.
// Don't call size() or oop_size() since that is a virtual call.
// If the tags array is null we are in the middle of allocating this constant
// pool.
if (cp->is_pointer_entry(i)) {
}
base++;
}
}
return size;
}
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::constantPoolKlassObj never moves.
// Get size before changing pointers.
// Don't call size() or oop_size() since that is a virtual call.
// If the tags array is null we are in the middle of allocating this constant
// pool.
if (cp->is_pointer_entry(i)) {
}
}
base++;
}
}
return size;
}
}
#ifndef SERIALGC
// If the tags array is null we are in the middle of allocating this constant
// pool.
if (cp->is_pointer_entry(i)) {
}
}
}
return cp->object_size();
}
int
// If the tags array is null we are in the middle of allocating this constant
// pool.
}
}
}
oop* p;
p = cp->cache_addr();
p = cp->pool_holder_addr();
return cp->object_size();
}
}
}
}
}
}
}
}
}
}
}
#endif // SERIALGC
#ifndef PRODUCT
// Printing
}
// Temp. remove cache so we can do lookups with original indicies.
case JVM_CONSTANT_Class :
}
break;
case JVM_CONSTANT_Fieldref :
case JVM_CONSTANT_Methodref :
break;
case JVM_CONSTANT_String :
} else {
}
break;
case JVM_CONSTANT_Integer :
break;
case JVM_CONSTANT_Float :
break;
case JVM_CONSTANT_Long :
index++; // Skip entry following eigth-byte constant
break;
case JVM_CONSTANT_Double :
index++; // Skip entry following eigth-byte constant
break;
case JVM_CONSTANT_NameAndType :
break;
case JVM_CONSTANT_Utf8 :
break;
case JVM_CONSTANT_UnresolvedClass : // fall-through
// unresolved_klass_at requires lock or safe world.
}
break;
default:
break;
}
}
// Restore cache
}
#endif
}
const char* constantPoolKlass::internal_name() const {
return "{constant pool}";
}
// Verification
if (!cp->partially_loaded()) {
}
"should be symbol or klass");
}
}
"should be symbol or instance");
}
if (!cp->has_pseudo_string()) {
} else {
// can be non-perm, can be non-instance (array)
}
}
base++;
}
// Note: cache() can be NULL before a class is completely setup or
// in temporary constant pools used during constant pool merging
}
// Note: pool_holder() can be NULL in temporary constant pools
// used during constant pool merging
}
}
}
return cp->tags() == NULL || cp->pool_holder() == (klassOop) cp; // Check whether pool holder points to self
}
}
#ifndef PRODUCT
// CompileTheWorld support. Preload all classes loaded references in the passed in constantpool
// This will force loading of the class
if (klass->is_instance()) {
// Force initialization of class
}
}
}
}
#endif