Mercurial > hg > graal-jvmci-8
comparison src/share/vm/classfile/systemDictionary.cpp @ 21559:be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 28 May 2015 15:36:48 +0200 |
parents | 6ee9b878902b |
children | c28cb37b2e1d |
comparison
equal
deleted
inserted
replaced
21558:d563baeca9df | 21559:be896a1983c0 |
---|---|
62 #include "runtime/signature.hpp" | 62 #include "runtime/signature.hpp" |
63 #include "services/classLoadingService.hpp" | 63 #include "services/classLoadingService.hpp" |
64 #include "services/threadService.hpp" | 64 #include "services/threadService.hpp" |
65 #include "utilities/macros.hpp" | 65 #include "utilities/macros.hpp" |
66 #include "utilities/ticks.hpp" | 66 #include "utilities/ticks.hpp" |
67 #ifdef GRAAL | 67 #ifdef JVMCI |
68 #include "graal/graalRuntime.hpp" | 68 #include "jvmci/jvmciRuntime.hpp" |
69 #endif | 69 #endif |
70 #if INCLUDE_TRACE | 70 #if INCLUDE_TRACE |
71 #include "trace/tracing.hpp" | 71 #include "trace/tracing.hpp" |
72 #endif | 72 #endif |
73 | 73 |
94 oop SystemDictionary::_java_system_loader = NULL; | 94 oop SystemDictionary::_java_system_loader = NULL; |
95 | 95 |
96 bool SystemDictionary::_has_loadClassInternal = false; | 96 bool SystemDictionary::_has_loadClassInternal = false; |
97 bool SystemDictionary::_has_checkPackageAccess = false; | 97 bool SystemDictionary::_has_checkPackageAccess = false; |
98 | 98 |
99 #ifdef GRAAL | 99 #ifdef JVMCI |
100 oop SystemDictionary::_graal_loader = NULL; | 100 oop SystemDictionary::_jvmci_loader = NULL; |
101 | 101 |
102 oop SystemDictionary::graal_loader() { | 102 oop SystemDictionary::jvmci_loader() { |
103 return _graal_loader; | 103 return _jvmci_loader; |
104 } | 104 } |
105 void SystemDictionary::init_graal_loader(oop loader) { | 105 void SystemDictionary::init_jvmci_loader(oop loader) { |
106 assert(UseGraalClassLoader == (loader != NULL), "must be"); | 106 assert(UseJVMCIClassLoader == (loader != NULL), "must be"); |
107 _graal_loader = loader; | 107 _jvmci_loader = loader; |
108 } | 108 } |
109 #endif | 109 #endif |
110 | 110 |
111 // lazily initialized klass variables | 111 // lazily initialized klass variables |
112 Klass* volatile SystemDictionary::_abstract_ownable_synchronizer_klass = NULL; | 112 Klass* volatile SystemDictionary::_abstract_ownable_synchronizer_klass = NULL; |
1726 | 1726 |
1727 void SystemDictionary::roots_oops_do(OopClosure* strong, OopClosure* weak) { | 1727 void SystemDictionary::roots_oops_do(OopClosure* strong, OopClosure* weak) { |
1728 strong->do_oop(&_java_system_loader); | 1728 strong->do_oop(&_java_system_loader); |
1729 strong->do_oop(&_system_loader_lock_obj); | 1729 strong->do_oop(&_system_loader_lock_obj); |
1730 CDS_ONLY(SystemDictionaryShared::roots_oops_do(strong);) | 1730 CDS_ONLY(SystemDictionaryShared::roots_oops_do(strong);) |
1731 GRAAL_ONLY(strong->do_oop(&_graal_loader);) | 1731 JVMCI_ONLY(strong->do_oop(&_jvmci_loader);) |
1732 | 1732 |
1733 // Adjust dictionary | 1733 // Adjust dictionary |
1734 dictionary()->roots_oops_do(strong, weak); | 1734 dictionary()->roots_oops_do(strong, weak); |
1735 | 1735 |
1736 // Visit extra methods | 1736 // Visit extra methods |
1739 | 1739 |
1740 void SystemDictionary::oops_do(OopClosure* f) { | 1740 void SystemDictionary::oops_do(OopClosure* f) { |
1741 f->do_oop(&_java_system_loader); | 1741 f->do_oop(&_java_system_loader); |
1742 f->do_oop(&_system_loader_lock_obj); | 1742 f->do_oop(&_system_loader_lock_obj); |
1743 CDS_ONLY(SystemDictionaryShared::oops_do(f);) | 1743 CDS_ONLY(SystemDictionaryShared::oops_do(f);) |
1744 GRAAL_ONLY(f->do_oop(&_graal_loader);) | 1744 JVMCI_ONLY(f->do_oop(&_jvmci_loader);) |
1745 | 1745 |
1746 // Adjust dictionary | 1746 // Adjust dictionary |
1747 dictionary()->oops_do(f); | 1747 dictionary()->oops_do(f); |
1748 | 1748 |
1749 // Visit extra methods | 1749 // Visit extra methods |
1863 int sid = (info >> CEIL_LG_OPTION_LIMIT); | 1863 int sid = (info >> CEIL_LG_OPTION_LIMIT); |
1864 Symbol* symbol = vmSymbols::symbol_at((vmSymbols::SID)sid); | 1864 Symbol* symbol = vmSymbols::symbol_at((vmSymbols::SID)sid); |
1865 Klass** klassp = &_well_known_klasses[id]; | 1865 Klass** klassp = &_well_known_klasses[id]; |
1866 bool must_load = (init_opt < SystemDictionary::Opt); | 1866 bool must_load = (init_opt < SystemDictionary::Opt); |
1867 if ((*klassp) == NULL) { | 1867 if ((*klassp) == NULL) { |
1868 #ifdef GRAAL | 1868 #ifdef JVMCI |
1869 bool is_graal = init_opt == SystemDictionary::Graal; | 1869 bool is_jvmci = init_opt == SystemDictionary::Jvmci; |
1870 assert(is_graal == (id >= (int)FIRST_GRAAL_WKID && id <= (int)LAST_GRAAL_WKID), | 1870 assert(is_jvmci == (id >= (int)FIRST_JVMCI_WKID && id <= (int)LAST_JVMCI_WKID), |
1871 "Graal WKIDs must be contiguous and separate from non-Graal WKIDs"); | 1871 "JVMCI WKIDs must be contiguous and separate from non-JVMCI WKIDs"); |
1872 if (is_graal) { | 1872 if (is_jvmci) { |
1873 (*klassp) = resolve_or_fail(symbol, _graal_loader, Handle(), true, CHECK_0); // load required Graal class | 1873 (*klassp) = resolve_or_fail(symbol, _jvmci_loader, Handle(), true, CHECK_0); // load required JVMCI class |
1874 } else | 1874 } else |
1875 #endif | 1875 #endif |
1876 if (must_load) { | 1876 if (must_load) { |
1877 (*klassp) = resolve_or_fail(symbol, true, CHECK_0); // load required class | 1877 (*klassp) = resolve_or_fail(symbol, true, CHECK_0); // load required class |
1878 } else { | 1878 } else { |
1948 } else { | 1948 } else { |
1949 // Skip the JSR 292 classes, if not enabled. | 1949 // Skip the JSR 292 classes, if not enabled. |
1950 scan = WKID(jsr292_group_end + 1); | 1950 scan = WKID(jsr292_group_end + 1); |
1951 } | 1951 } |
1952 | 1952 |
1953 initialize_wk_klasses_until(NOT_GRAAL(WKID_LIMIT) GRAAL_ONLY(FIRST_GRAAL_WKID), scan, CHECK); | 1953 initialize_wk_klasses_until(NOT_JVMCI(WKID_LIMIT) JVMCI_ONLY(FIRST_JVMCI_WKID), scan, CHECK); |
1954 | 1954 |
1955 _box_klasses[T_BOOLEAN] = WK_KLASS(Boolean_klass); | 1955 _box_klasses[T_BOOLEAN] = WK_KLASS(Boolean_klass); |
1956 _box_klasses[T_CHAR] = WK_KLASS(Character_klass); | 1956 _box_klasses[T_CHAR] = WK_KLASS(Character_klass); |
1957 _box_klasses[T_FLOAT] = WK_KLASS(Float_klass); | 1957 _box_klasses[T_FLOAT] = WK_KLASS(Float_klass); |
1958 _box_klasses[T_DOUBLE] = WK_KLASS(Double_klass); | 1958 _box_klasses[T_DOUBLE] = WK_KLASS(Double_klass); |