| 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 <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 12749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12760 SMI_VALUE(ends->get(info->line - 1)) < position); | 12760 SMI_VALUE(ends->get(info->line - 1)) < position); |
| 12761 info->line_start = SMI_VALUE(ends->get(info->line - 1)) + 1; | 12761 info->line_start = SMI_VALUE(ends->get(info->line - 1)) + 1; |
| 12762 info->column = position - info->line_start; | 12762 info->column = position - info->line_start; |
| 12763 } | 12763 } |
| 12764 | 12764 |
| 12765 // Line end is position of the linebreak character. | 12765 // Line end is position of the linebreak character. |
| 12766 info->line_end = SMI_VALUE(ends->get(info->line)); | 12766 info->line_end = SMI_VALUE(ends->get(info->line)); |
| 12767 if (info->line_end > 0) { | 12767 if (info->line_end > 0) { |
| 12768 DCHECK(script->source()->IsString()); | 12768 DCHECK(script->source()->IsString()); |
| 12769 Handle<String> src(String::cast(script->source())); | 12769 Handle<String> src(String::cast(script->source())); |
| 12770 if (src->Get(info->line_end - 1) == '\r') { | 12770 if (src->length() >= info->line_end && |
| 12771 src->Get(info->line_end - 1) == '\r') { |
| 12771 info->line_end--; | 12772 info->line_end--; |
| 12772 } | 12773 } |
| 12773 } | 12774 } |
| 12774 | 12775 |
| 12775 // Add offsets if requested. | 12776 // Add offsets if requested. |
| 12776 if (offset_flag == WITH_OFFSET) { | 12777 if (offset_flag == WITH_OFFSET) { |
| 12777 if (info->line == 0) { | 12778 if (info->line == 0) { |
| 12778 info->column += script->column_offset(); | 12779 info->column += script->column_offset(); |
| 12779 } | 12780 } |
| 12780 info->line += script->line_offset(); | 12781 info->line += script->line_offset(); |
| (...skipping 6077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18858 if (cell->value() != *new_value) { | 18859 if (cell->value() != *new_value) { |
| 18859 cell->set_value(*new_value); | 18860 cell->set_value(*new_value); |
| 18860 Isolate* isolate = cell->GetIsolate(); | 18861 Isolate* isolate = cell->GetIsolate(); |
| 18861 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18862 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 18862 isolate, DependentCode::kPropertyCellChangedGroup); | 18863 isolate, DependentCode::kPropertyCellChangedGroup); |
| 18863 } | 18864 } |
| 18864 } | 18865 } |
| 18865 | 18866 |
| 18866 } // namespace internal | 18867 } // namespace internal |
| 18867 } // namespace v8 | 18868 } // namespace v8 |
| OLD | NEW |