Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: runtime/vm/compiler.cc

Issue 1852393004: Fix background compilation issues when creating snapshots. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: more Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698