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

Side by Side Diff: test/cctest/compiler/test-representation-change.cc

Issue 1163803002: Cosmetic changes to tests to make it easier to concatenate them. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix snapshot-external.cc Created 5 years, 6 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/compiler/test-linkage.cc ('k') | test/cctest/compiler/test-run-deopt.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 <limits> 5 #include <limits>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 #include "test/cctest/cctest.h" 8 #include "test/cctest/cctest.h"
9 #include "test/cctest/compiler/codegen-tester.h" 9 #include "test/cctest/compiler/codegen-tester.h"
10 #include "test/cctest/compiler/graph-builder-tester.h" 10 #include "test/cctest/compiler/graph-builder-tester.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 CHECK(changer()->type_error_); 93 CHECK(changer()->type_error_);
94 CHECK_EQ(n, c); 94 CHECK_EQ(n, c);
95 } 95 }
96 96
97 void CheckNop(MachineTypeUnion from, MachineTypeUnion to) { 97 void CheckNop(MachineTypeUnion from, MachineTypeUnion to) {
98 Node* n = Parameter(0); 98 Node* n = Parameter(0);
99 Node* c = changer()->GetRepresentationFor(n, from, to); 99 Node* c = changer()->GetRepresentationFor(n, from, to);
100 CHECK_EQ(n, c); 100 CHECK_EQ(n, c);
101 } 101 }
102 }; 102 };
103 } 103 } // namespace compiler
104 } 104 } // namespace internal
105 } // namespace v8::internal::compiler 105 } // namespace v8
106 106
107 107
108 static const MachineType all_reps[] = {kRepBit, kRepWord32, kRepWord64, 108 static const MachineType all_reps[] = {kRepBit, kRepWord32, kRepWord64,
109 kRepFloat32, kRepFloat64, kRepTagged}; 109 kRepFloat32, kRepFloat64, kRepTagged};
110 110
111 111
112 TEST(BoolToBit_constant) { 112 TEST(BoolToBit_constant) {
113 RepresentationChangerTester r; 113 RepresentationChangerTester r;
114 114
115 Node* true_node = r.jsgraph()->TrueConstant(); 115 Node* true_node = r.jsgraph()->TrueConstant();
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 r.CheckTypeError(kRepWord32 | kTypeUint32, kRepWord64); 544 r.CheckTypeError(kRepWord32 | kTypeUint32, kRepWord64);
545 545
546 for (size_t i = 0; i < arraysize(all_reps); i++) { 546 for (size_t i = 0; i < arraysize(all_reps); i++) {
547 for (size_t j = 0; j < arraysize(all_reps); j++) { 547 for (size_t j = 0; j < arraysize(all_reps); j++) {
548 if (i == j) continue; 548 if (i == j) continue;
549 // Only a single from representation is allowed. 549 // Only a single from representation is allowed.
550 r.CheckTypeError(all_reps[i] | all_reps[j], kRepTagged); 550 r.CheckTypeError(all_reps[i] | all_reps[j], kRepTagged);
551 } 551 }
552 } 552 }
553 } 553 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-linkage.cc ('k') | test/cctest/compiler/test-run-deopt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698