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

Unified Diff: src/compiler/linkage.cc

Issue 2670183004: [turbofan] Fix machine signature allocation bug. (Closed)
Patch Set: Created 3 years, 10 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.cc
diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
index bec83d37120ef85222bf08a8ba010ad312389304..d8a90443087c98b7eab9209e8c92c5983e0eefd4 100644
--- a/src/compiler/linkage.cc
+++ b/src/compiler/linkage.cc
@@ -52,8 +52,7 @@ std::ostream& operator<<(std::ostream& os, const CallDescriptor& d) {
MachineSignature* CallDescriptor::GetMachineSignature(Zone* zone) const {
size_t param_count = ParameterCount();
size_t return_count = ReturnCount();
- MachineType* types = reinterpret_cast<MachineType*>(
- zone->New(sizeof(MachineType*) * (param_count + return_count)));
+ MachineType* types = zone->NewArray<MachineType>(param_count + return_count);
int current = 0;
for (size_t i = 0; i < return_count; ++i) {
types[current++] = GetReturnType(i);
« 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