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

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

Issue 1604543002: [compiler] Remove CodeStub from CompilationInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 4 years, 11 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/test-code-stub-assembler.cc ('k') | test/cctest/compiler/test-run-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-linkage.cc
diff --git a/test/cctest/compiler/test-linkage.cc b/test/cctest/compiler/test-linkage.cc
index 939b1447314ad020a1ec1dac79984e26d9e03567..6722f59d600042ababd50964804ef60ec217d644 100644
--- a/test/cctest/compiler/test-linkage.cc
+++ b/test/cctest/compiler/test-linkage.cc
@@ -71,20 +71,6 @@ TEST(TestLinkageJSFunctionIncoming) {
}
-TEST(TestLinkageCodeStubIncoming) {
- Isolate* isolate = CcTest::InitIsolateOnce();
- Zone zone;
- ToNumberStub stub(isolate);
- CompilationInfo info(&stub, isolate, &zone);
- CallDescriptor* descriptor = Linkage::ComputeIncoming(&zone, &info);
- CHECK(descriptor);
- CHECK_EQ(0, static_cast<int>(descriptor->StackParameterCount()));
- CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount()));
- CHECK_EQ(Operator::kNoProperties, descriptor->properties());
- CHECK_EQ(false, descriptor->IsJSFunctionCall());
-}
-
-
TEST(TestLinkageJSCall) {
HandleAndZoneScope handles;
Handle<JSFunction> function = Compile("a + c");
@@ -109,6 +95,20 @@ TEST(TestLinkageRuntimeCall) {
TEST(TestLinkageStubCall) {
+ Isolate* isolate = CcTest::InitIsolateOnce();
+ Zone zone;
+ ToNumberStub stub(isolate);
+ CompilationInfo info("test", isolate, &zone, Code::ComputeFlags(Code::STUB));
+ CallInterfaceDescriptor interface_descriptor =
+ stub.GetCallInterfaceDescriptor();
+ CallDescriptor* descriptor = Linkage::GetStubCallDescriptor(
+ isolate, &zone, interface_descriptor, stub.GetStackParameterCount(),
+ CallDescriptor::kNoFlags, Operator::kNoProperties);
+ CHECK(descriptor);
+ CHECK_EQ(0, static_cast<int>(descriptor->StackParameterCount()));
+ CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount()));
+ CHECK_EQ(Operator::kNoProperties, descriptor->properties());
+ CHECK_EQ(false, descriptor->IsJSFunctionCall());
// TODO(titzer): test linkage creation for outgoing stub calls.
}
« no previous file with comments | « test/cctest/compiler/test-code-stub-assembler.cc ('k') | test/cctest/compiler/test-run-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698