Chromium Code Reviews| 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 5458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5469 return code() != builtins->builtin(Builtins::kCompileLazy); | 5469 return code() != builtins->builtin(Builtins::kCompileLazy); |
| 5470 } | 5470 } |
| 5471 | 5471 |
| 5472 | 5472 |
| 5473 bool SharedFunctionInfo::is_simple_parameter_list() { | 5473 bool SharedFunctionInfo::is_simple_parameter_list() { |
| 5474 return scope_info()->IsSimpleParameterList(); | 5474 return scope_info()->IsSimpleParameterList(); |
| 5475 } | 5475 } |
| 5476 | 5476 |
| 5477 | 5477 |
| 5478 bool SharedFunctionInfo::HasDebugInfo() { | 5478 bool SharedFunctionInfo::HasDebugInfo() { |
| 5479 bool has_debug_info = debug_info()->IsStruct(); | 5479 bool has_debug_info = !IsApiFunction() && debug_info()->IsStruct(); |
|
Jakob Kummerow
2015/07/22 12:24:02
I can haz DCHECK(!IsApiFunction()) inside debug_in
| |
| 5480 DCHECK(!has_debug_info || HasDebugCode()); | 5480 DCHECK(!has_debug_info || HasDebugCode()); |
| 5481 return has_debug_info; | 5481 return has_debug_info; |
| 5482 } | 5482 } |
| 5483 | 5483 |
| 5484 | 5484 |
| 5485 DebugInfo* SharedFunctionInfo::GetDebugInfo() { | 5485 DebugInfo* SharedFunctionInfo::GetDebugInfo() { |
| 5486 DCHECK(HasDebugInfo()); | 5486 DCHECK(HasDebugInfo()); |
| 5487 return DebugInfo::cast(debug_info()); | 5487 return DebugInfo::cast(debug_info()); |
| 5488 } | 5488 } |
| 5489 | 5489 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5583 // enough power of 2. | 5583 // enough power of 2. |
| 5584 if (tries >= 16 && (((tries - 1) & tries) == 0)) { | 5584 if (tries >= 16 && (((tries - 1) & tries) == 0)) { |
| 5585 set_optimization_disabled(false); | 5585 set_optimization_disabled(false); |
| 5586 set_opt_count(0); | 5586 set_opt_count(0); |
| 5587 set_deopt_count(0); | 5587 set_deopt_count(0); |
| 5588 } | 5588 } |
| 5589 } | 5589 } |
| 5590 | 5590 |
| 5591 | 5591 |
| 5592 bool SharedFunctionInfo::IsSubjectToDebugging() { | 5592 bool SharedFunctionInfo::IsSubjectToDebugging() { |
| 5593 if (IsApiFunction()) return false; | |
| 5593 Object* script_obj = script(); | 5594 Object* script_obj = script(); |
| 5594 if (script_obj->IsUndefined()) return false; | 5595 if (script_obj->IsUndefined()) return false; |
| 5595 Script* script = Script::cast(script_obj); | 5596 Script* script = Script::cast(script_obj); |
| 5596 Script::Type type = static_cast<Script::Type>(script->type()->value()); | 5597 Script::Type type = static_cast<Script::Type>(script->type()->value()); |
| 5597 return type == Script::TYPE_NORMAL; | 5598 return type == Script::TYPE_NORMAL; |
| 5598 } | 5599 } |
| 5599 | 5600 |
| 5600 | 5601 |
| 5601 bool JSFunction::IsBuiltin() { | 5602 bool JSFunction::IsBuiltin() { |
| 5602 return context()->global_object()->IsJSBuiltinsObject(); | 5603 return context()->global_object()->IsJSBuiltinsObject(); |
| (...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7313 #undef READ_SHORT_FIELD | 7314 #undef READ_SHORT_FIELD |
| 7314 #undef WRITE_SHORT_FIELD | 7315 #undef WRITE_SHORT_FIELD |
| 7315 #undef READ_BYTE_FIELD | 7316 #undef READ_BYTE_FIELD |
| 7316 #undef WRITE_BYTE_FIELD | 7317 #undef WRITE_BYTE_FIELD |
| 7317 #undef NOBARRIER_READ_BYTE_FIELD | 7318 #undef NOBARRIER_READ_BYTE_FIELD |
| 7318 #undef NOBARRIER_WRITE_BYTE_FIELD | 7319 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7319 | 7320 |
| 7320 } } // namespace v8::internal | 7321 } } // namespace v8::internal |
| 7321 | 7322 |
| 7322 #endif // V8_OBJECTS_INL_H_ | 7323 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |