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

Side by Side 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: Fix PPC 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 unified diff | Download patch
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 "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler.h" 6 #include "src/compiler.h"
7 #include "src/parsing/parser.h" 7 #include "src/parsing/parser.h"
8 #include "src/zone.h" 8 #include "src/zone.h"
9 9
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 CHECK(descriptor); 64 CHECK(descriptor);
65 65
66 CHECK_EQ(1 + i, static_cast<int>(descriptor->JSParameterCount())); 66 CHECK_EQ(1 + i, static_cast<int>(descriptor->JSParameterCount()));
67 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount())); 67 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount()));
68 CHECK_EQ(Operator::kNoProperties, descriptor->properties()); 68 CHECK_EQ(Operator::kNoProperties, descriptor->properties());
69 CHECK_EQ(true, descriptor->IsJSFunctionCall()); 69 CHECK_EQ(true, descriptor->IsJSFunctionCall());
70 } 70 }
71 } 71 }
72 72
73 73
74 TEST(TestLinkageCodeStubIncoming) { 74 TEST(TestLinkageCodeStubIncoming) {
Michael Starzinger 2016/01/19 09:37:03 nit: This test no longer tests the "incoming" desc
danno 2016/01/20 14:56:13 Done.
75 Isolate* isolate = CcTest::InitIsolateOnce(); 75 Isolate* isolate = CcTest::InitIsolateOnce();
76 Zone zone; 76 Zone zone;
77 ToNumberStub stub(isolate); 77 ToNumberStub stub(isolate);
78 CompilationInfo info(&stub, isolate, &zone); 78 CompilationInfo info("test", isolate, &zone, Code::ComputeFlags(Code::STUB));
79 CallDescriptor* descriptor = Linkage::ComputeIncoming(&zone, &info); 79 CallInterfaceDescriptor interface_descriptor =
80 stub.GetCallInterfaceDescriptor();
81 CallDescriptor* descriptor = Linkage::GetStubCallDescriptor(
82 isolate, &zone, interface_descriptor, stub.GetStackParameterCount(),
83 CallDescriptor::kNoFlags, Operator::kNoProperties);
80 CHECK(descriptor); 84 CHECK(descriptor);
81 CHECK_EQ(0, static_cast<int>(descriptor->StackParameterCount())); 85 CHECK_EQ(0, static_cast<int>(descriptor->StackParameterCount()));
82 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount())); 86 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount()));
83 CHECK_EQ(Operator::kNoProperties, descriptor->properties()); 87 CHECK_EQ(Operator::kNoProperties, descriptor->properties());
84 CHECK_EQ(false, descriptor->IsJSFunctionCall()); 88 CHECK_EQ(false, descriptor->IsJSFunctionCall());
85 } 89 }
86 90
87 91
88 TEST(TestLinkageJSCall) { 92 TEST(TestLinkageJSCall) {
89 HandleAndZoneScope handles; 93 HandleAndZoneScope handles;
(...skipping 18 matching lines...) Expand all
108 } 112 }
109 113
110 114
111 TEST(TestLinkageStubCall) { 115 TEST(TestLinkageStubCall) {
112 // TODO(titzer): test linkage creation for outgoing stub calls. 116 // TODO(titzer): test linkage creation for outgoing stub calls.
113 } 117 }
114 118
115 } // namespace compiler 119 } // namespace compiler
116 } // namespace internal 120 } // namespace internal
117 } // namespace v8 121 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698