Mercurial > hg > graal-jvmci-8
diff src/share/vm/classfile/systemDictionary.cpp @ 23408:f84a5ac3be22
make JVMCI JDK immutable and sharable among different JVMCI clients
minimize diff to jvmci-9, including adding support for EnableJVMCI (default is true in jvmci-8)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 30 May 2016 22:56:59 +0200 |
parents | dd9cc155639c |
children | f13e777eb255 |
line wrap: on
line diff
--- a/src/share/vm/classfile/systemDictionary.cpp Mon May 30 14:11:39 2016 +0200 +++ b/src/share/vm/classfile/systemDictionary.cpp Mon May 30 22:56:59 2016 +0200 @@ -1855,17 +1855,16 @@ int sid = (info >> CEIL_LG_OPTION_LIMIT); Symbol* symbol = vmSymbols::symbol_at((vmSymbols::SID)sid); Klass** klassp = &_well_known_klasses[id]; - bool must_load = (init_opt < SystemDictionary::Opt); if ((*klassp) == NULL) { #if INCLUDE_JVMCI - bool is_jvmci = init_opt == SystemDictionary::Jvmci; - assert(is_jvmci == (id >= (int)FIRST_JVMCI_WKID && id <= (int)LAST_JVMCI_WKID), - "JVMCI WKIDs must be contiguous and separate from non-JVMCI WKIDs"); - if (is_jvmci) { + if (EnableJVMCI && init_opt == SystemDictionary::Jvmci) { + assert(id >= (int)FIRST_JVMCI_WKID && id <= (int)LAST_JVMCI_WKID, + "JVMCI WKIDs must be contiguous and separate from non-JVMCI WKIDs"); (*klassp) = resolve_or_fail(symbol, _jvmci_loader, Handle(), true, CHECK_0); // load required JVMCI class - } else + return ((*klassp) != NULL); + } #endif - if (must_load) { + if (init_opt < SystemDictionary::Opt) { (*klassp) = resolve_or_fail(symbol, true, CHECK_0); // load required class } else { (*klassp) = resolve_or_null(symbol, CHECK_0); // load optional klass