constMethodOop.hpp revision 3879
3790N/A * Copyright (c) 2003, 2012, 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// An constMethodOop represents portions of a Java method which 0N/A// Memory layout (each line represents a word). Note that most 0N/A// applications load thousands of methods, so keeping the size of this 0N/A// structure small has a big impact on footprint. 0N/A// |------------------------------------------------------| 0N/A// |------------------------------------------------------| 0N/A// | stackmap_data (oop) | 0N/A// | constMethod_size | 0N/A// | interp_kind | flags | code_size | 0N/A// | name index | signature index | 0N/A// | method_idnum | generic_signature_index | 0N/A// |------------------------------------------------------| 0N/A// |------------------------------------------------------| 0N/A// | compressed linenumber table | 0N/A// | (see class CompressedLineNumberReadStream) | 0N/A// | (note that length is unknown until decompressed) | 0N/A// | (access flags bit tells whether table is present) | 0N/A// | (indexed from start of constMethodOop) | 0N/A// | (elements not necessarily sorted!) | 0N/A// |------------------------------------------------------| 0N/A// | localvariable table elements + length (length last) | 0N/A// | (length is u2, elements are 6-tuples of u2) | 0N/A// | (see class LocalVariableTableElement) | 0N/A// | (access flags bit tells whether table is present) | 3879N/A// | (indexed from end of constMethodOop) | 3879N/A// |------------------------------------------------------| 3879N/A// | exception table + length (length last) | 3879N/A// | (length is u2, elements are 4-tuples of u2) | 3879N/A// | (see class ExceptionTableElement) | 3879N/A// | (access flags bit tells whether table is present) | 3879N/A// | (indexed from end of constMethodOop) | 0N/A// |------------------------------------------------------| 0N/A// | checked exceptions elements + length (length last) | 0N/A// | (length is u2, elements are u2) | 0N/A// | (see class CheckedExceptionElement) | 0N/A// | (access flags bit tells whether table is present) | 0N/A// | (indexed from end of constMethodOop) | 0N/A// |------------------------------------------------------| 0N/A// Utitily class decribing elements in checked exceptions table inlined in methodOop. 0N/A// Utitily class decribing elements in local variable table inlined in methodOop. 3879N/A// Utitily class describing elements in exception table 0N/A // Bit vector of signature 0N/A // Callers interpret 0=not initialized yet and 0N/A // -1=too many args to fix, must parse the slow way. 0N/A // The real initial value is special to account for nonatomicity of 64 bit 0N/A // loads and stores. This value may updated and read without a lock by 0N/A // multiple threads, so is volatile. 0N/A // The oop block. See comment in klass.hpp before making changes. 0N/A // Raw stackmap data for the method 0N/A // End of the oop block. 0N/A // Size of Java bytecodes allocated immediately after methodOop. 0N/A // initially corresponds to the index into the methods array. 0N/A // but this may change with redefinition 0N/A // stackmap table data 0N/A // Since reads aren't atomic for 64 bits, if any of the high or low order 0N/A // word is the initial value, return 0. See init_fingerprint for initval. 0N/A "fingerprint cannot change");
0N/A "fingerprint should call init to set initial value");
0N/A // Object size needed 0N/A // Is object parsable by gc 0N/A "u2 is too small to hold method code size in general");
0N/A // linenumber table - note that length is unknown until decompression, 0N/A // see class CompressedLineNumberReadStream. 0N/A // checked exceptions 0N/A // localvariable table 0N/A // Offset to bytecodes 0N/A // interpreter support 0N/A // Garbage collection support 0N/A // Unique id for the method 0N/A // Since the size of the compressed line number table is unknown, the 0N/A // offsets of the other variable sized sections are computed backwards 0N/A // from the end of the constMethodOop. 0N/A // First byte after constMethodOop 0N/A // Last short in constMethodOop 1879N/A#
endif // SHARE_VM_OOPS_CONSTMETHODOOP_HPP