| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::kNoFlags); // TODO(jarin) should deoptimize! | 199 CallDescriptor::kNoFlags); // TODO(jarin) should deoptimize! |
| 200 } | 200 } |
| 201 }; | 201 }; |
| 202 | |
| 203 | |
| 204 bool Linkage::NeedsFrameState(Runtime::FunctionId function) { | |
| 205 if (!FLAG_turbo_deoptimization) { | |
| 206 return false; | |
| 207 } | |
| 208 // TODO(jarin) At the moment, we only add frame state for | |
| 209 // few chosen runtime functions. | |
| 210 switch (function) { | |
| 211 case Runtime::kDebugBreak: | |
| 212 case Runtime::kDeoptimizeFunction: | |
| 213 case Runtime::kSetScriptBreakPoint: | |
| 214 case Runtime::kDebugGetLoadedScripts: | |
| 215 case Runtime::kStackGuard: | |
| 216 return true; | |
| 217 default: | |
| 218 return false; | |
| 219 } | |
| 220 } | |
| 221 | |
| 222 } // namespace compiler | 202 } // namespace compiler |
| 223 } // namespace internal | 203 } // namespace internal |
| 224 } // namespace v8 | 204 } // namespace v8 |
| 225 | 205 |
| 226 #endif // V8_COMPILER_LINKAGE_IMPL_H_ | 206 #endif // V8_COMPILER_LINKAGE_IMPL_H_ |
| OLD | NEW |