| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 "src/compiler/gap-resolver.h" | 5 #include "src/compiler/gap-resolver.h" |
| 6 | 6 |
| 7 #include "src/base/utils/random-number-generator.h" | 7 #include "src/base/utils/random-number-generator.h" |
| 8 #include "test/cctest/cctest.h" | 8 #include "test/cctest/cctest.h" |
| 9 | 9 |
| 10 using namespace v8::internal; | 10 using namespace v8::internal; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } | 102 } |
| 103 | 103 |
| 104 friend std::ostream& operator<<(std::ostream& os, | 104 friend std::ostream& operator<<(std::ostream& os, |
| 105 const InterpreterState& is) { | 105 const InterpreterState& is) { |
| 106 for (OperandMap::const_iterator it = is.values_.begin(); | 106 for (OperandMap::const_iterator it = is.values_.begin(); |
| 107 it != is.values_.end(); ++it) { | 107 it != is.values_.end(); ++it) { |
| 108 if (it != is.values_.begin()) os << " "; | 108 if (it != is.values_.begin()) os << " "; |
| 109 InstructionOperand source = FromKey(it->first); | 109 InstructionOperand source = FromKey(it->first); |
| 110 InstructionOperand destination = FromKey(it->second); | 110 InstructionOperand destination = FromKey(it->second); |
| 111 MoveOperands mo(source, destination); | 111 MoveOperands mo(source, destination); |
| 112 PrintableMoveOperands pmo = {RegisterConfiguration::ArchDefault(), &mo}; | 112 PrintableMoveOperands pmo = { |
| 113 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN), |
| 114 &mo}; |
| 113 os << pmo; | 115 os << pmo; |
| 114 } | 116 } |
| 115 return os; | 117 return os; |
| 116 } | 118 } |
| 117 | 119 |
| 118 OperandMap values_; | 120 OperandMap values_; |
| 119 }; | 121 }; |
| 120 | 122 |
| 121 | 123 |
| 122 // An abstract interpreter for moves, swaps and parallel moves. | 124 // An abstract interpreter for moves, swaps and parallel moves. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 mi1.AssembleParallelMove(pm); | 226 mi1.AssembleParallelMove(pm); |
| 225 | 227 |
| 226 MoveInterpreter mi2(pmc.main_zone()); | 228 MoveInterpreter mi2(pmc.main_zone()); |
| 227 GapResolver resolver(&mi2); | 229 GapResolver resolver(&mi2); |
| 228 resolver.Resolve(pm); | 230 resolver.Resolve(pm); |
| 229 | 231 |
| 230 CHECK(mi1.state() == mi2.state()); | 232 CHECK(mi1.state() == mi2.state()); |
| 231 } | 233 } |
| 232 } | 234 } |
| 233 } | 235 } |
| OLD | NEW |