| 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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 ZoneGrowableArray<const ICData*>* ic_data_array = | 599 ZoneGrowableArray<const ICData*>* ic_data_array = |
| 600 new(zone) ZoneGrowableArray<const ICData*>(); | 600 new(zone) ZoneGrowableArray<const ICData*>(); |
| 601 if (optimized()) { | 601 if (optimized()) { |
| 602 // Extract type feedback before the graph is built, as the graph | 602 // Extract type feedback before the graph is built, as the graph |
| 603 // builder uses it to attach it to nodes. | 603 // builder uses it to attach it to nodes. |
| 604 ASSERT(function.deoptimization_counter() < | 604 ASSERT(function.deoptimization_counter() < |
| 605 FLAG_max_deoptimization_counter_threshold); | 605 FLAG_max_deoptimization_counter_threshold); |
| 606 | 606 |
| 607 // 'Freeze' ICData in background compilation so that it does not | 607 // 'Freeze' ICData in background compilation so that it does not |
| 608 // change while compiling. | 608 // change while compiling. |
| 609 const bool clone_descriptors = Compiler::IsBackgroundCompilation(); | 609 const bool clone_ic_data = Compiler::IsBackgroundCompilation(); |
| 610 function.RestoreICDataMap(ic_data_array, clone_descriptors); | 610 function.RestoreICDataMap(ic_data_array, clone_ic_data); |
| 611 | 611 |
| 612 if (Compiler::IsBackgroundCompilation() && | 612 if (Compiler::IsBackgroundCompilation() && |
| 613 (function.ic_data_array() == Array::null())) { | 613 (function.ic_data_array() == Array::null())) { |
| 614 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId); | 614 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId); |
| 615 } | 615 } |
| 616 if (FLAG_print_ic_data_map) { | 616 if (FLAG_print_ic_data_map) { |
| 617 for (intptr_t i = 0; i < ic_data_array->length(); i++) { | 617 for (intptr_t i = 0; i < ic_data_array->length(); i++) { |
| 618 if ((*ic_data_array)[i] != NULL) { | 618 if ((*ic_data_array)[i] != NULL) { |
| 619 THR_Print("%" Pd " ", i); | 619 THR_Print("%" Pd " ", i); |
| 620 FlowGraphPrinter::PrintICData(*(*ic_data_array)[i]); | 620 FlowGraphPrinter::PrintICData(*(*ic_data_array)[i]); |
| (...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1884 } | 1884 } |
| 1885 | 1885 |
| 1886 | 1886 |
| 1887 void BackgroundCompiler::EnsureInit(Thread* thread) { | 1887 void BackgroundCompiler::EnsureInit(Thread* thread) { |
| 1888 UNREACHABLE(); | 1888 UNREACHABLE(); |
| 1889 } | 1889 } |
| 1890 | 1890 |
| 1891 #endif // DART_PRECOMPILED_RUNTIME | 1891 #endif // DART_PRECOMPILED_RUNTIME |
| 1892 | 1892 |
| 1893 } // namespace dart | 1893 } // namespace dart |
| OLD | NEW |