OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 5444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5455 DCHECK(code() != builtins->builtin(Builtins::kCompileOptimized)); | 5455 DCHECK(code() != builtins->builtin(Builtins::kCompileOptimized)); |
5456 return code() != builtins->builtin(Builtins::kCompileLazy); | 5456 return code() != builtins->builtin(Builtins::kCompileLazy); |
5457 } | 5457 } |
5458 | 5458 |
5459 | 5459 |
5460 bool SharedFunctionInfo::is_simple_parameter_list() { | 5460 bool SharedFunctionInfo::is_simple_parameter_list() { |
5461 return scope_info()->IsSimpleParameterList(); | 5461 return scope_info()->IsSimpleParameterList(); |
5462 } | 5462 } |
5463 | 5463 |
5464 | 5464 |
| 5465 bool SharedFunctionInfo::HasDebugInfo() { |
| 5466 bool has_debug_info = debug_info()->IsStruct(); |
| 5467 DCHECK(!has_debug_info || HasDebugCode()); |
| 5468 return has_debug_info; |
| 5469 } |
| 5470 |
| 5471 |
| 5472 DebugInfo* SharedFunctionInfo::GetDebugInfo() { |
| 5473 DCHECK(HasDebugInfo()); |
| 5474 return DebugInfo::cast(debug_info()); |
| 5475 } |
| 5476 |
| 5477 |
| 5478 bool SharedFunctionInfo::HasDebugCode() { |
| 5479 return code()->kind() == Code::FUNCTION && code()->has_debug_break_slots(); |
| 5480 } |
| 5481 |
| 5482 |
5465 bool SharedFunctionInfo::IsApiFunction() { | 5483 bool SharedFunctionInfo::IsApiFunction() { |
5466 return function_data()->IsFunctionTemplateInfo(); | 5484 return function_data()->IsFunctionTemplateInfo(); |
5467 } | 5485 } |
5468 | 5486 |
5469 | 5487 |
5470 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { | 5488 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { |
5471 DCHECK(IsApiFunction()); | 5489 DCHECK(IsApiFunction()); |
5472 return FunctionTemplateInfo::cast(function_data()); | 5490 return FunctionTemplateInfo::cast(function_data()); |
5473 } | 5491 } |
5474 | 5492 |
(...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7282 #undef READ_SHORT_FIELD | 7300 #undef READ_SHORT_FIELD |
7283 #undef WRITE_SHORT_FIELD | 7301 #undef WRITE_SHORT_FIELD |
7284 #undef READ_BYTE_FIELD | 7302 #undef READ_BYTE_FIELD |
7285 #undef WRITE_BYTE_FIELD | 7303 #undef WRITE_BYTE_FIELD |
7286 #undef NOBARRIER_READ_BYTE_FIELD | 7304 #undef NOBARRIER_READ_BYTE_FIELD |
7287 #undef NOBARRIER_WRITE_BYTE_FIELD | 7305 #undef NOBARRIER_WRITE_BYTE_FIELD |
7288 | 7306 |
7289 } } // namespace v8::internal | 7307 } } // namespace v8::internal |
7290 | 7308 |
7291 #endif // V8_OBJECTS_INL_H_ | 7309 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |