OLD | NEW |
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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 #include "src/compiler.h" | 6 #include "src/compiler.h" |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 #include "src/compiler/frame.h" | 8 #include "src/compiler/frame.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/node.h" | 10 #include "src/compiler/node.h" |
11 #include "src/compiler/osr.h" | 11 #include "src/compiler/osr.h" |
12 #include "src/compiler/pipeline.h" | 12 #include "src/compiler/pipeline.h" |
13 #include "src/scopes.h" | 13 #include "src/scopes.h" |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 namespace compiler { | 17 namespace compiler { |
18 | 18 |
19 namespace { | 19 namespace { |
20 LinkageLocation regloc(Register reg) { | 20 LinkageLocation regloc(Register reg) { |
21 return LinkageLocation::ForRegister(reg.code()); | 21 return LinkageLocation::ForRegister(Register::ToAllocationIndex(reg)); |
22 } | 22 } |
23 | 23 |
24 | 24 |
25 MachineType reptyp(Representation representation) { | 25 MachineType reptyp(Representation representation) { |
26 switch (representation.kind()) { | 26 switch (representation.kind()) { |
27 case Representation::kInteger8: | 27 case Representation::kInteger8: |
28 return kMachInt8; | 28 return kMachInt8; |
29 case Representation::kUInteger8: | 29 case Representation::kUInteger8: |
30 return kMachUint8; | 30 return kMachUint8; |
31 case Representation::kInteger16: | 31 case Representation::kInteger16: |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 return LinkageLocation::ForCalleeFrameSlot(spill_index); | 523 return LinkageLocation::ForCalleeFrameSlot(spill_index); |
524 } else { | 524 } else { |
525 // Parameter. Use the assigned location from the incoming call descriptor. | 525 // Parameter. Use the assigned location from the incoming call descriptor. |
526 int parameter_index = 1 + index; // skip index 0, which is the target. | 526 int parameter_index = 1 + index; // skip index 0, which is the target. |
527 return incoming_->GetInputLocation(parameter_index); | 527 return incoming_->GetInputLocation(parameter_index); |
528 } | 528 } |
529 } | 529 } |
530 } // namespace compiler | 530 } // namespace compiler |
531 } // namespace internal | 531 } // namespace internal |
532 } // namespace v8 | 532 } // namespace v8 |
OLD | NEW |