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

Unified Diff: test/cctest/compiler/codegen-tester.h

Issue 1414203009: Changed the constructor of BufferedRawMachineAssemblerTester. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Renamed DetermineReturnIndex to ComputeParameterCount 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/codegen-tester.h
diff --git a/test/cctest/compiler/codegen-tester.h b/test/cctest/compiler/codegen-tester.h
index 5bfdf1f505fab16a41a8e77a196ec14d99fc9d99..55dbecdb9eca8709ebb0d139ca1a1e7ac52fe67f 100644
--- a/test/cctest/compiler/codegen-tester.h
+++ b/test/cctest/compiler/codegen-tester.h
@@ -77,28 +77,12 @@ template <typename ReturnType>
class BufferedRawMachineAssemblerTester
: public RawMachineAssemblerTester<int32_t> {
public:
- BufferedRawMachineAssemblerTester()
- : BufferedRawMachineAssemblerTester(0, kMachNone, kMachNone, kMachNone,
- kMachNone) {}
-
-
- explicit BufferedRawMachineAssemblerTester(MachineType p0)
- : BufferedRawMachineAssemblerTester(1, p0, kMachNone, kMachNone,
- kMachNone) {}
-
-
- BufferedRawMachineAssemblerTester(MachineType p0, MachineType p1)
- : BufferedRawMachineAssemblerTester(2, p0, p1, kMachNone, kMachNone) {}
-
-
- BufferedRawMachineAssemblerTester(MachineType p0, MachineType p1,
- MachineType p2)
- : BufferedRawMachineAssemblerTester(3, p0, p1, p2, kMachNone) {}
-
-
- BufferedRawMachineAssemblerTester(MachineType p0, MachineType p1,
- MachineType p2, MachineType p3)
- : BufferedRawMachineAssemblerTester(4, p0, p1, p2, p3) {}
+ BufferedRawMachineAssemblerTester(MachineType p0 = kMachNone,
+ MachineType p1 = kMachNone,
+ MachineType p2 = kMachNone,
+ MachineType p3 = kMachNone)
+ : BufferedRawMachineAssemblerTester(ComputeParameterCount(p0, p1, p2, p3),
+ p0, p1, p2, p3) {}
// The BufferedRawMachineAssemblerTester does not pass parameters directly
@@ -193,6 +177,24 @@ class BufferedRawMachineAssemblerTester
}
+ static uint32_t ComputeParameterCount(MachineType p0, MachineType p1,
+ MachineType p2, MachineType p3) {
+ if (p0 == kMachNone) {
+ return 0;
+ }
+ if (p1 == kMachNone) {
+ return 1;
+ }
+ if (p2 == kMachNone) {
+ return 2;
+ }
+ if (p3 == kMachNone) {
+ return 3;
+ }
+ return 4;
+ }
+
+
CSignature* test_graph_signature_;
Node* parameter_nodes_[4];
uint32_t return_parameter_index_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698