Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 7747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7758 bool preexists = false; | 7758 bool preexists = false; |
| 7759 if (is_observed) { | 7759 if (is_observed) { |
| 7760 CHECK(GetPropertyAttributes(it).IsJust()); | 7760 CHECK(GetPropertyAttributes(it).IsJust()); |
| 7761 preexists = it->IsFound(); | 7761 preexists = it->IsFound(); |
| 7762 if (preexists && (it->state() == LookupIterator::DATA || | 7762 if (preexists && (it->state() == LookupIterator::DATA || |
| 7763 it->GetAccessors()->IsAccessorInfo())) { | 7763 it->GetAccessors()->IsAccessorInfo())) { |
| 7764 old_value = GetProperty(it).ToHandleChecked(); | 7764 old_value = GetProperty(it).ToHandleChecked(); |
| 7765 } | 7765 } |
| 7766 } | 7766 } |
| 7767 | 7767 |
| 7768 DCHECK(getter->IsCallable() || getter->IsUndefined() || getter->IsNull()); | 7768 DCHECK(getter->IsCallable() || getter->IsUndefined() || getter->IsNull() || |
| 7769 DCHECK(setter->IsCallable() || setter->IsUndefined() || setter->IsNull()); | 7769 getter->IsCode()); |
|
Benedikt Meurer
2015/11/12 04:31:21
This will be hard to maintain everywhere. AFAIR th
epertoso
2015/11/13 01:39:28
Actually we don't need it, at this point the Funct
| |
| 7770 DCHECK(setter->IsCallable() || setter->IsUndefined() || setter->IsNull() || | |
| 7771 setter->IsCode()); | |
| 7770 // At least one of the accessors needs to be a new value. | 7772 // At least one of the accessors needs to be a new value. |
| 7771 DCHECK(!getter->IsNull() || !setter->IsNull()); | 7773 DCHECK(!getter->IsNull() || !setter->IsNull()); |
| 7772 if (!getter->IsNull()) { | 7774 if (!getter->IsNull()) { |
| 7773 it->TransitionToAccessorProperty(ACCESSOR_GETTER, getter, attributes); | 7775 it->TransitionToAccessorProperty(ACCESSOR_GETTER, getter, attributes); |
| 7774 } | 7776 } |
| 7775 if (!setter->IsNull()) { | 7777 if (!setter->IsNull()) { |
| 7776 it->TransitionToAccessorProperty(ACCESSOR_SETTER, setter, attributes); | 7778 it->TransitionToAccessorProperty(ACCESSOR_SETTER, setter, attributes); |
| 7777 } | 7779 } |
| 7778 | 7780 |
| 7779 if (is_observed) { | 7781 if (is_observed) { |
| (...skipping 10121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 17901 if (cell->value() != *new_value) { | 17903 if (cell->value() != *new_value) { |
| 17902 cell->set_value(*new_value); | 17904 cell->set_value(*new_value); |
| 17903 Isolate* isolate = cell->GetIsolate(); | 17905 Isolate* isolate = cell->GetIsolate(); |
| 17904 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 17906 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 17905 isolate, DependentCode::kPropertyCellChangedGroup); | 17907 isolate, DependentCode::kPropertyCellChangedGroup); |
| 17906 } | 17908 } |
| 17907 } | 17909 } |
| 17908 | 17910 |
| 17909 } // namespace internal | 17911 } // namespace internal |
| 17910 } // namespace v8 | 17912 } // namespace v8 |
| OLD | NEW |