1 /* 2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "incls/_precompiled.incl" 26 #include "incls/_classFileParser.cpp.incl" 27 28 // We generally try to create the oops directly when parsing, rather than 29 // allocating temporary data structures and copying the bytes twice. A 30 // temporary area is only needed when parsing utf8 entries in the constant 31 // pool and when parsing line number tables. 32 33 // We add assert in debug mode when class format is not checked. 34 35 #define JAVA_CLASSFILE_MAGIC 0xCAFEBABE 36 #define JAVA_MIN_SUPPORTED_VERSION 45 37 #define JAVA_MAX_SUPPORTED_VERSION 51 38 #define JAVA_MAX_SUPPORTED_MINOR_VERSION 0 39 40 // Used for two backward compatibility reasons: 41 // - to check for new additions to the class file format in JDK1.5 42 // - to check for bug fixes in the format checker in JDK1.5 43 #define JAVA_1_5_VERSION 49 44 45 // Used for backward compatibility reasons: 46 // - to check for javac bug fixes that happened after 1.5 | 1 /* 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "classfile/classFileParser.hpp" 27 #include "classfile/classLoader.hpp" 28 #include "classfile/javaClasses.hpp" 29 #include "classfile/symbolTable.hpp" 30 #include "classfile/systemDictionary.hpp" 31 #include "classfile/verificationType.hpp" 32 #include "classfile/verifier.hpp" 33 #include "classfile/vmSymbols.hpp" 34 #include "memory/allocation.hpp" 35 #include "memory/gcLocker.hpp" 36 #include "memory/oopFactory.hpp" 37 #include "memory/universe.inline.hpp" 38 #include "oops/constantPoolOop.hpp" 39 #include "oops/instanceKlass.hpp" 40 #include "oops/klass.inline.hpp" 41 #include "oops/klassOop.hpp" 42 #include "oops/klassVtable.hpp" 43 #include "oops/methodOop.hpp" 44 #include "oops/symbolOop.hpp" 45 #include "prims/jvmtiExport.hpp" 46 #include "runtime/javaCalls.hpp" 47 #include "runtime/perfData.hpp" 48 #include "runtime/reflection.hpp" 49 #include "runtime/signature.hpp" 50 #include "runtime/timer.hpp" 51 #include "services/classLoadingService.hpp" 52 #include "services/threadService.hpp" 53 54 // We generally try to create the oops directly when parsing, rather than 55 // allocating temporary data structures and copying the bytes twice. A 56 // temporary area is only needed when parsing utf8 entries in the constant 57 // pool and when parsing line number tables. 58 59 // We add assert in debug mode when class format is not checked. 60 61 #define JAVA_CLASSFILE_MAGIC 0xCAFEBABE 62 #define JAVA_MIN_SUPPORTED_VERSION 45 63 #define JAVA_MAX_SUPPORTED_VERSION 51 64 #define JAVA_MAX_SUPPORTED_MINOR_VERSION 0 65 66 // Used for two backward compatibility reasons: 67 // - to check for new additions to the class file format in JDK1.5 68 // - to check for bug fixes in the format checker in JDK1.5 69 #define JAVA_1_5_VERSION 49 70 71 // Used for backward compatibility reasons: 72 // - to check for javac bug fixes that happened after 1.5 |