Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalRuntime.cpp @ 18628:4ca70b51c8bb
improved comments
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 04 Dec 2014 23:09:08 +0100 |
parents | 0aec14bcf006 |
children | b4071daf1892 |
comparison
equal
deleted
inserted
replaced
18627:196cf131ed32 | 18628:4ca70b51c8bb |
---|---|
758 JVM_END | 758 JVM_END |
759 | 759 |
760 | 760 |
761 void GraalRuntime::ensure_graal_class_loader_is_initialized() { | 761 void GraalRuntime::ensure_graal_class_loader_is_initialized() { |
762 // This initialization code is guarded by a static pointer to the Factory class. | 762 // This initialization code is guarded by a static pointer to the Factory class. |
763 // Once it is non-null, the Graal class loader and well know Graal classes are | 763 // Once it is non-null, the Graal class loader and well known Graal classes are |
764 // guaranteed to have been initialized. By going through the static | 764 // guaranteed to have been initialized. By going through the static |
765 // initializer of Factory, we can rely on class initialization semantics to | 765 // initializer of Factory, we can rely on class initialization semantics to |
766 // synchronize threads racing to do the initialization. | 766 // synchronize threads racing to do the initialization. |
767 static Klass* _FactoryKlass = NULL; | 767 static Klass* _FactoryKlass = NULL; |
768 if (_FactoryKlass == NULL) { | 768 if (_FactoryKlass == NULL) { |
780 os::sleep(THREAD, 100, false); | 780 os::sleep(THREAD, 100, false); |
781 vm_abort(false); | 781 vm_abort(false); |
782 } | 782 } |
783 } | 783 } |
784 | 784 |
785 // We cannot use graalJavaAccess for this because we are currently in the | |
786 // process of initializing that mechanism. | |
785 TempNewSymbol field_name = SymbolTable::new_symbol("useGraalClassLoader", CHECK_ABORT); | 787 TempNewSymbol field_name = SymbolTable::new_symbol("useGraalClassLoader", CHECK_ABORT); |
786 fieldDescriptor field_desc; | 788 fieldDescriptor field_desc; |
787 if (klass->find_field(field_name, vmSymbols::bool_signature(), &field_desc) == NULL) { | 789 if (klass->find_field(field_name, vmSymbols::bool_signature(), &field_desc) == NULL) { |
788 ResourceMark rm; | 790 ResourceMark rm; |
789 fatal(err_msg("Invalid layout of %s at %s", field_name->as_C_string(), klass->external_name())); | 791 fatal(err_msg("Invalid layout of %s at %s", field_name->as_C_string(), klass->external_name())); |