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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 2082263002: [turbofan]: Support using push instructions for setting up tail call parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comments Created 4 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/instruction-selector.h ('k') | src/compiler/linkage.h » ('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 #include "src/compiler/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compiler/instruction-selector-impl.h" 10 #include "src/compiler/instruction-selector-impl.h"
(...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1781 case CallDescriptor::kCallAddress: 1781 case CallDescriptor::kCallAddress:
1782 opcode = kArchTailCallAddress; 1782 opcode = kArchTailCallAddress;
1783 break; 1783 break;
1784 default: 1784 default:
1785 UNREACHABLE(); 1785 UNREACHABLE();
1786 return; 1786 return;
1787 } 1787 }
1788 } 1788 }
1789 opcode |= MiscField::encode(descriptor->flags()); 1789 opcode |= MiscField::encode(descriptor->flags());
1790 1790
1791 buffer.instruction_args.push_back(g.TempImmediate(stack_param_delta)); 1791 Emit(kArchPrepareTailCall, g.NoOutput());
1792 1792
1793 Emit(kArchPrepareTailCall, g.NoOutput(), 1793 int first_unused_stack_slot =
1794 g.TempImmediate(stack_param_delta)); 1794 (V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK ? 1 : 0) +
1795 stack_param_delta;
1796 buffer.instruction_args.push_back(g.TempImmediate(first_unused_stack_slot));
1795 1797
1796 // Emit the tailcall instruction. 1798 // Emit the tailcall instruction.
1797 Emit(opcode, 0, nullptr, buffer.instruction_args.size(), 1799 Emit(opcode, 0, nullptr, buffer.instruction_args.size(),
1798 &buffer.instruction_args.front(), temps.size(), 1800 &buffer.instruction_args.front(), temps.size(),
1799 temps.empty() ? nullptr : &temps.front()); 1801 temps.empty() ? nullptr : &temps.front());
1800 } else { 1802 } else {
1801 FrameStateDescriptor* frame_state_descriptor = 1803 FrameStateDescriptor* frame_state_descriptor =
1802 descriptor->NeedsFrameState() 1804 descriptor->NeedsFrameState()
1803 ? GetFrameStateDescriptor( 1805 ? GetFrameStateDescriptor(
1804 node->InputAt(static_cast<int>(descriptor->InputCount()))) 1806 node->InputAt(static_cast<int>(descriptor->InputCount())))
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 return new (instruction_zone()) FrameStateDescriptor( 1971 return new (instruction_zone()) FrameStateDescriptor(
1970 instruction_zone(), state_info.type(), state_info.bailout_id(), 1972 instruction_zone(), state_info.type(), state_info.bailout_id(),
1971 state_info.state_combine(), parameters, locals, stack, 1973 state_info.state_combine(), parameters, locals, stack,
1972 state_info.shared_info(), outer_state); 1974 state_info.shared_info(), outer_state);
1973 } 1975 }
1974 1976
1975 1977
1976 } // namespace compiler 1978 } // namespace compiler
1977 } // namespace internal 1979 } // namespace internal
1978 } // namespace v8 1980 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698