| 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 #ifndef V8_COMPILER_LINKAGE_IMPL_H_ | 5 #ifndef V8_COMPILER_LINKAGE_IMPL_H_ |
| 6 #define V8_COMPILER_LINKAGE_IMPL_H_ | 6 #define V8_COMPILER_LINKAGE_IMPL_H_ |
| 7 | 7 |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/compiler/osr.h" | 9 #include "src/compiler/osr.h" |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 types.AddParam(kMachAnyTagged); | 108 types.AddParam(kMachAnyTagged); |
| 109 | 109 |
| 110 // Add runtime call argument count. | 110 // Add runtime call argument count. |
| 111 locations.AddParam(regloc(LinkageTraits::RuntimeCallArgCountReg())); | 111 locations.AddParam(regloc(LinkageTraits::RuntimeCallArgCountReg())); |
| 112 types.AddParam(kMachPtr); | 112 types.AddParam(kMachPtr); |
| 113 | 113 |
| 114 // Add context. | 114 // Add context. |
| 115 locations.AddParam(regloc(LinkageTraits::ContextReg())); | 115 locations.AddParam(regloc(LinkageTraits::ContextReg())); |
| 116 types.AddParam(kMachAnyTagged); | 116 types.AddParam(kMachAnyTagged); |
| 117 | 117 |
| 118 CallDescriptor::Flags flags = Linkage::NeedsFrameState(function_id) | 118 CallDescriptor::Flags flags = Linkage::FrameStateInputCount(function_id) > 0 |
| 119 ? CallDescriptor::kNeedsFrameState | 119 ? CallDescriptor::kNeedsFrameState |
| 120 : CallDescriptor::kNoFlags; | 120 : CallDescriptor::kNoFlags; |
| 121 | 121 |
| 122 // The target for runtime calls is a code object. | 122 // The target for runtime calls is a code object. |
| 123 MachineType target_type = kMachAnyTagged; | 123 MachineType target_type = kMachAnyTagged; |
| 124 LinkageLocation target_loc = LinkageLocation::AnyRegister(); | 124 LinkageLocation target_loc = LinkageLocation::AnyRegister(); |
| 125 return new (zone) CallDescriptor( // -- | 125 return new (zone) CallDescriptor( // -- |
| 126 CallDescriptor::kCallCodeObject, // kind | 126 CallDescriptor::kCallCodeObject, // kind |
| 127 target_type, // target MachineType | 127 target_type, // target MachineType |
| 128 target_loc, // target location | 128 target_loc, // target location |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 int parameter_index = 1 + index; // skip index 0, which is the target. | 286 int parameter_index = 1 + index; // skip index 0, which is the target. |
| 287 return incoming_->GetInputLocation(parameter_index); | 287 return incoming_->GetInputLocation(parameter_index); |
| 288 } | 288 } |
| 289 } | 289 } |
| 290 | 290 |
| 291 } // namespace compiler | 291 } // namespace compiler |
| 292 } // namespace internal | 292 } // namespace internal |
| 293 } // namespace v8 | 293 } // namespace v8 |
| 294 | 294 |
| 295 #endif // V8_COMPILER_LINKAGE_IMPL_H_ | 295 #endif // V8_COMPILER_LINKAGE_IMPL_H_ |
| OLD | NEW |