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() || | 14060 DCHECK(kind() == FUNCTION || (is_optimized_code() && is_turbofanned()) || |
14061 is_wasm_code() || position == RelocInfo::kNoPosition); | 14061 is_wasm_code() || position == RelocInfo::kNoPosition); |
14062 return position; | 14062 return position; |
14063 } | 14063 } |
14064 | 14064 |
14065 | 14065 |
14066 // Same as Code::SourcePosition above except it only looks for statement | 14066 // Same as Code::SourcePosition above except it only looks for statement |
14067 // positions. | 14067 // positions. |
14068 int Code::SourceStatementPosition(int code_offset) { | 14068 int Code::SourceStatementPosition(int code_offset) { |
14069 // First find the position as close as possible using all position | 14069 // First find the position as close as possible using all position |
14070 // information. | 14070 // information. |
(...skipping 5685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19756 if (cell->value() != *new_value) { | 19756 if (cell->value() != *new_value) { |
19757 cell->set_value(*new_value); | 19757 cell->set_value(*new_value); |
19758 Isolate* isolate = cell->GetIsolate(); | 19758 Isolate* isolate = cell->GetIsolate(); |
19759 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19759 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19760 isolate, DependentCode::kPropertyCellChangedGroup); | 19760 isolate, DependentCode::kPropertyCellChangedGroup); |
19761 } | 19761 } |
19762 } | 19762 } |
19763 | 19763 |
19764 } // namespace internal | 19764 } // namespace internal |
19765 } // namespace v8 | 19765 } // namespace v8 |
OLD | NEW |