Mercurial > hg > graal-compiler
comparison src/share/vm/classfile/systemDictionary.cpp @ 18614:c307546c7b0a
made initialization of the Graal class loader and well known Graal classes lazy
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 04 Dec 2014 13:42:56 +0100 |
parents | 43e2cc9a4fde |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
18613:8c3a85077f84 | 18614:c307546c7b0a |
---|---|
93 #ifdef GRAAL | 93 #ifdef GRAAL |
94 oop SystemDictionary::_graal_loader = NULL; | 94 oop SystemDictionary::_graal_loader = NULL; |
95 | 95 |
96 oop SystemDictionary::graal_loader() { | 96 oop SystemDictionary::graal_loader() { |
97 return _graal_loader; | 97 return _graal_loader; |
98 } | |
99 void SystemDictionary::init_graal_loader(oop loader) { | |
100 assert(UseGraalClassLoader == (loader != NULL), "must be"); | |
101 _graal_loader = loader; | |
98 } | 102 } |
99 #endif | 103 #endif |
100 | 104 |
101 // lazily initialized klass variables | 105 // lazily initialized klass variables |
102 Klass* volatile SystemDictionary::_abstract_ownable_synchronizer_klass = NULL; | 106 Klass* volatile SystemDictionary::_abstract_ownable_synchronizer_klass = NULL; |
1929 Method* method = InstanceKlass::cast(ClassLoader_klass())->find_method(vmSymbols::checkPackageAccess_name(), vmSymbols::class_protectiondomain_signature()); | 1933 Method* method = InstanceKlass::cast(ClassLoader_klass())->find_method(vmSymbols::checkPackageAccess_name(), vmSymbols::class_protectiondomain_signature()); |
1930 _has_checkPackageAccess = (method != NULL); | 1934 _has_checkPackageAccess = (method != NULL); |
1931 } | 1935 } |
1932 } | 1936 } |
1933 | 1937 |
1934 #ifdef GRAAL | |
1935 void SystemDictionary::initialize_preloaded_graal_classes(TRAPS) { | |
1936 assert(WK_KLASS(Node_klass) == NULL, "preloaded Graal classes should only be initialized once"); | |
1937 if (UseGraalClassLoader) { | |
1938 _graal_loader = GraalRuntime::compute_graal_class_loader(CHECK); | |
1939 } | |
1940 | |
1941 WKID scan = FIRST_GRAAL_WKID; | |
1942 initialize_wk_klasses_through(LAST_GRAAL_WKID, scan, CHECK); | |
1943 } | |
1944 #endif | |
1945 | |
1946 // Tells if a given klass is a box (wrapper class, such as java.lang.Integer). | 1938 // Tells if a given klass is a box (wrapper class, such as java.lang.Integer). |
1947 // If so, returns the basic type it holds. If not, returns T_OBJECT. | 1939 // If so, returns the basic type it holds. If not, returns T_OBJECT. |
1948 BasicType SystemDictionary::box_klass_type(Klass* k) { | 1940 BasicType SystemDictionary::box_klass_type(Klass* k) { |
1949 assert(k != NULL, ""); | 1941 assert(k != NULL, ""); |
1950 for (int i = T_BOOLEAN; i < T_VOID+1; i++) { | 1942 for (int i = T_BOOLEAN; i < T_VOID+1; i++) { |