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

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

Issue 2624183002: [compiler] Allow for StackSlots of arbitrary size (Closed)
Patch Set: Address comments Created 3 years, 11 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/frame.h ('k') | src/compiler/machine-operator.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/compiler-source-position-table.h" 10 #include "src/compiler/compiler-source-position-table.h"
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 for (size_t index = 0; index < sw.case_count; ++index) { 1625 for (size_t index = 0; index < sw.case_count; ++index) {
1626 int32_t value = sw.case_values[index]; 1626 int32_t value = sw.case_values[index];
1627 BasicBlock* branch = sw.case_branches[index]; 1627 BasicBlock* branch = sw.case_branches[index];
1628 inputs[index * 2 + 2 + 0] = g.TempImmediate(value); 1628 inputs[index * 2 + 2 + 0] = g.TempImmediate(value);
1629 inputs[index * 2 + 2 + 1] = g.Label(branch); 1629 inputs[index * 2 + 2 + 1] = g.Label(branch);
1630 } 1630 }
1631 Emit(kArchLookupSwitch, 0, nullptr, input_count, inputs, 0, nullptr); 1631 Emit(kArchLookupSwitch, 0, nullptr, input_count, inputs, 0, nullptr);
1632 } 1632 }
1633 1633
1634 void InstructionSelector::VisitStackSlot(Node* node) { 1634 void InstructionSelector::VisitStackSlot(Node* node) {
1635 int size = 1 << ElementSizeLog2Of(StackSlotRepresentationOf(node->op())); 1635 int size = StackSlotSizeOf(node->op());
1636 int slot = frame_->AllocateSpillSlot(size); 1636 int slot = frame_->AllocateSpillSlot(size);
1637 OperandGenerator g(this); 1637 OperandGenerator g(this);
1638 1638
1639 Emit(kArchStackSlot, g.DefineAsRegister(node), 1639 Emit(kArchStackSlot, g.DefineAsRegister(node),
1640 sequence()->AddImmediate(Constant(slot)), 0, nullptr); 1640 sequence()->AddImmediate(Constant(slot)), 0, nullptr);
1641 } 1641 }
1642 1642
1643 void InstructionSelector::VisitBitcastTaggedToWord(Node* node) { 1643 void InstructionSelector::VisitBitcastTaggedToWord(Node* node) {
1644 EmitIdentity(node); 1644 EmitIdentity(node);
1645 } 1645 }
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
2261 return new (instruction_zone()) FrameStateDescriptor( 2261 return new (instruction_zone()) FrameStateDescriptor(
2262 instruction_zone(), state_info.type(), state_info.bailout_id(), 2262 instruction_zone(), state_info.type(), state_info.bailout_id(),
2263 state_info.state_combine(), parameters, locals, stack, 2263 state_info.state_combine(), parameters, locals, stack,
2264 state_info.shared_info(), outer_state); 2264 state_info.shared_info(), outer_state);
2265 } 2265 }
2266 2266
2267 2267
2268 } // namespace compiler 2268 } // namespace compiler
2269 } // namespace internal 2269 } // namespace internal
2270 } // namespace v8 2270 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/frame.h ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698