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

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

Issue 1424943004: Move compiler cctests into v8::internal::compiler namespace. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
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 // TODO(jochen): Remove this after the setting is turned on globally. 5 // TODO(jochen): Remove this after the setting is turned on globally.
6 #define V8_IMMINENT_DEPRECATION_WARNINGS 6 #define V8_IMMINENT_DEPRECATION_WARNINGS
7 7
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 9
10 #include "src/base/utils/random-number-generator.h" 10 #include "src/base/utils/random-number-generator.h"
11 #include "test/cctest/cctest.h" 11 #include "test/cctest/cctest.h"
12 12
13 using namespace v8::internal; 13 namespace v8 {
14 using namespace v8::internal::compiler; 14 namespace internal {
15 namespace compiler {
15 16
16 // The state of our move interpreter is the mapping of operands to values. Note 17 // The state of our move interpreter is the mapping of operands to values. Note
17 // that the actual values don't really matter, all we care about is equality. 18 // that the actual values don't really matter, all we care about is equality.
18 class InterpreterState { 19 class InterpreterState {
19 public: 20 public:
20 void ExecuteInParallel(const ParallelMove* moves) { 21 void ExecuteInParallel(const ParallelMove* moves) {
21 InterpreterState copy(*this); 22 InterpreterState copy(*this);
22 for (const auto m : *moves) { 23 for (const auto m : *moves) {
23 if (!m->IsRedundant()) write(m->destination(), copy.read(m->source())); 24 if (!m->IsRedundant()) write(m->destination(), copy.read(m->source()));
24 } 25 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 mi1.AssembleParallelMove(pm); 249 mi1.AssembleParallelMove(pm);
249 250
250 MoveInterpreter mi2(pmc.main_zone()); 251 MoveInterpreter mi2(pmc.main_zone());
251 GapResolver resolver(&mi2); 252 GapResolver resolver(&mi2);
252 resolver.Resolve(pm); 253 resolver.Resolve(pm);
253 254
254 CHECK(mi1.state() == mi2.state()); 255 CHECK(mi1.state() == mi2.state());
255 } 256 }
256 } 257 }
257 } 258 }
259
260 } // namespace compiler
261 } // namespace internal
262 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-changes-lowering.cc ('k') | test/cctest/compiler/test-graph-visualizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698