| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/compiler.h" | 5 #include "vm/compiler.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 | 8 |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
| (...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 Isolate::Current()->set_background_compiler(NULL); | 1771 Isolate::Current()->set_background_compiler(NULL); |
| 1772 } | 1772 } |
| 1773 | 1773 |
| 1774 | 1774 |
| 1775 void BackgroundCompiler::EnsureInit(Thread* thread) { | 1775 void BackgroundCompiler::EnsureInit(Thread* thread) { |
| 1776 ASSERT(thread->IsMutatorThread()); | 1776 ASSERT(thread->IsMutatorThread()); |
| 1777 // Finalize NoSuchMethodError, _Mint; occasionally needed in optimized | 1777 // Finalize NoSuchMethodError, _Mint; occasionally needed in optimized |
| 1778 // compilation. | 1778 // compilation. |
| 1779 Class& cls = Class::Handle(thread->zone(), | 1779 Class& cls = Class::Handle(thread->zone(), |
| 1780 Library::LookupCoreClass(Symbols::NoSuchMethodError())); | 1780 Library::LookupCoreClass(Symbols::NoSuchMethodError())); |
| 1781 ASSERT(!cls.IsNull()); |
| 1781 Error& error = Error::Handle(thread->zone(), | 1782 Error& error = Error::Handle(thread->zone(), |
| 1782 cls.EnsureIsFinalized(thread)); | 1783 cls.EnsureIsFinalized(thread)); |
| 1783 ASSERT(error.IsNull()); | 1784 ASSERT(error.IsNull()); |
| 1784 cls = Library::LookupCoreClass(Symbols::_Mint()); | 1785 cls = Library::LookupCoreClass(Symbols::_Mint()); |
| 1786 ASSERT(!cls.IsNull()); |
| 1785 error = cls.EnsureIsFinalized(thread); | 1787 error = cls.EnsureIsFinalized(thread); |
| 1786 ASSERT(error.IsNull()); | 1788 ASSERT(error.IsNull()); |
| 1787 | 1789 |
| 1788 bool start_task = false; | 1790 bool start_task = false; |
| 1789 Isolate* isolate = thread->isolate(); | 1791 Isolate* isolate = thread->isolate(); |
| 1790 { | 1792 { |
| 1791 MutexLocker ml(isolate->mutex()); | 1793 MutexLocker ml(isolate->mutex()); |
| 1792 if (isolate->background_compiler() == NULL) { | 1794 if (isolate->background_compiler() == NULL) { |
| 1793 BackgroundCompiler* task = new BackgroundCompiler(isolate); | 1795 BackgroundCompiler* task = new BackgroundCompiler(isolate); |
| 1794 isolate->set_background_compiler(task); | 1796 isolate->set_background_compiler(task); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1912 } | 1914 } |
| 1913 | 1915 |
| 1914 | 1916 |
| 1915 void BackgroundCompiler::EnsureInit(Thread* thread) { | 1917 void BackgroundCompiler::EnsureInit(Thread* thread) { |
| 1916 UNREACHABLE(); | 1918 UNREACHABLE(); |
| 1917 } | 1919 } |
| 1918 | 1920 |
| 1919 #endif // DART_PRECOMPILED_RUNTIME | 1921 #endif // DART_PRECOMPILED_RUNTIME |
| 1920 | 1922 |
| 1921 } // namespace dart | 1923 } // namespace dart |
| OLD | NEW |