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

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

Issue 1708013002: Minor fixes for background compilation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | runtime/vm/stub_code.cc » ('j') | runtime/vm/stub_code.cc » ('J')
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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 594
595 // TimerScope needs an isolate to be properly terminated in case of a 595 // TimerScope needs an isolate to be properly terminated in case of a
596 // LongJump. 596 // LongJump.
597 { 597 {
598 CSTAT_TIMER_SCOPE(thread(), graphbuilder_timer); 598 CSTAT_TIMER_SCOPE(thread(), graphbuilder_timer);
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
605 FLAG_max_deoptimization_counter_threshold); 605 // In background compilation the deoptimization counter may have
606 // already reached the limit.
607 ASSERT(Compiler::IsBackgroundCompilation() ||
608 function.deoptimization_counter() <
609 FLAG_max_deoptimization_counter_threshold);
siva 2016/02/17 23:12:48 maybe put parenthesis around (function.dep....() <
srdjan 2016/02/17 23:32:29 Done.
606 610
607 // 'Freeze' ICData in background compilation so that it does not 611 // 'Freeze' ICData in background compilation so that it does not
608 // change while compiling. 612 // change while compiling.
609 const bool clone_ic_data = Compiler::IsBackgroundCompilation(); 613 const bool clone_ic_data = Compiler::IsBackgroundCompilation();
610 function.RestoreICDataMap(ic_data_array, clone_ic_data); 614 function.RestoreICDataMap(ic_data_array, clone_ic_data);
611 615
612 if (Compiler::IsBackgroundCompilation() && 616 if (Compiler::IsBackgroundCompilation() &&
613 (function.ic_data_array() == Array::null())) { 617 (function.ic_data_array() == Array::null())) {
614 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId); 618 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId);
615 } 619 }
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 } 1892 }
1889 1893
1890 1894
1891 void BackgroundCompiler::EnsureInit(Thread* thread) { 1895 void BackgroundCompiler::EnsureInit(Thread* thread) {
1892 UNREACHABLE(); 1896 UNREACHABLE();
1893 } 1897 }
1894 1898
1895 #endif // DART_PRECOMPILED_RUNTIME 1899 #endif // DART_PRECOMPILED_RUNTIME
1896 1900
1897 } // namespace dart 1901 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/stub_code.cc » ('j') | runtime/vm/stub_code.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698