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

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

Issue 1019293002: [turbofan] Use proper parameter representation for stub calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | 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 abd0696837d17a49c4f58e1d9ca8084968658069..a1137d76e678691781200cf81aee40b58d824328 100644
--- a/src/compiler/linkage-impl.h
+++ b/src/compiler/linkage-impl.h
@@ -164,13 +164,16 @@ class LinkageHelper {
if (i < register_parameter_count) {
// The first parameters go in registers.
Register reg = descriptor.GetEnvironmentParameterRegister(i);
+ Representation rep =
+ descriptor.GetEnvironmentParameterRepresentation(i);
locations.AddParam(regloc(reg));
+ types.AddParam(reptyp(rep));
} else {
// The rest of the parameters go on the stack.
int stack_slot = i - register_parameter_count - stack_parameter_count;
locations.AddParam(stackloc(stack_slot));
+ types.AddParam(kMachAnyTagged);
}
- types.AddParam(kMachAnyTagged);
}
// Add context.
locations.AddParam(regloc(LinkageTraits::ContextReg()));
@@ -232,6 +235,34 @@ class LinkageHelper {
DCHECK_LT(i, 0);
return LinkageLocation(i);
}
+
+ static MachineType reptyp(Representation representation) {
+ switch (representation.kind()) {
+ case Representation::kInteger8:
+ return kMachInt8;
+ case Representation::kUInteger8:
+ return kMachUint8;
+ case Representation::kInteger16:
+ return kMachInt16;
+ case Representation::kUInteger16:
+ return kMachUint16;
+ case Representation::kInteger32:
+ return kMachInt32;
+ case Representation::kSmi:
+ case Representation::kTagged:
+ case Representation::kHeapObject:
+ return kMachAnyTagged;
+ case Representation::kDouble:
+ return kMachFloat64;
+ case Representation::kExternal:
+ return kMachPtr;
+ case Representation::kNone:
+ case Representation::kNumRepresentations:
+ break;
+ }
+ UNREACHABLE();
+ return kMachNone;
+ }
};
@@ -254,7 +285,6 @@ LinkageLocation Linkage::GetOsrValueLocation(int index) const {
}
}
-
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698