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

Side by Side Diff: src/compiler/linkage-impl.h

Issue 444883006: Initial shot at deoptimizing JSCallFunction in Turbofan. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove debug print Created 6 years, 4 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
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/compiler/operator-properties-inl.h » ('j') | 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 #ifndef V8_COMPILER_LINKAGE_IMPL_H_ 5 #ifndef V8_COMPILER_LINKAGE_IMPL_H_
6 #define V8_COMPILER_LINKAGE_IMPL_H_ 6 #define V8_COMPILER_LINKAGE_IMPL_H_
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 kNoCalleeSaved, // callee-saved registers 121 kNoCalleeSaved, // callee-saved registers
122 can_deoptimize, // deoptimization 122 can_deoptimize, // deoptimization
123 function->name); 123 function->name);
124 } 124 }
125 125
126 126
127 // TODO(turbofan): cache call descriptors for code stub calls. 127 // TODO(turbofan): cache call descriptors for code stub calls.
128 template <typename LinkageTraits> 128 template <typename LinkageTraits>
129 static CallDescriptor* GetStubCallDescriptor( 129 static CallDescriptor* GetStubCallDescriptor(
130 Zone* zone, CodeStubInterfaceDescriptor* descriptor, 130 Zone* zone, CodeStubInterfaceDescriptor* descriptor,
131 int stack_parameter_count) { 131 int stack_parameter_count,
132 CallDescriptor::DeoptimizationSupport can_deoptimize) {
132 int register_parameter_count = descriptor->GetEnvironmentParameterCount(); 133 int register_parameter_count = descriptor->GetEnvironmentParameterCount();
133 int parameter_count = register_parameter_count + stack_parameter_count; 134 int parameter_count = register_parameter_count + stack_parameter_count;
134 const int code_count = 1; 135 const int code_count = 1;
135 const int context_count = 1; 136 const int context_count = 1;
136 int input_count = code_count + parameter_count + context_count; 137 int input_count = code_count + parameter_count + context_count;
137 138
138 const int return_count = 1; 139 const int return_count = 1;
139 LinkageLocation* locations = 140 LinkageLocation* locations =
140 zone->NewArray<LinkageLocation>(return_count + input_count); 141 zone->NewArray<LinkageLocation>(return_count + input_count);
141 142
(...skipping 16 matching lines...) Expand all
158 159
159 // TODO(titzer): refactor TurboFan graph to consider context a value input. 160 // TODO(titzer): refactor TurboFan graph to consider context a value input.
160 return new (zone) 161 return new (zone)
161 CallDescriptor(CallDescriptor::kCallCodeObject, // kind 162 CallDescriptor(CallDescriptor::kCallCodeObject, // kind
162 return_count, // return_count 163 return_count, // return_count
163 parameter_count, // parameter_count 164 parameter_count, // parameter_count
164 input_count, // input_count 165 input_count, // input_count
165 locations, // locations 166 locations, // locations
166 Operator::kNoProperties, // properties 167 Operator::kNoProperties, // properties
167 kNoCalleeSaved, // callee-saved registers 168 kNoCalleeSaved, // callee-saved registers
168 CallDescriptor::kCannotDeoptimize, // deoptimization 169 can_deoptimize, // deoptimization
169 CodeStub::MajorName(descriptor->MajorKey(), false)); 170 CodeStub::MajorName(descriptor->MajorKey(), false));
170 // TODO(jarin) should deoptimize!
171 } 171 }
172 172
173 173
174 template <typename LinkageTraits> 174 template <typename LinkageTraits>
175 static CallDescriptor* GetSimplifiedCDescriptor( 175 static CallDescriptor* GetSimplifiedCDescriptor(
176 Zone* zone, int num_params, MachineRepresentation return_type, 176 Zone* zone, int num_params, MachineRepresentation return_type,
177 const MachineRepresentation* param_types) { 177 const MachineRepresentation* param_types) {
178 LinkageLocation* locations = 178 LinkageLocation* locations =
179 zone->NewArray<LinkageLocation>(num_params + 2); 179 zone->NewArray<LinkageLocation>(num_params + 2);
180 int index = 0; 180 int index = 0;
(...skipping 16 matching lines...) Expand all
197 CallDescriptor::kCallAddress, 1, num_params, num_params + 1, locations, 197 CallDescriptor::kCallAddress, 1, num_params, num_params + 1, locations,
198 Operator::kNoProperties, LinkageTraits::CCalleeSaveRegisters(), 198 Operator::kNoProperties, LinkageTraits::CCalleeSaveRegisters(),
199 CallDescriptor::kCannotDeoptimize); // TODO(jarin) should deoptimize! 199 CallDescriptor::kCannotDeoptimize); // TODO(jarin) should deoptimize!
200 } 200 }
201 }; 201 };
202 } 202 }
203 } 203 }
204 } // namespace v8::internal::compiler 204 } // namespace v8::internal::compiler
205 205
206 #endif // V8_COMPILER_LINKAGE_IMPL_H_ 206 #endif // V8_COMPILER_LINKAGE_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/compiler/operator-properties-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698