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

Side by Side Diff: test/cctest/compiler/test-gap-resolver.cc

Issue 1405673003: provides a mechanism for optimizing compilers to select the different Register configuration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add the TODO comments. Created 5 years, 2 months 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
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/compiler/test-multiple-return.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 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
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
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 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/compiler/test-multiple-return.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698