| 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 18845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18856 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, | 18856 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, |
| 18857 Handle<Object> new_value) { | 18857 Handle<Object> new_value) { |
| 18858 if (cell->value() != *new_value) { | 18858 if (cell->value() != *new_value) { |
| 18859 cell->set_value(*new_value); | 18859 cell->set_value(*new_value); |
| 18860 Isolate* isolate = cell->GetIsolate(); | 18860 Isolate* isolate = cell->GetIsolate(); |
| 18861 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18861 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 18862 isolate, DependentCode::kPropertyCellChangedGroup); | 18862 isolate, DependentCode::kPropertyCellChangedGroup); |
| 18863 } | 18863 } |
| 18864 } | 18864 } |
| 18865 | 18865 |
| 18866 int JSGeneratorObject::source_position() const { |
| 18867 CHECK(is_suspended()); |
| 18868 if (function()->shared()->HasBytecodeArray()) { |
| 18869 // New-style generators. |
| 18870 int offset = Smi::cast(input_or_debug_pos())->value(); |
| 18871 // The stored bytecode offset is relative to a different base than what |
| 18872 // is used in the source position table, hence the subtraction. |
| 18873 offset -= BytecodeArray::kHeaderSize - kHeapObjectTag; |
| 18874 return function()->shared()->bytecode_array()->SourcePosition(offset); |
| 18875 } else { |
| 18876 // Old-style generators. |
| 18877 int offset = continuation(); |
| 18878 CHECK(0 <= offset && offset < function()->code()->instruction_size()); |
| 18879 return function()->code()->SourcePosition(offset); |
| 18880 } |
| 18881 } |
| 18882 |
| 18866 } // namespace internal | 18883 } // namespace internal |
| 18867 } // namespace v8 | 18884 } // namespace v8 |
| OLD | NEW |