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

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

Issue 1234443004: [turbofan] Add an InterpreterDispatch linkage type. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/compiler/linkage.cc ('k') | src/compiler/mips/instruction-selector-mips.cc » ('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 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler/osr.h" 9 #include "src/compiler/osr.h"
10 10
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 msig, // machine_sig 226 msig, // machine_sig
227 locations.Build(), // location_sig 227 locations.Build(), // location_sig
228 0, // js_parameter_count 228 0, // js_parameter_count
229 Operator::kNoProperties, // properties 229 Operator::kNoProperties, // properties
230 LinkageTraits::CCalleeSaveRegisters(), // callee-saved registers 230 LinkageTraits::CCalleeSaveRegisters(), // callee-saved registers
231 LinkageTraits::CCalleeSaveFPRegisters(), // callee-saved fp regs 231 LinkageTraits::CCalleeSaveFPRegisters(), // callee-saved fp regs
232 CallDescriptor::kNoFlags, // flags 232 CallDescriptor::kNoFlags, // flags
233 "c-call"); 233 "c-call");
234 } 234 }
235 235
236 static CallDescriptor* GetInterpreterDispatchDescriptor(
237 Zone* zone, const MachineSignature* msig) {
238 DCHECK_EQ(0, msig->parameter_count());
239 LocationSignature::Builder locations(zone, msig->return_count(),
240 msig->parameter_count());
241 AddReturnLocations(&locations);
242 LinkageLocation target_loc = LinkageLocation::AnyRegister();
243 return new (zone) CallDescriptor( // --
244 CallDescriptor::kInterpreterDispatch, // kind
245 kMachNone, // target MachineType
246 target_loc, // target location
247 msig, // machine_sig
248 locations.Build(), // location_sig
249 0, // js_parameter_count
250 Operator::kNoProperties, // properties
251 kNoCalleeSaved, // callee-saved registers
252 kNoCalleeSaved, // callee-saved fp regs
253 CallDescriptor::kSupportsTailCalls, // flags
254 "interpreter-dispatch");
255 }
256
236 static LinkageLocation regloc(Register reg) { 257 static LinkageLocation regloc(Register reg) {
237 return LinkageLocation(Register::ToAllocationIndex(reg)); 258 return LinkageLocation(Register::ToAllocationIndex(reg));
238 } 259 }
239 260
240 static LinkageLocation stackloc(int i) { 261 static LinkageLocation stackloc(int i) {
241 DCHECK_LT(i, 0); 262 DCHECK_LT(i, 0);
242 return LinkageLocation(i); 263 return LinkageLocation(i);
243 } 264 }
244 265
245 static MachineType reptyp(Representation representation) { 266 static MachineType reptyp(Representation representation) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 int parameter_index = 1 + index; // skip index 0, which is the target. 315 int parameter_index = 1 + index; // skip index 0, which is the target.
295 return incoming_->GetInputLocation(parameter_index); 316 return incoming_->GetInputLocation(parameter_index);
296 } 317 }
297 } 318 }
298 319
299 } // namespace compiler 320 } // namespace compiler
300 } // namespace internal 321 } // namespace internal
301 } // namespace v8 322 } // namespace v8
302 323
303 #endif // V8_COMPILER_LINKAGE_IMPL_H_ 324 #endif // V8_COMPILER_LINKAGE_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/compiler/mips/instruction-selector-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698