Chromium Code Reviews| 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/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 #if defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_IA32) | 48 #if defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_IA32) |
| 49 DEFINE_FLAG(bool, trace_smi_widening, false, "Trace Smi->Int32 widening pass."); | 49 DEFINE_FLAG(bool, trace_smi_widening, false, "Trace Smi->Int32 widening pass."); |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 DECLARE_FLAG(bool, polymorphic_with_deopt); | 52 DECLARE_FLAG(bool, polymorphic_with_deopt); |
| 53 DECLARE_FLAG(bool, source_lines); | 53 DECLARE_FLAG(bool, source_lines); |
| 54 DECLARE_FLAG(bool, trace_cha); | 54 DECLARE_FLAG(bool, trace_cha); |
| 55 DECLARE_FLAG(bool, trace_field_guards); | 55 DECLARE_FLAG(bool, trace_field_guards); |
| 56 DECLARE_FLAG(bool, trace_type_check_elimination); | 56 DECLARE_FLAG(bool, trace_type_check_elimination); |
| 57 DECLARE_FLAG(bool, warn_on_javascript_compatibility); | 57 DECLARE_FLAG(bool, warn_on_javascript_compatibility); |
| 58 DECLARE_FLAG(bool, fields_may_be_reset); | |
| 58 | 59 |
| 59 // Quick access to the current isolate and zone. | 60 // Quick access to the current isolate and zone. |
| 60 #define I (isolate()) | 61 #define I (isolate()) |
| 61 #define Z (zone()) | 62 #define Z (zone()) |
| 62 | 63 |
| 63 static bool ShouldInlineSimd() { | 64 static bool ShouldInlineSimd() { |
| 64 return FlowGraphCompiler::SupportsUnboxedSimd128(); | 65 return FlowGraphCompiler::SupportsUnboxedSimd128(); |
| 65 } | 66 } |
| 66 | 67 |
| 67 | 68 |
| (...skipping 5579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5647 DefinitionName(instance()), | 5648 DefinitionName(instance()), |
| 5648 index_constant(), | 5649 index_constant(), |
| 5649 ElementSizeMultiplier(element_size())); | 5650 ElementSizeMultiplier(element_size())); |
| 5650 } | 5651 } |
| 5651 } | 5652 } |
| 5652 UNREACHABLE(); | 5653 UNREACHABLE(); |
| 5653 return "<?>"; | 5654 return "<?>"; |
| 5654 } | 5655 } |
| 5655 | 5656 |
| 5656 bool IsFinalField() const { | 5657 bool IsFinalField() const { |
| 5657 return (kind() == kField) && field().is_final(); | 5658 return (kind() == kField) |
| 5659 && field().is_final() | |
| 5660 && (!field().is_static() || !FLAG_fields_may_be_reset); | |
|
srdjan
2015/12/03 16:57:56
IMO, the flag does not belong here, the test is fo
rmacnak
2015/12/03 21:09:11
Ditto.
Florian Schneider
2015/12/04 11:36:54
Done.
| |
| 5658 } | 5661 } |
| 5659 | 5662 |
| 5660 intptr_t Hashcode() const { | 5663 intptr_t Hashcode() const { |
| 5661 return (flags_ * 63 + reinterpret_cast<intptr_t>(instance_)) * 31 + | 5664 return (flags_ * 63 + reinterpret_cast<intptr_t>(instance_)) * 31 + |
| 5662 FieldHashcode(); | 5665 FieldHashcode(); |
| 5663 } | 5666 } |
| 5664 | 5667 |
| 5665 bool Equals(const Place* other) const { | 5668 bool Equals(const Place* other) const { |
| 5666 return (flags_ == other->flags_) && | 5669 return (flags_ == other->flags_) && |
| 5667 (instance_ == other->instance_) && | 5670 (instance_ == other->instance_) && |
| (...skipping 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8825 | 8828 |
| 8826 // Insert materializations at environment uses. | 8829 // Insert materializations at environment uses. |
| 8827 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { | 8830 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { |
| 8828 CreateMaterializationAt( | 8831 CreateMaterializationAt( |
| 8829 exits_collector_.exits()[i], alloc, *slots); | 8832 exits_collector_.exits()[i], alloc, *slots); |
| 8830 } | 8833 } |
| 8831 } | 8834 } |
| 8832 | 8835 |
| 8833 | 8836 |
| 8834 } // namespace dart | 8837 } // namespace dart |
| OLD | NEW |