| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 return LinkageLocation::ForCalleeFrameSlot(spill_index); | 525 return LinkageLocation::ForCalleeFrameSlot(spill_index); |
| 526 } else { | 526 } else { |
| 527 // Parameter. Use the assigned location from the incoming call descriptor. | 527 // Parameter. Use the assigned location from the incoming call descriptor. |
| 528 int parameter_index = 1 + index; // skip index 0, which is the target. | 528 int parameter_index = 1 + index; // skip index 0, which is the target. |
| 529 return incoming_->GetInputLocation(parameter_index); | 529 return incoming_->GetInputLocation(parameter_index); |
| 530 } | 530 } |
| 531 } | 531 } |
| 532 } // namespace compiler | 532 } // namespace compiler |
| 533 } // namespace internal | 533 } // namespace internal |
| 534 } // namespace v8 | 534 } // namespace v8 |
| OLD | NEW |