OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 13367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13378 } | 13378 } |
13379 | 13379 |
13380 bool SharedFunctionInfo::HasBreakInfo() const { | 13380 bool SharedFunctionInfo::HasBreakInfo() const { |
13381 if (!HasDebugInfo()) return false; | 13381 if (!HasDebugInfo()) return false; |
13382 DebugInfo* info = DebugInfo::cast(debug_info()); | 13382 DebugInfo* info = DebugInfo::cast(debug_info()); |
13383 bool has_break_info = info->HasBreakInfo(); | 13383 bool has_break_info = info->HasBreakInfo(); |
13384 DCHECK_IMPLIES(has_break_info, HasDebugCode()); | 13384 DCHECK_IMPLIES(has_break_info, HasDebugCode()); |
13385 return has_break_info; | 13385 return has_break_info; |
13386 } | 13386 } |
13387 | 13387 |
| 13388 bool SharedFunctionInfo::HasCoverageInfo() const { |
| 13389 if (!HasDebugInfo()) return false; |
| 13390 DebugInfo* info = DebugInfo::cast(debug_info()); |
| 13391 bool has_coverage_info = info->HasCoverageInfo(); |
| 13392 DCHECK_IMPLIES(has_coverage_info, FLAG_block_coverage); |
| 13393 return has_coverage_info; |
| 13394 } |
| 13395 |
13388 DebugInfo* SharedFunctionInfo::GetDebugInfo() const { | 13396 DebugInfo* SharedFunctionInfo::GetDebugInfo() const { |
13389 DCHECK(HasDebugInfo()); | 13397 DCHECK(HasDebugInfo()); |
13390 return DebugInfo::cast(debug_info()); | 13398 return DebugInfo::cast(debug_info()); |
13391 } | 13399 } |
13392 | 13400 |
13393 int SharedFunctionInfo::debugger_hints() const { | 13401 int SharedFunctionInfo::debugger_hints() const { |
13394 if (HasDebugInfo()) return GetDebugInfo()->debugger_hints(); | 13402 if (HasDebugInfo()) return GetDebugInfo()->debugger_hints(); |
13395 return Smi::cast(debug_info())->value(); | 13403 return Smi::cast(debug_info())->value(); |
13396 } | 13404 } |
13397 | 13405 |
(...skipping 7125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20523 // not | 20531 // not |
20524 // depend on this. | 20532 // depend on this. |
20525 return DICTIONARY_ELEMENTS; | 20533 return DICTIONARY_ELEMENTS; |
20526 } | 20534 } |
20527 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20535 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20528 return kind; | 20536 return kind; |
20529 } | 20537 } |
20530 } | 20538 } |
20531 } // namespace internal | 20539 } // namespace internal |
20532 } // namespace v8 | 20540 } // namespace v8 |
OLD | NEW |