| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 #include "lithium.h" | 6 #include "lithium.h" |
| 7 #include "scopes.h" | 7 #include "scopes.h" |
| 8 #include "serialize.h" | 8 #include "serialize.h" |
| 9 | 9 |
| 10 #if V8_TARGET_ARCH_IA32 | 10 #if V8_TARGET_ARCH_IA32 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 127 } |
| 128 | 128 |
| 129 | 129 |
| 130 void LOperand::TearDownCaches() { | 130 void LOperand::TearDownCaches() { |
| 131 #define LITHIUM_OPERAND_TEARDOWN(name, type, number) L##name::TearDownCache(); | 131 #define LITHIUM_OPERAND_TEARDOWN(name, type, number) L##name::TearDownCache(); |
| 132 LITHIUM_OPERAND_LIST(LITHIUM_OPERAND_TEARDOWN) | 132 LITHIUM_OPERAND_LIST(LITHIUM_OPERAND_TEARDOWN) |
| 133 #undef LITHIUM_OPERAND_TEARDOWN | 133 #undef LITHIUM_OPERAND_TEARDOWN |
| 134 } | 134 } |
| 135 | 135 |
| 136 | 136 |
| 137 bool LMoveOperands::UsesRegeneration() const { |
| 138 bool prefer_regen = |
| 139 (source_->parent_linstr() == destination_->parent_linstr()) && |
| 140 (destination_->parent_linstr() != NULL) && |
| 141 destination_->parent_linstr()->PreferRegenerateToSpill(); |
| 142 bool one_is_mem = source_->IsInMemory() || destination_->IsInMemory(); |
| 143 bool one_is_reg = source_->IsInRegister() || destination_->IsInRegister(); |
| 144 return prefer_regen && one_is_mem && one_is_reg; |
| 145 } |
| 146 |
| 147 |
| 137 bool LParallelMove::IsRedundant() const { | 148 bool LParallelMove::IsRedundant() const { |
| 138 for (int i = 0; i < move_operands_.length(); ++i) { | 149 for (int i = 0; i < move_operands_.length(); ++i) { |
| 139 if (!move_operands_[i].IsRedundant()) return false; | 150 if (!move_operands_[i].IsRedundant()) return false; |
| 140 } | 151 } |
| 141 return true; | 152 return true; |
| 142 } | 153 } |
| 143 | 154 |
| 144 | 155 |
| 145 void LParallelMove::PrintDataTo(StringStream* stream) const { | 156 void LParallelMove::PrintDataTo(StringStream* stream) const { |
| 146 bool first = true; | 157 bool first = true; |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 | 624 |
| 614 | 625 |
| 615 LPhase::~LPhase() { | 626 LPhase::~LPhase() { |
| 616 if (ShouldProduceTraceOutput()) { | 627 if (ShouldProduceTraceOutput()) { |
| 617 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 628 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
| 618 } | 629 } |
| 619 } | 630 } |
| 620 | 631 |
| 621 | 632 |
| 622 } } // namespace v8::internal | 633 } } // namespace v8::internal |
| OLD | NEW |