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

Side by Side Diff: src/compiler/x64/code-generator-x64.cc

Issue 1050803002: [turbofan] cleanup InstructionOperand a little (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 8 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/register-allocator-verifier.cc ('k') | src/flag-definitions.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 26 matching lines...) Expand all
37 37
38 Operand OutputOperand() { return ToOperand(instr_->Output()); } 38 Operand OutputOperand() { return ToOperand(instr_->Output()); }
39 39
40 Immediate ToImmediate(InstructionOperand* operand) { 40 Immediate ToImmediate(InstructionOperand* operand) {
41 return Immediate(ToConstant(operand).ToInt32()); 41 return Immediate(ToConstant(operand).ToInt32());
42 } 42 }
43 43
44 Operand ToOperand(InstructionOperand* op, int extra = 0) { 44 Operand ToOperand(InstructionOperand* op, int extra = 0) {
45 DCHECK(op->IsStackSlot() || op->IsDoubleStackSlot()); 45 DCHECK(op->IsStackSlot() || op->IsDoubleStackSlot());
46 // The linkage computes where all spill slots are located. 46 // The linkage computes where all spill slots are located.
47 FrameOffset offset = linkage()->GetFrameOffset(op->index(), frame(), extra); 47 FrameOffset offset = linkage()->GetFrameOffset(
48 AllocatedOperand::cast(op)->index(), frame(), extra);
48 return Operand(offset.from_stack_pointer() ? rsp : rbp, offset.offset()); 49 return Operand(offset.from_stack_pointer() ? rsp : rbp, offset.offset());
49 } 50 }
50 51
51 static size_t NextOffset(size_t* offset) { 52 static size_t NextOffset(size_t* offset) {
52 size_t i = *offset; 53 size_t i = *offset;
53 (*offset)++; 54 (*offset)++;
54 return i; 55 return i;
55 } 56 }
56 57
57 static ScaleFactor ScaleFor(AddressingMode one, AddressingMode mode) { 58 static ScaleFactor ScaleFor(AddressingMode one, AddressingMode mode) {
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 } 1593 }
1593 } 1594 }
1594 MarkLazyDeoptSite(); 1595 MarkLazyDeoptSite();
1595 } 1596 }
1596 1597
1597 #undef __ 1598 #undef __
1598 1599
1599 } // namespace internal 1600 } // namespace internal
1600 } // namespace compiler 1601 } // namespace compiler
1601 } // namespace v8 1602 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/register-allocator-verifier.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698