| 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 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1867 Compiler::CompileOptimizedFunction(thread, | 1867 Compiler::CompileOptimizedFunction(thread, |
| 1868 function, | 1868 function, |
| 1869 Compiler::kNoOSRDeoptId)); | 1869 Compiler::kNoOSRDeoptId)); |
| 1870 // TODO(srdjan): We do not expect errors while compiling optimized | 1870 // TODO(srdjan): We do not expect errors while compiling optimized |
| 1871 // code, any errors should have been caught when compiling | 1871 // code, any errors should have been caught when compiling |
| 1872 // unoptimized code. Any issues while optimizing are flagged by | 1872 // unoptimized code. Any issues while optimizing are flagged by |
| 1873 // making the result invalid. | 1873 // making the result invalid. |
| 1874 ASSERT(error.IsNull()); | 1874 ASSERT(error.IsNull()); |
| 1875 #ifndef PRODUCT | 1875 #ifndef PRODUCT |
| 1876 Isolate* isolate = thread->isolate(); | 1876 Isolate* isolate = thread->isolate(); |
| 1877 // We cannot aggregate stats if isolate is shutting down. | 1877 isolate->aggregate_compiler_stats()->Add(*thread->compiler_stats()); |
| 1878 if (isolate->HasMutatorThread()) { | |
| 1879 isolate->aggregate_compiler_stats()->Add(*thread->compiler_stats()); | |
| 1880 } | |
| 1881 thread->compiler_stats()->Clear(); | 1878 thread->compiler_stats()->Clear(); |
| 1882 #endif // PRODUCT | 1879 #endif // PRODUCT |
| 1883 | 1880 |
| 1884 QueueElement* qelem = NULL; | 1881 QueueElement* qelem = NULL; |
| 1885 { MonitorLocker ml(queue_monitor_); | 1882 { MonitorLocker ml(queue_monitor_); |
| 1886 if (function_queue()->IsEmpty()) { | 1883 if (function_queue()->IsEmpty()) { |
| 1887 // We are shutting down, queue was cleared. | 1884 // We are shutting down, queue was cleared. |
| 1888 function = Function::null(); | 1885 function = Function::null(); |
| 1889 } else { | 1886 } else { |
| 1890 qelem = function_queue()->Remove(); | 1887 qelem = function_queue()->Remove(); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2182 | 2179 |
| 2183 | 2180 |
| 2184 bool BackgroundCompiler::IsDisabled() { | 2181 bool BackgroundCompiler::IsDisabled() { |
| 2185 UNREACHABLE(); | 2182 UNREACHABLE(); |
| 2186 return true; | 2183 return true; |
| 2187 } | 2184 } |
| 2188 | 2185 |
| 2189 #endif // DART_PRECOMPILED_RUNTIME | 2186 #endif // DART_PRECOMPILED_RUNTIME |
| 2190 | 2187 |
| 2191 } // namespace dart | 2188 } // namespace dart |
| OLD | NEW |