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

Side by Side Diff: test/cctest/compiler/test-linkage.cc

Issue 2051113002: [stubs] ToNumberStub --> ToNumber builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix full-code on non-x64 platforms Created 4 years, 6 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
« no previous file with comments | « src/x87/code-stubs-x87.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/code-factory.h"
10 #include "src/compiler/common-operator.h" 11 #include "src/compiler/common-operator.h"
11 #include "src/compiler/graph.h" 12 #include "src/compiler/graph.h"
12 #include "src/compiler/linkage.h" 13 #include "src/compiler/linkage.h"
13 #include "src/compiler/machine-operator.h" 14 #include "src/compiler/machine-operator.h"
14 #include "src/compiler/node.h" 15 #include "src/compiler/node.h"
15 #include "src/compiler/operator.h" 16 #include "src/compiler/operator.h"
16 #include "src/compiler/pipeline.h" 17 #include "src/compiler/pipeline.h"
17 #include "src/compiler/schedule.h" 18 #include "src/compiler/schedule.h"
18 #include "test/cctest/cctest.h" 19 #include "test/cctest/cctest.h"
19 20
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 91
91 92
92 TEST(TestLinkageRuntimeCall) { 93 TEST(TestLinkageRuntimeCall) {
93 // TODO(titzer): test linkage creation for outgoing runtime calls. 94 // TODO(titzer): test linkage creation for outgoing runtime calls.
94 } 95 }
95 96
96 97
97 TEST(TestLinkageStubCall) { 98 TEST(TestLinkageStubCall) {
98 Isolate* isolate = CcTest::InitIsolateOnce(); 99 Isolate* isolate = CcTest::InitIsolateOnce();
99 Zone zone(isolate->allocator()); 100 Zone zone(isolate->allocator());
100 ToNumberStub stub(isolate); 101 Callable callable = CodeFactory::ToNumber(isolate);
101 CompilationInfo info(ArrayVector("test"), isolate, &zone, 102 CompilationInfo info(ArrayVector("test"), isolate, &zone,
102 Code::ComputeFlags(Code::STUB)); 103 Code::ComputeFlags(Code::STUB));
103 CallInterfaceDescriptor interface_descriptor =
104 stub.GetCallInterfaceDescriptor();
105 CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( 104 CallDescriptor* descriptor = Linkage::GetStubCallDescriptor(
106 isolate, &zone, interface_descriptor, stub.GetStackParameterCount(), 105 isolate, &zone, callable.descriptor(), 0, CallDescriptor::kNoFlags,
107 CallDescriptor::kNoFlags, Operator::kNoProperties); 106 Operator::kNoProperties);
108 CHECK(descriptor); 107 CHECK(descriptor);
109 CHECK_EQ(0, static_cast<int>(descriptor->StackParameterCount())); 108 CHECK_EQ(0, static_cast<int>(descriptor->StackParameterCount()));
110 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount())); 109 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount()));
111 CHECK_EQ(Operator::kNoProperties, descriptor->properties()); 110 CHECK_EQ(Operator::kNoProperties, descriptor->properties());
112 CHECK_EQ(false, descriptor->IsJSFunctionCall()); 111 CHECK_EQ(false, descriptor->IsJSFunctionCall());
113 // TODO(titzer): test linkage creation for outgoing stub calls. 112 // TODO(titzer): test linkage creation for outgoing stub calls.
114 } 113 }
115 114
116 } // namespace compiler 115 } // namespace compiler
117 } // namespace internal 116 } // namespace internal
118 } // namespace v8 117 } // namespace v8
OLDNEW
« no previous file with comments | « src/x87/code-stubs-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698