8049367: Modular Run-Time Images

Co-authored-by: Alan Bateman <alan.bateman@oracle.com>
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Bradford Wetmore <bradford.wetmore@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Paul Sandoz <paul.sandoz@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Reviewed-by: chegar, dfuchs, ihse, joehw, mullan, psandoz, wetmore
This commit is contained in:
Chris Hegarty 2014-12-03 14:21:14 +00:00
parent 785151164a
commit 393a39afe3
19 changed files with 944 additions and 146 deletions

View file

@ -66,7 +66,7 @@ class ClassPathEntry: public CHeapObj<mtClass> {
virtual ClassFileStream* open_stream(const char* name, TRAPS) = 0;
// Debugging
NOT_PRODUCT(virtual void compile_the_world(Handle loader, TRAPS) = 0;)
NOT_PRODUCT(virtual bool is_rt_jar() = 0;)
NOT_PRODUCT(virtual bool is_jrt() = 0;)
};
@ -80,7 +80,7 @@ class ClassPathDirEntry: public ClassPathEntry {
ClassFileStream* open_stream(const char* name, TRAPS);
// Debugging
NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
NOT_PRODUCT(bool is_rt_jar();)
NOT_PRODUCT(bool is_jrt();)
};
@ -112,7 +112,7 @@ class ClassPathZipEntry: public ClassPathEntry {
void contents_do(void f(const char* name, void* context), void* context);
// Debugging
NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
NOT_PRODUCT(bool is_rt_jar();)
NOT_PRODUCT(bool is_jrt();)
};
@ -138,7 +138,25 @@ class LazyClassPathEntry: public ClassPathEntry {
virtual bool is_lazy();
// Debugging
NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
NOT_PRODUCT(bool is_rt_jar();)
NOT_PRODUCT(bool is_jrt();)
};
// For java image files
class ImageFile;
class ClassPathImageEntry: public ClassPathEntry {
private:
ImageFile *_image;
public:
bool is_jar_file() { return false; }
bool is_open() { return _image != NULL; }
const char* name();
ClassPathImageEntry(char* name);
~ClassPathImageEntry();
ClassFileStream* open_stream(const char* name, TRAPS);
// Debugging
NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
NOT_PRODUCT(bool is_jrt();)
};
class PackageHashtable;
@ -226,6 +244,7 @@ class ClassLoader: AllStatic {
// to avoid confusing the zip library
static bool get_canonical_path(const char* orig, char* out, int len);
public:
static jboolean decompress(void *in, u8 inSize, void *out, u8 outSize, char **pmsg);
static int crc32(int crc, const char* buf, int len);
static bool update_class_path_entry_list(const char *path,
bool check_for_duplicates,