Commit b48de977 authored by jarin's avatar jarin Committed by Commit bot

[turbofan] Fix machine signature allocation bug.

Review-Url: https://codereview.chromium.org/2670183004
Cr-Commit-Position: refs/heads/master@{#42921}
parent f3ae77ff
...@@ -52,8 +52,7 @@ std::ostream& operator<<(std::ostream& os, const CallDescriptor& d) { ...@@ -52,8 +52,7 @@ std::ostream& operator<<(std::ostream& os, const CallDescriptor& d) {
MachineSignature* CallDescriptor::GetMachineSignature(Zone* zone) const { MachineSignature* CallDescriptor::GetMachineSignature(Zone* zone) const {
size_t param_count = ParameterCount(); size_t param_count = ParameterCount();
size_t return_count = ReturnCount(); size_t return_count = ReturnCount();
MachineType* types = reinterpret_cast<MachineType*>( MachineType* types = zone->NewArray<MachineType>(param_count + return_count);
zone->New(sizeof(MachineType*) * (param_count + return_count)));
int current = 0; int current = 0;
for (size_t i = 0; i < return_count; ++i) { for (size_t i = 0; i < return_count; ++i) {
types[current++] = GetReturnType(i); types[current++] = GetReturnType(i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment