| 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 14039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14050 // same distance as the current candidate and the position is higher then | 14050 // same distance as the current candidate and the position is higher then |
| 14051 // this position is the new candidate. | 14051 // this position is the new candidate. |
| 14052 if ((dist < distance) || | 14052 if ((dist < distance) || |
| 14053 (dist == distance && pos > position)) { | 14053 (dist == distance && pos > position)) { |
| 14054 position = pos; | 14054 position = pos; |
| 14055 distance = dist; | 14055 distance = dist; |
| 14056 } | 14056 } |
| 14057 } | 14057 } |
| 14058 it.next(); | 14058 it.next(); |
| 14059 } | 14059 } |
| 14060 DCHECK(kind() == FUNCTION || is_optimized_code() && is_turbofanned() || |
| 14061 is_wasm_code() || position == RelocInfo::kNoPosition); |
| 14060 return position; | 14062 return position; |
| 14061 } | 14063 } |
| 14062 | 14064 |
| 14063 | 14065 |
| 14064 // Same as Code::SourcePosition above except it only looks for statement | 14066 // Same as Code::SourcePosition above except it only looks for statement |
| 14065 // positions. | 14067 // positions. |
| 14066 int Code::SourceStatementPosition(int code_offset) { | 14068 int Code::SourceStatementPosition(int code_offset) { |
| 14067 // First find the position as close as possible using all position | 14069 // First find the position as close as possible using all position |
| 14068 // information. | 14070 // information. |
| 14069 int position = SourcePosition(code_offset); | 14071 int position = SourcePosition(code_offset); |
| (...skipping 5684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19754 if (cell->value() != *new_value) { | 19756 if (cell->value() != *new_value) { |
| 19755 cell->set_value(*new_value); | 19757 cell->set_value(*new_value); |
| 19756 Isolate* isolate = cell->GetIsolate(); | 19758 Isolate* isolate = cell->GetIsolate(); |
| 19757 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19759 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 19758 isolate, DependentCode::kPropertyCellChangedGroup); | 19760 isolate, DependentCode::kPropertyCellChangedGroup); |
| 19759 } | 19761 } |
| 19760 } | 19762 } |
| 19761 | 19763 |
| 19762 } // namespace internal | 19764 } // namespace internal |
| 19763 } // namespace v8 | 19765 } // namespace v8 |
| OLD | NEW |