| 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 18581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18592 | 18592 |
| 18593 debug_info->set_break_points(*new_break_points); | 18593 debug_info->set_break_points(*new_break_points); |
| 18594 for (int i = 0; i < old_break_points->length(); i++) { | 18594 for (int i = 0; i < old_break_points->length(); i++) { |
| 18595 new_break_points->set(i, old_break_points->get(i)); | 18595 new_break_points->set(i, old_break_points->get(i)); |
| 18596 } | 18596 } |
| 18597 index = old_break_points->length(); | 18597 index = old_break_points->length(); |
| 18598 } | 18598 } |
| 18599 DCHECK(index != kNoBreakPointInfo); | 18599 DCHECK(index != kNoBreakPointInfo); |
| 18600 | 18600 |
| 18601 // Allocate new BreakPointInfo object and set the break point. | 18601 // Allocate new BreakPointInfo object and set the break point. |
| 18602 Handle<BreakPointInfo> new_break_point_info = Handle<BreakPointInfo>::cast( | 18602 Handle<BreakPointInfo> new_break_point_info = |
| 18603 isolate->factory()->NewStruct(BREAK_POINT_INFO_TYPE)); | 18603 isolate->factory()->NewBreakPointInfo(source_position); |
| 18604 new_break_point_info->set_source_position(source_position); | |
| 18605 new_break_point_info->set_break_point_objects( | |
| 18606 isolate->heap()->undefined_value()); | |
| 18607 BreakPointInfo::SetBreakPoint(new_break_point_info, break_point_object); | 18604 BreakPointInfo::SetBreakPoint(new_break_point_info, break_point_object); |
| 18608 debug_info->break_points()->set(index, *new_break_point_info); | 18605 debug_info->break_points()->set(index, *new_break_point_info); |
| 18609 } | 18606 } |
| 18610 | 18607 |
| 18611 // Get the break point objects for a source position. | 18608 // Get the break point objects for a source position. |
| 18612 Handle<Object> DebugInfo::GetBreakPointObjects(int source_position) { | 18609 Handle<Object> DebugInfo::GetBreakPointObjects(int source_position) { |
| 18613 Object* break_point_info = GetBreakPointInfo(source_position); | 18610 Object* break_point_info = GetBreakPointInfo(source_position); |
| 18614 Isolate* isolate = GetIsolate(); | 18611 Isolate* isolate = GetIsolate(); |
| 18615 if (break_point_info->IsUndefined(isolate)) { | 18612 if (break_point_info->IsUndefined(isolate)) { |
| 18616 return isolate->factory()->undefined_value(); | 18613 return isolate->factory()->undefined_value(); |
| (...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19919 // depend on this. | 19916 // depend on this. |
| 19920 return DICTIONARY_ELEMENTS; | 19917 return DICTIONARY_ELEMENTS; |
| 19921 } | 19918 } |
| 19922 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 19919 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
| 19923 return kind; | 19920 return kind; |
| 19924 } | 19921 } |
| 19925 } | 19922 } |
| 19926 | 19923 |
| 19927 } // namespace internal | 19924 } // namespace internal |
| 19928 } // namespace v8 | 19925 } // namespace v8 |
| OLD | NEW |