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

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

Issue 1146173005: [test] Refactor call-tester to use c-signature.h. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/compiler/call-tester.h ('k') | test/cctest/compiler/graph-builder-tester.h » ('j') | 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 35ea0b983a1607305855086651612d6648fcd97d..bc6d938ce13aff135c4c931f09cd1831bc65f279 100644
--- a/test/cctest/compiler/codegen-tester.h
+++ b/test/cctest/compiler/codegen-tester.h
@@ -30,12 +30,12 @@ class RawMachineAssemblerTester : public HandleAndZoneScope,
: HandleAndZoneScope(),
CallHelper<ReturnType>(
main_isolate(),
- MakeMachineSignature(main_zone(), MachineTypeForC<ReturnType>(), p0,
- p1, p2, p3, p4)),
+ CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, p1,
+ p2, p3, p4)),
RawMachineAssembler(
main_isolate(), new (main_zone()) Graph(main_zone()),
- MakeMachineSignature(main_zone(), MachineTypeForC<ReturnType>(), p0,
- p1, p2, p3, p4),
+ CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, p1,
+ p2, p3, p4),
kMachPtr, InstructionSelector::SupportedMachineOperatorFlags()) {}
void CheckNumber(double expected, Object* number) {
@@ -64,27 +64,6 @@ class RawMachineAssemblerTester : public HandleAndZoneScope,
private:
MaybeHandle<Code> code_;
-
- // TODO(titzer): factor me elsewhere.
- static MachineSignature* MakeMachineSignature(
- Zone* zone, MachineType return_type, MachineType p0 = kMachNone,
- MachineType p1 = kMachNone, MachineType p2 = kMachNone,
- MachineType p3 = kMachNone, MachineType p4 = kMachNone) {
- // Count the number of parameters.
- size_t param_count = 5;
- MachineType types[] = {p0, p1, p2, p3, p4};
- while (param_count > 0 && types[param_count - 1] == kMachNone)
- param_count--;
- size_t return_count = return_type == kMachNone ? 0 : 1;
-
- // Build the machine signature.
- MachineSignature::Builder builder(zone, return_count, param_count);
- if (return_count > 0) builder.AddReturn(return_type);
- for (size_t i = 0; i < param_count; i++) {
- builder.AddParam(types[i]);
- }
- return builder.Build();
- }
};
« no previous file with comments | « test/cctest/compiler/call-tester.h ('k') | test/cctest/compiler/graph-builder-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698