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

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

Issue 106623006: Fix bug in double unboxing. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed mips code Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.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) 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/cha.h" 8 #include "vm/cha.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 3537 matching lines...) Expand 10 before | Expand all | Expand 10 after
3548 const Function& getter = 3548 const Function& getter =
3549 Function::Handle(owner.LookupGetterFunction(field_name)); 3549 Function::Handle(owner.LookupGetterFunction(field_name));
3550 const Function& setter = 3550 const Function& setter =
3551 Function::Handle(owner.LookupSetterFunction(field_name)); 3551 Function::Handle(owner.LookupSetterFunction(field_name));
3552 bool result = !getter.IsNull() 3552 bool result = !getter.IsNull()
3553 && !setter.IsNull() 3553 && !setter.IsNull()
3554 && (setter.usage_counter() > 0) 3554 && (setter.usage_counter() > 0)
3555 && (FLAG_getter_setter_ratio * setter.usage_counter() > 3555 && (FLAG_getter_setter_ratio * setter.usage_counter() >
3556 getter.usage_counter()); 3556 getter.usage_counter());
3557 if (!result) { 3557 if (!result) {
3558 if (FLAG_trace_optimization) {
3559 OS::Print("Disabling unboxing of %s\n", field.ToCString());
3560 }
3558 field.set_is_unboxing_candidate(false); 3561 field.set_is_unboxing_candidate(false);
3559 field.DeoptimizeDependentCode(); 3562 field.DeoptimizeDependentCode();
3560 } else { 3563 } else {
3561 FlowGraph::AddToGuardedFields(flow_graph_->guarded_fields(), &field); 3564 FlowGraph::AddToGuardedFields(flow_graph_->guarded_fields(), &field);
3562 } 3565 }
3563 } 3566 }
3564 } 3567 }
3565 3568
3566 3569
3567 bool FlowGraphOptimizer::TryInlineInstanceSetter(InstanceCallInstr* instr, 3570 bool FlowGraphOptimizer::TryInlineInstanceSetter(InstanceCallInstr* instr,
(...skipping 4545 matching lines...) Expand 10 before | Expand all | Expand 10 after
8113 } 8116 }
8114 8117
8115 // Insert materializations at environment uses. 8118 // Insert materializations at environment uses.
8116 for (intptr_t i = 0; i < exits.length(); i++) { 8119 for (intptr_t i = 0; i < exits.length(); i++) {
8117 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); 8120 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields);
8118 } 8121 }
8119 } 8122 }
8120 8123
8121 8124
8122 } // namespace dart 8125 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698