| OLD | NEW |
| 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 6755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6766 } | 6766 } |
| 6767 } | 6767 } |
| 6768 } | 6768 } |
| 6769 | 6769 |
| 6770 | 6770 |
| 6771 void ConstantPropagator::VisitNativeCall(NativeCallInstr* instr) { | 6771 void ConstantPropagator::VisitNativeCall(NativeCallInstr* instr) { |
| 6772 SetValue(instr, non_constant_); | 6772 SetValue(instr, non_constant_); |
| 6773 } | 6773 } |
| 6774 | 6774 |
| 6775 | 6775 |
| 6776 void ConstantPropagator::VisitDebugStepCheck(DebugStepCheckInstr* instr) { |
| 6777 // Nothing to do. |
| 6778 } |
| 6779 |
| 6780 |
| 6776 void ConstantPropagator::VisitStringFromCharCode( | 6781 void ConstantPropagator::VisitStringFromCharCode( |
| 6777 StringFromCharCodeInstr* instr) { | 6782 StringFromCharCodeInstr* instr) { |
| 6778 const Object& o = instr->char_code()->definition()->constant_value(); | 6783 const Object& o = instr->char_code()->definition()->constant_value(); |
| 6779 if (o.IsNull() || IsNonConstant(o)) { | 6784 if (o.IsNull() || IsNonConstant(o)) { |
| 6780 SetValue(instr, non_constant_); | 6785 SetValue(instr, non_constant_); |
| 6781 } else if (IsConstant(o)) { | 6786 } else if (IsConstant(o)) { |
| 6782 const intptr_t ch_code = Smi::Cast(o).Value(); | 6787 const intptr_t ch_code = Smi::Cast(o).Value(); |
| 6783 ASSERT(ch_code >= 0); | 6788 ASSERT(ch_code >= 0); |
| 6784 if (ch_code < Symbols::kMaxOneCharCodeSymbol) { | 6789 if (ch_code < Symbols::kMaxOneCharCodeSymbol) { |
| 6785 RawString** table = Symbols::PredefinedAddress(); | 6790 RawString** table = Symbols::PredefinedAddress(); |
| (...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8284 } | 8289 } |
| 8285 | 8290 |
| 8286 // Insert materializations at environment uses. | 8291 // Insert materializations at environment uses. |
| 8287 for (intptr_t i = 0; i < exits.length(); i++) { | 8292 for (intptr_t i = 0; i < exits.length(); i++) { |
| 8288 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); | 8293 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); |
| 8289 } | 8294 } |
| 8290 } | 8295 } |
| 8291 | 8296 |
| 8292 | 8297 |
| 8293 } // namespace dart | 8298 } // namespace dart |
| OLD | NEW |