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

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

Issue 1685963002: Pass field to mutator thread so that it can be marked as boxed and all dependent code deoptimized (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address reviewer's comments 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 | « runtime/vm/code_generator.cc ('k') | runtime/vm/isolate.h » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/branch_optimizer.h" 8 #include "vm/branch_optimizer.h"
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 4604 matching lines...) Expand 10 before | Expand all | Expand 10 after
4615 getter.usage_counter())) { 4615 getter.usage_counter())) {
4616 unboxed_field = true; 4616 unboxed_field = true;
4617 } 4617 }
4618 } 4618 }
4619 if (!unboxed_field) { 4619 if (!unboxed_field) {
4620 // TODO(srdjan): Instead of aborting pass this field to the mutator thread 4620 // TODO(srdjan): Instead of aborting pass this field to the mutator thread
4621 // so that it can: 4621 // so that it can:
4622 // - set it to unboxed 4622 // - set it to unboxed
4623 // - deoptimize dependent code. 4623 // - deoptimize dependent code.
4624 if (Compiler::IsBackgroundCompilation()) { 4624 if (Compiler::IsBackgroundCompilation()) {
4625 isolate()->AddDeoptimizingBoxedField(field);
4625 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId); 4626 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId);
4627 UNREACHABLE();
4626 } 4628 }
4627 if (FLAG_trace_optimization || FLAG_trace_field_guards) { 4629 if (FLAG_trace_optimization || FLAG_trace_field_guards) {
4628 THR_Print("Disabling unboxing of %s\n", field.ToCString()); 4630 THR_Print("Disabling unboxing of %s\n", field.ToCString());
4629 if (!setter.IsNull()) { 4631 if (!setter.IsNull()) {
4630 OS::Print(" setter usage count: %" Pd "\n", setter.usage_counter()); 4632 OS::Print(" setter usage count: %" Pd "\n", setter.usage_counter());
4631 } 4633 }
4632 if (!getter.IsNull()) { 4634 if (!getter.IsNull()) {
4633 OS::Print(" getter usage count: %" Pd "\n", getter.usage_counter()); 4635 OS::Print(" getter usage count: %" Pd "\n", getter.usage_counter());
4634 } 4636 }
4635 } 4637 }
4636 field.set_is_unboxing_candidate(false); 4638 field.set_is_unboxing_candidate(false);
4637 if (Compiler::IsBackgroundCompilation()) { 4639 field.DeoptimizeDependentCode();
4638 UNIMPLEMENTED();
4639 } else {
4640 field.DeoptimizeDependentCode();
4641 }
4642 } else { 4640 } else {
4643 FlowGraph::AddToGuardedFields(flow_graph_->guarded_fields(), &field); 4641 FlowGraph::AddToGuardedFields(flow_graph_->guarded_fields(), &field);
4644 } 4642 }
4645 } 4643 }
4646 } 4644 }
4647 4645
4648 4646
4649 void FlowGraphOptimizer::VisitAllocateContext(AllocateContextInstr* instr) { 4647 void FlowGraphOptimizer::VisitAllocateContext(AllocateContextInstr* instr) {
4650 // Replace generic allocation with a sequence of inlined allocation and 4648 // Replace generic allocation with a sequence of inlined allocation and
4651 // explicit initalizing stores. 4649 // explicit initalizing stores.
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
5022 // the code for this instruction, however, leaving the environment 5020 // the code for this instruction, however, leaving the environment
5023 // changes code. 5021 // changes code.
5024 current->RemoveEnvironment(); 5022 current->RemoveEnvironment();
5025 } 5023 }
5026 } 5024 }
5027 } 5025 }
5028 } 5026 }
5029 5027
5030 5028
5031 } // namespace dart 5029 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698