OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |