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/classFileStream.hpp"
28 #include "classfile/classLoader.hpp"
29 #include "classfile/classLoaderExt.hpp"
30 #include "classfile/classLoaderData.inline.hpp"
31 #include "classfile/imageFile.hpp"
32 #include "classfile/javaClasses.hpp"
33 #include "classfile/systemDictionary.hpp"
34 #include "classfile/vmSymbols.hpp"
35 #include "compiler/compileBroker.hpp"
36 #include "gc_interface/collectedHeap.inline.hpp"
37 #include "interpreter/bytecodeStream.hpp"
38 #include "interpreter/oopMapCache.hpp"
39 #include "memory/allocation.inline.hpp"
40 #include "memory/filemap.hpp"
41 #include "memory/generation.hpp"
42 #include "memory/oopFactory.hpp"
43 #include "memory/universe.inline.hpp"
44 #include "oops/instanceKlass.hpp"
45 #include "oops/instanceRefKlass.hpp"
46 #include "oops/oop.inline.hpp"
47 #include "oops/symbol.hpp"
48 #include "prims/jvm_misc.hpp"
49 #include "runtime/arguments.hpp"
50 #include "runtime/compilationPolicy.hpp"
51 #include "runtime/fprofiler.hpp"
52 #include "runtime/handles.hpp"
53 #include "runtime/handles.inline.hpp"
54 #include "runtime/init.hpp"
55 #include "runtime/interfaceSupport.hpp"
56 #include "runtime/java.hpp"
57 #include "runtime/javaCalls.hpp"
58 #include "runtime/os.hpp"
59 #include "runtime/threadCritical.hpp"
60 #include "runtime/timer.hpp"
61 #include "services/management.hpp"
62 #include "services/threadService.hpp"
63 #include "utilities/events.hpp"
64 #include "utilities/hashtable.inline.hpp"
65 #include "utilities/macros.hpp"
66 #if INCLUDE_CDS
67 #include "classfile/sharedPathsMiscInfo.hpp"
68 #include "classfile/sharedClassUtil.hpp"
69 #endif
70
71
72 // Entry points in zip.dll for loading zip/jar file entries and image file entries
73
74 typedef void * * (JNICALL *ZipOpen_t)(const char *name, char **pmsg);
75 typedef void (JNICALL *ZipClose_t)(jzfile *zip);
76 typedef jzentry* (JNICALL *FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen);
77 typedef jboolean (JNICALL *ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
78 typedef jboolean (JNICALL *ReadMappedEntry_t)(jzfile *zip, jzentry *entry, unsigned char **buf, char *namebuf);
79 typedef jzentry* (JNICALL *GetNextEntry_t)(jzfile *zip, jint n);
80 typedef jboolean (JNICALL *ZipInflateFully_t)(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg);
81 typedef jint (JNICALL *Crc32_t)(jint crc, const jbyte *buf, jint len);
82
83 static ZipOpen_t ZipOpen = NULL;
84 static ZipClose_t ZipClose = NULL;
85 static FindEntry_t FindEntry = NULL;
86 static ReadEntry_t ReadEntry = NULL;
87 static ReadMappedEntry_t ReadMappedEntry = NULL;
88 static GetNextEntry_t GetNextEntry = NULL;
|
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/classFileStream.hpp"
28 #include "classfile/classLoader.hpp"
29 #include "classfile/classLoaderData.inline.hpp"
30 #include "classfile/classLoaderExt.hpp"
31 #include "classfile/imageFile.hpp"
32 #include "classfile/javaClasses.hpp"
33 #include "classfile/systemDictionary.hpp"
34 #include "classfile/vmSymbols.hpp"
35 #include "compiler/compileBroker.hpp"
36 #include "gc/shared/collectedHeap.inline.hpp"
37 #include "gc/shared/generation.hpp"
38 #include "interpreter/bytecodeStream.hpp"
39 #include "interpreter/oopMapCache.hpp"
40 #include "memory/allocation.inline.hpp"
41 #include "memory/filemap.hpp"
42 #include "memory/oopFactory.hpp"
43 #include "memory/universe.inline.hpp"
44 #include "oops/instanceKlass.hpp"
45 #include "oops/instanceRefKlass.hpp"
46 #include "oops/oop.inline.hpp"
47 #include "oops/symbol.hpp"
48 #include "prims/jvm_misc.hpp"
49 #include "runtime/arguments.hpp"
50 #include "runtime/compilationPolicy.hpp"
51 #include "runtime/fprofiler.hpp"
52 #include "runtime/handles.hpp"
53 #include "runtime/handles.inline.hpp"
54 #include "runtime/init.hpp"
55 #include "runtime/interfaceSupport.hpp"
56 #include "runtime/java.hpp"
57 #include "runtime/javaCalls.hpp"
58 #include "runtime/os.hpp"
59 #include "runtime/threadCritical.hpp"
60 #include "runtime/timer.hpp"
61 #include "services/management.hpp"
62 #include "services/threadService.hpp"
63 #include "utilities/events.hpp"
64 #include "utilities/hashtable.inline.hpp"
65 #include "utilities/macros.hpp"
66 #if INCLUDE_CDS
67 #include "classfile/sharedClassUtil.hpp"
68 #include "classfile/sharedPathsMiscInfo.hpp"
69 #endif
70
71
72 // Entry points in zip.dll for loading zip/jar file entries and image file entries
73
74 typedef void * * (JNICALL *ZipOpen_t)(const char *name, char **pmsg);
75 typedef void (JNICALL *ZipClose_t)(jzfile *zip);
76 typedef jzentry* (JNICALL *FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen);
77 typedef jboolean (JNICALL *ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
78 typedef jboolean (JNICALL *ReadMappedEntry_t)(jzfile *zip, jzentry *entry, unsigned char **buf, char *namebuf);
79 typedef jzentry* (JNICALL *GetNextEntry_t)(jzfile *zip, jint n);
80 typedef jboolean (JNICALL *ZipInflateFully_t)(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg);
81 typedef jint (JNICALL *Crc32_t)(jint crc, const jbyte *buf, jint len);
82
83 static ZipOpen_t ZipOpen = NULL;
84 static ZipClose_t ZipClose = NULL;
85 static FindEntry_t FindEntry = NULL;
86 static ReadEntry_t ReadEntry = NULL;
87 static ReadMappedEntry_t ReadMappedEntry = NULL;
88 static GetNextEntry_t GetNextEntry = NULL;
|