comparison 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
comparison
equal deleted inserted replaced
23407:a1d1f1e4817f 23408:f84a5ac3be22
1853 assert(id >= (int)FIRST_WKID && id < (int)WKID_LIMIT, "oob"); 1853 assert(id >= (int)FIRST_WKID && id < (int)WKID_LIMIT, "oob");
1854 int info = wk_init_info[id - FIRST_WKID]; 1854 int info = wk_init_info[id - FIRST_WKID];
1855 int sid = (info >> CEIL_LG_OPTION_LIMIT); 1855 int sid = (info >> CEIL_LG_OPTION_LIMIT);
1856 Symbol* symbol = vmSymbols::symbol_at((vmSymbols::SID)sid); 1856 Symbol* symbol = vmSymbols::symbol_at((vmSymbols::SID)sid);
1857 Klass** klassp = &_well_known_klasses[id]; 1857 Klass** klassp = &_well_known_klasses[id];
1858 bool must_load = (init_opt < SystemDictionary::Opt);
1859 if ((*klassp) == NULL) { 1858 if ((*klassp) == NULL) {
1860 #if INCLUDE_JVMCI 1859 #if INCLUDE_JVMCI
1861 bool is_jvmci = init_opt == SystemDictionary::Jvmci; 1860 if (EnableJVMCI && init_opt == SystemDictionary::Jvmci) {
1862 assert(is_jvmci == (id >= (int)FIRST_JVMCI_WKID && id <= (int)LAST_JVMCI_WKID), 1861 assert(id >= (int)FIRST_JVMCI_WKID && id <= (int)LAST_JVMCI_WKID,
1863 "JVMCI WKIDs must be contiguous and separate from non-JVMCI WKIDs"); 1862 "JVMCI WKIDs must be contiguous and separate from non-JVMCI WKIDs");
1864 if (is_jvmci) {
1865 (*klassp) = resolve_or_fail(symbol, _jvmci_loader, Handle(), true, CHECK_0); // load required JVMCI class 1863 (*klassp) = resolve_or_fail(symbol, _jvmci_loader, Handle(), true, CHECK_0); // load required JVMCI class
1866 } else 1864 return ((*klassp) != NULL);
1865 }
1867 #endif 1866 #endif
1868 if (must_load) { 1867 if (init_opt < SystemDictionary::Opt) {
1869 (*klassp) = resolve_or_fail(symbol, true, CHECK_0); // load required class 1868 (*klassp) = resolve_or_fail(symbol, true, CHECK_0); // load required class
1870 } else { 1869 } else {
1871 (*klassp) = resolve_or_null(symbol, CHECK_0); // load optional klass 1870 (*klassp) = resolve_or_null(symbol, CHECK_0); // load optional klass
1872 } 1871 }
1873 } 1872 }