constantPoolKlass.cpp revision 1879
1833N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A // only set to non-zero if constant pool is merged by RedefineClasses 518N/A // if constant pool may change during RedefineClasses, it is created 518N/A // unsafe for GC concurrent processing. 0N/A // all fields are initialized; needed for GC 0N/A // initialize tag array 0N/A // Note: cannot introduce constant pool handle before since it is not 0N/A // completely initialized (no class) -> would cause assertion failure 113N/A // Make sure size calculation is right 0N/A // Performance tweak: We skip iterating over the klass pointer since we 0N/A // know that Universe::constantPoolKlassObj never moves. 0N/A // If the tags array is null we are in the middle of allocating this constant pool 0N/A // gc of constant pool contents 0N/A // gc of constant pool instance variables 0N/A // Performance tweak: We skip iterating over the klass pointer since we 0N/A // know that Universe::constantPoolKlassObj never moves. 0N/A // If the tags array is null we are in the middle of allocating this constant 0N/A // gc of constant pool contents 0N/A // gc of constant pool instance variables 0N/A // Get size before changing pointers. 0N/A // Don't call size() or oop_size() since that is a virtual call. 0N/A // Performance tweak: We skip iterating over the klass pointer since we 0N/A // know that Universe::constantPoolKlassObj never moves. 0N/A // If the tags array is null we are in the middle of allocating this constant 0N/A // Performance tweak: We skip iterating over the klass pointer since we 0N/A // know that Universe::constantPoolKlassObj never moves. 0N/A // Get size before changing pointers. 0N/A // Don't call size() or oop_size() since that is a virtual call. 0N/A // If the tags array is null we are in the middle of allocating this constant 0N/A // Performance tweak: We skip iterating over the klass pointer since we 0N/A // know that Universe::constantPoolKlassObj never moves. 0N/A // Get size before changing pointers. 0N/A // Don't call size() or oop_size() since that is a virtual call. 0N/A // If the tags array is null we are in the middle of allocating this constant 0N/A // If the tags array is null we are in the middle of allocating this constant 0N/A // If the tags array is null we are in the middle of allocating this constant 0N/A index++;
// Skip entry following eigth-byte constant 0N/A index++;
// Skip entry following eigth-byte constant 0N/A // unresolved_klass_at requires lock or safe world. 0N/A return "{constant pool}";
0N/A "should be symbol or klass");
0N/A "should be symbol or instance");
431N/A // can be non-perm, can be non-instance (array) 1522N/A // FIXME: verify JSR 292 tags JVM_CONSTANT_MethodHandle, etc. 0N/A // Note: cache() can be NULL before a class is completely setup or 0N/A // in temporary constant pools used during constant pool merging 0N/A // Note: pool_holder() can be NULL in temporary constant pools 0N/A // used during constant pool merging 0N/A// CompileTheWorld support. Preload all classes loaded references in the passed in constantpool 0N/A // This will force loading of the class 0N/A // Force initialization of class