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

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

Issue 430123002: Fix android debug build. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/compiler/codegen-tester.h ('k') | no next file » | 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 if (!mo.IsRedundant() && seen.find(mo.destination()) == seen.end()) { 116 if (!mo.IsRedundant() && seen.find(mo.destination()) == seen.end()) {
117 parallel_move->AddMove(mo.source(), mo.destination(), main_zone()); 117 parallel_move->AddMove(mo.source(), mo.destination(), main_zone());
118 seen.insert(mo.destination()); 118 seen.insert(mo.destination());
119 } 119 }
120 } 120 }
121 return parallel_move; 121 return parallel_move;
122 } 122 }
123 123
124 private: 124 private:
125 struct InstructionOperandComparator { 125 struct InstructionOperandComparator {
126 bool operator()(const InstructionOperand* x, const InstructionOperand* y) { 126 bool operator()(const InstructionOperand* x,
127 const InstructionOperand* y) const {
127 return (x->kind() < y->kind()) || 128 return (x->kind() < y->kind()) ||
128 (x->kind() == y->kind() && x->index() < y->index()); 129 (x->kind() == y->kind() && x->index() < y->index());
129 } 130 }
130 }; 131 };
131 132
132 InstructionOperand* CreateRandomOperand() { 133 InstructionOperand* CreateRandomOperand() {
133 int index = rng_->NextInt(6); 134 int index = rng_->NextInt(6);
134 switch (rng_->NextInt(5)) { 135 switch (rng_->NextInt(5)) {
135 case 0: 136 case 0:
136 return ConstantOperand::Create(index, main_zone()); 137 return ConstantOperand::Create(index, main_zone());
(...skipping 26 matching lines...) Expand all
163 mi1.AssembleParallelMove(pm); 164 mi1.AssembleParallelMove(pm);
164 165
165 MoveInterpreter mi2; 166 MoveInterpreter mi2;
166 GapResolver resolver(&mi2); 167 GapResolver resolver(&mi2);
167 resolver.Resolve(pm); 168 resolver.Resolve(pm);
168 169
169 CHECK(mi1.state() == mi2.state()); 170 CHECK(mi1.state() == mi2.state());
170 } 171 }
171 } 172 }
172 } 173 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/codegen-tester.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698