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

Side by Side Diff: src/compiler/linkage.cc

Issue 552803002: Get CallInterfaceDescriptor directly from CodeStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
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/compiler/linkage.h" 5 #include "src/compiler/linkage.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // If we already have the function literal, use the number of parameters 44 // If we already have the function literal, use the number of parameters
45 // plus the receiver. 45 // plus the receiver.
46 incoming_ = GetJSCallDescriptor(1 + info->function()->parameter_count()); 46 incoming_ = GetJSCallDescriptor(1 + info->function()->parameter_count());
47 } else if (!info->closure().is_null()) { 47 } else if (!info->closure().is_null()) {
48 // If we are compiling a JS function, use a JS call descriptor, 48 // If we are compiling a JS function, use a JS call descriptor,
49 // plus the receiver. 49 // plus the receiver.
50 SharedFunctionInfo* shared = info->closure()->shared(); 50 SharedFunctionInfo* shared = info->closure()->shared();
51 incoming_ = GetJSCallDescriptor(1 + shared->formal_parameter_count()); 51 incoming_ = GetJSCallDescriptor(1 + shared->formal_parameter_count());
52 } else if (info->code_stub() != NULL) { 52 } else if (info->code_stub() != NULL) {
53 // Use the code stub interface descriptor. 53 // Use the code stub interface descriptor.
54 HydrogenCodeStub* stub = info->code_stub(); 54 CallInterfaceDescriptor descriptor =
55 CodeStubInterfaceDescriptor descriptor(stub); 55 info->code_stub()->GetCallInterfaceDescriptor();
56 incoming_ = GetStubCallDescriptor(&descriptor); 56 incoming_ = GetStubCallDescriptor(descriptor);
57 } else { 57 } else {
58 incoming_ = NULL; // TODO(titzer): ? 58 incoming_ = NULL; // TODO(titzer): ?
59 } 59 }
60 } 60 }
61 61
62 62
63 FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame, int extra) { 63 FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame, int extra) {
64 if (frame->GetSpillSlotCount() > 0 || incoming_->IsJSFunctionCall() || 64 if (frame->GetSpillSlotCount() > 0 || incoming_->IsJSFunctionCall() ||
65 incoming_->kind() == CallDescriptor::kCallAddress) { 65 incoming_->kind() == CallDescriptor::kCallAddress) {
66 int offset; 66 int offset;
(...skipping 27 matching lines...) Expand all
94 94
95 CallDescriptor* Linkage::GetRuntimeCallDescriptor( 95 CallDescriptor* Linkage::GetRuntimeCallDescriptor(
96 Runtime::FunctionId function, int parameter_count, 96 Runtime::FunctionId function, int parameter_count,
97 Operator::Properties properties) { 97 Operator::Properties properties) {
98 return GetRuntimeCallDescriptor(function, parameter_count, properties, 98 return GetRuntimeCallDescriptor(function, parameter_count, properties,
99 this->info_->zone()); 99 this->info_->zone());
100 } 100 }
101 101
102 102
103 CallDescriptor* Linkage::GetStubCallDescriptor( 103 CallDescriptor* Linkage::GetStubCallDescriptor(
104 CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count, 104 CallInterfaceDescriptor descriptor, int stack_parameter_count,
105 CallDescriptor::Flags flags) { 105 CallDescriptor::Flags flags) {
106 return GetStubCallDescriptor(descriptor, stack_parameter_count, flags, 106 return GetStubCallDescriptor(descriptor, stack_parameter_count, flags,
107 this->info_->zone()); 107 this->info_->zone());
108 } 108 }
109 109
110 110
111 // static 111 // static
112 bool Linkage::NeedsFrameState(Runtime::FunctionId function) { 112 bool Linkage::NeedsFrameState(Runtime::FunctionId function) {
113 if (!FLAG_turbo_deoptimization) { 113 if (!FLAG_turbo_deoptimization) {
114 return false; 114 return false;
(...skipping 25 matching lines...) Expand all
140 140
141 CallDescriptor* Linkage::GetRuntimeCallDescriptor( 141 CallDescriptor* Linkage::GetRuntimeCallDescriptor(
142 Runtime::FunctionId function, int parameter_count, 142 Runtime::FunctionId function, int parameter_count,
143 Operator::Properties properties, Zone* zone) { 143 Operator::Properties properties, Zone* zone) {
144 UNIMPLEMENTED(); 144 UNIMPLEMENTED();
145 return NULL; 145 return NULL;
146 } 146 }
147 147
148 148
149 CallDescriptor* Linkage::GetStubCallDescriptor( 149 CallDescriptor* Linkage::GetStubCallDescriptor(
150 CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count, 150 CallInterfaceDescriptor descriptor, int stack_parameter_count,
151 CallDescriptor::Flags flags, Zone* zone) { 151 CallDescriptor::Flags flags, Zone* zone) {
152 UNIMPLEMENTED(); 152 UNIMPLEMENTED();
153 return NULL; 153 return NULL;
154 } 154 }
155 155
156 156
157 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, 157 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,
158 MachineSignature* sig) { 158 MachineSignature* sig) {
159 UNIMPLEMENTED(); 159 UNIMPLEMENTED();
160 return NULL; 160 return NULL;
161 } 161 }
162 #endif // !V8_TURBOFAN_BACKEND 162 #endif // !V8_TURBOFAN_BACKEND
163 } 163 }
164 } 164 }
165 } // namespace v8::internal::compiler 165 } // namespace v8::internal::compiler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698