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 13359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13370 } else { | 13370 } else { |
13371 // Remove shared function info from root array. | 13371 // Remove shared function info from root array. |
13372 Object* list = isolate->heap()->noscript_shared_function_infos(); | 13372 Object* list = isolate->heap()->noscript_shared_function_infos(); |
13373 CHECK(WeakFixedArray::cast(list)->Remove(shared)); | 13373 CHECK(WeakFixedArray::cast(list)->Remove(shared)); |
13374 } | 13374 } |
13375 | 13375 |
13376 // Finally set new script. | 13376 // Finally set new script. |
13377 shared->set_script(*script_object); | 13377 shared->set_script(*script_object); |
13378 } | 13378 } |
13379 | 13379 |
| 13380 bool SharedFunctionInfo::HasBreakInfo() const { |
| 13381 if (!HasDebugInfo()) return false; |
| 13382 DebugInfo* info = DebugInfo::cast(debug_info()); |
| 13383 bool has_break_info = info->HasBreakInfo(); |
| 13384 DCHECK_IMPLIES(has_break_info, HasDebugCode()); |
| 13385 return has_break_info; |
| 13386 } |
| 13387 |
13380 DebugInfo* SharedFunctionInfo::GetDebugInfo() const { | 13388 DebugInfo* SharedFunctionInfo::GetDebugInfo() const { |
13381 DCHECK(HasDebugInfo()); | 13389 DCHECK(HasDebugInfo()); |
13382 return DebugInfo::cast(debug_info()); | 13390 return DebugInfo::cast(debug_info()); |
13383 } | 13391 } |
13384 | 13392 |
13385 int SharedFunctionInfo::debugger_hints() const { | 13393 int SharedFunctionInfo::debugger_hints() const { |
13386 if (HasDebugInfo()) return GetDebugInfo()->debugger_hints(); | 13394 if (HasDebugInfo()) return GetDebugInfo()->debugger_hints(); |
13387 return Smi::cast(debug_info())->value(); | 13395 return Smi::cast(debug_info())->value(); |
13388 } | 13396 } |
13389 | 13397 |
(...skipping 7121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20511 // not | 20519 // not |
20512 // depend on this. | 20520 // depend on this. |
20513 return DICTIONARY_ELEMENTS; | 20521 return DICTIONARY_ELEMENTS; |
20514 } | 20522 } |
20515 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20523 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20516 return kind; | 20524 return kind; |
20517 } | 20525 } |
20518 } | 20526 } |
20519 } // namespace internal | 20527 } // namespace internal |
20520 } // namespace v8 | 20528 } // namespace v8 |
OLD | NEW |