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

Unified Diff: test/cctest/compiler/test-linkage.cc

Issue 899803003: Removed most of the bogus CompilationInfo constructor calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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
Index: test/cctest/compiler/test-linkage.cc
diff --git a/test/cctest/compiler/test-linkage.cc b/test/cctest/compiler/test-linkage.cc
index 9136ca42761ba36205fb24d36d9cb960f5310b91..e832b3da3688fd3f15d58614fd46db9cb870742a 100644
--- a/test/cctest/compiler/test-linkage.cc
+++ b/test/cctest/compiler/test-linkage.cc
@@ -44,7 +44,8 @@ TEST(TestLinkageCreate) {
InitializedHandleScope handles;
Handle<JSFunction> function = Compile("a + b");
CompilationInfoWithZone info(function);
- Linkage linkage(info.zone(), &info);
+ CallDescriptor* descriptor = Linkage::ComputeIncoming(info.zone(), &info);
+ CHECK(descriptor);
}
@@ -59,9 +60,7 @@ TEST(TestLinkageJSFunctionIncoming) {
Handle<JSFunction> function = v8::Utils::OpenHandle(
*v8::Handle<v8::Function>::Cast(CompileRun(sources[i])));
CompilationInfoWithZone info(function);
- Linkage linkage(info.zone(), &info);
-
- CallDescriptor* descriptor = linkage.GetIncomingDescriptor();
+ CallDescriptor* descriptor = Linkage::ComputeIncoming(info.zone(), &info);
CHECK(descriptor);
CHECK_EQ(1 + i, static_cast<int>(descriptor->JSParameterCount()));
@@ -75,10 +74,10 @@ TEST(TestLinkageJSFunctionIncoming) {
TEST(TestLinkageCodeStubIncoming) {
Isolate* isolate = CcTest::InitIsolateOnce();
CompilationInfoWithZone info(static_cast<CodeStub*>(NULL), isolate);
- Linkage linkage(info.zone(), &info);
+ CallDescriptor* descriptor = Linkage::ComputeIncoming(info.zone(), &info);
// TODO(titzer): test linkage creation with a bonafide code stub.
// this just checks current behavior.
- CHECK(!linkage.GetIncomingDescriptor());
+ CHECK(!descriptor);
}
@@ -86,11 +85,10 @@ TEST(TestLinkageJSCall) {
HandleAndZoneScope handles;
Handle<JSFunction> function = Compile("a + c");
CompilationInfoWithZone info(function);
- Linkage linkage(info.zone(), &info);
for (int i = 0; i < 32; i++) {
- CallDescriptor* descriptor =
- linkage.GetJSCallDescriptor(i, CallDescriptor::kNoFlags);
+ CallDescriptor* descriptor = Linkage::GetJSCallDescriptor(
+ info.zone(), false, i, CallDescriptor::kNoFlags);
CHECK(descriptor);
CHECK_EQ(i, static_cast<int>(descriptor->JSParameterCount()));
CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount()));
« no previous file with comments | « test/cctest/compiler/test-js-context-specialization.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698