| 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 namespace v8 { | 8 namespace v8 { |
| 9 namespace internal { | 9 namespace internal { |
| 10 namespace compiler { | 10 namespace compiler { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 // TODO(titzer): refactor TurboFan graph to consider context a value input. | 58 // TODO(titzer): refactor TurboFan graph to consider context a value input. |
| 59 return new (zone) | 59 return new (zone) |
| 60 CallDescriptor(CallDescriptor::kCallJSFunction, // kind | 60 CallDescriptor(CallDescriptor::kCallJSFunction, // kind |
| 61 return_count, // return_count | 61 return_count, // return_count |
| 62 parameter_count, // parameter_count | 62 parameter_count, // parameter_count |
| 63 input_count - context_count, // input_count | 63 input_count - context_count, // input_count |
| 64 locations, // locations | 64 locations, // locations |
| 65 Operator::kNoProperties, // properties | 65 Operator::kNoProperties, // properties |
| 66 kNoCalleeSaved, // callee-saved registers | 66 kNoCalleeSaved, // callee-saved registers |
| 67 CallDescriptor::kCanDeoptimize); // deoptimization | 67 CallDescriptor::kLazyDeoptimization); // deoptimization |
| 68 } | 68 } |
| 69 | 69 |
| 70 | 70 |
| 71 // TODO(turbofan): cache call descriptors for runtime calls. | 71 // TODO(turbofan): cache call descriptors for runtime calls. |
| 72 template <typename LinkageTraits> | 72 template <typename LinkageTraits> |
| 73 static CallDescriptor* GetRuntimeCallDescriptor( | 73 static CallDescriptor* GetRuntimeCallDescriptor( |
| 74 Zone* zone, Runtime::FunctionId function_id, int parameter_count, | 74 Zone* zone, Runtime::FunctionId function_id, int parameter_count, |
| 75 Operator::Property properties, | 75 Operator::Property properties, |
| 76 CallDescriptor::DeoptimizationSupport can_deoptimize) { | 76 CallDescriptor::DeoptimizationSupport can_deoptimize) { |
| 77 const int code_count = 1; | 77 const int code_count = 1; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 locations[index++] = LinkageLocation( | 189 locations[index++] = LinkageLocation( |
| 190 param_types[i], | 190 param_types[i], |
| 191 Register::ToAllocationIndex(LinkageTraits::CRegisterParameter(i))); | 191 Register::ToAllocationIndex(LinkageTraits::CRegisterParameter(i))); |
| 192 } | 192 } |
| 193 for (; i < num_params; i++) { | 193 for (; i < num_params; i++) { |
| 194 locations[index++] = LinkageLocation(param_types[i], -1 - i); | 194 locations[index++] = LinkageLocation(param_types[i], -1 - i); |
| 195 } | 195 } |
| 196 return new (zone) CallDescriptor( | 196 return new (zone) CallDescriptor( |
| 197 CallDescriptor::kCallAddress, 1, num_params, num_params + 1, locations, | 197 CallDescriptor::kCallAddress, 1, num_params, num_params + 1, locations, |
| 198 Operator::kNoProperties, LinkageTraits::CCalleeSaveRegisters(), | 198 Operator::kNoProperties, LinkageTraits::CCalleeSaveRegisters(), |
| 199 CallDescriptor::kCannotDeoptimize); // TODO(jarin) should deoptimize! | 199 CallDescriptor::kNoDeoptimization); // TODO(jarin) should deoptimize! |
| 200 } | 200 } |
| 201 }; | 201 }; |
| 202 } | 202 } |
| 203 } | 203 } |
| 204 } // namespace v8::internal::compiler | 204 } // namespace v8::internal::compiler |
| 205 | 205 |
| 206 #endif // V8_COMPILER_LINKAGE_IMPL_H_ | 206 #endif // V8_COMPILER_LINKAGE_IMPL_H_ |
| OLD | NEW |