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

Unified Diff: src/compiler/linkage-impl.h

Issue 1266603002: [turbofan] Factor C call descriptor building into compiler/c-linkage.cc. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/compiler/mips/linkage-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/linkage-impl.h
diff --git a/src/compiler/linkage-impl.h b/src/compiler/linkage-impl.h
index 6641ef130982cc39de530c23d4243179ec6904d4..7b634cd905a7794783b1750221ae9fe990589d70 100644
--- a/src/compiler/linkage-impl.h
+++ b/src/compiler/linkage-impl.h
@@ -197,42 +197,6 @@ class LinkageHelper {
descriptor.DebugName(isolate));
}
- static CallDescriptor* GetSimplifiedCDescriptor(
- Zone* zone, const MachineSignature* msig) {
- LocationSignature::Builder locations(zone, msig->return_count(),
- msig->parameter_count());
- // Add return location(s).
- AddReturnLocations(&locations);
-
- // Add register and/or stack parameter(s).
- const int parameter_count = static_cast<int>(msig->parameter_count());
- int stack_offset = LinkageTraits::CStackBackingStoreLength();
- for (int i = 0; i < parameter_count; i++) {
- if (i < LinkageTraits::CRegisterParametersLength()) {
- locations.AddParam(regloc(LinkageTraits::CRegisterParameter(i)));
- } else {
- locations.AddParam(stackloc(-1 - stack_offset));
- stack_offset++;
- }
- }
-
- // The target for C calls is always an address (i.e. machine pointer).
- MachineType target_type = kMachPtr;
- LinkageLocation target_loc = LinkageLocation::AnyRegister();
- return new (zone) CallDescriptor( // --
- CallDescriptor::kCallAddress, // kind
- target_type, // target MachineType
- target_loc, // target location
- msig, // machine_sig
- locations.Build(), // location_sig
- 0, // js_parameter_count
- Operator::kNoProperties, // properties
- LinkageTraits::CCalleeSaveRegisters(), // callee-saved registers
- LinkageTraits::CCalleeSaveFPRegisters(), // callee-saved fp regs
- CallDescriptor::kNoFlags, // flags
- "c-call");
- }
-
static CallDescriptor* GetInterpreterDispatchDescriptor(Zone* zone) {
MachineSignature::Builder types(zone, 0, 2);
LocationSignature::Builder locations(zone, 0, 2);
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/compiler/mips/linkage-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698