| 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 4239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4250 // property. | 4250 // property. |
| 4251 | 4251 |
| 4252 ShouldThrow should_throw = | 4252 ShouldThrow should_throw = |
| 4253 is_sloppy(language_mode) ? DONT_THROW : THROW_ON_ERROR; | 4253 is_sloppy(language_mode) ? DONT_THROW : THROW_ON_ERROR; |
| 4254 | 4254 |
| 4255 if (!it->GetReceiver()->IsJSReceiver()) { | 4255 if (!it->GetReceiver()->IsJSReceiver()) { |
| 4256 return WriteToReadOnlyProperty(it, value, should_throw); | 4256 return WriteToReadOnlyProperty(it, value, should_throw); |
| 4257 } | 4257 } |
| 4258 Handle<JSReceiver> receiver = Handle<JSReceiver>::cast(it->GetReceiver()); | 4258 Handle<JSReceiver> receiver = Handle<JSReceiver>::cast(it->GetReceiver()); |
| 4259 | 4259 |
| 4260 LookupIterator::Configuration c = LookupIterator::OWN; | 4260 LookupIterator::Configuration c = LookupIterator::HIDDEN; |
| 4261 LookupIterator own_lookup = | 4261 LookupIterator own_lookup = |
| 4262 it->IsElement() ? LookupIterator(isolate, receiver, it->index(), c) | 4262 it->IsElement() ? LookupIterator(isolate, receiver, it->index(), c) |
| 4263 : LookupIterator(receiver, it->name(), c); | 4263 : LookupIterator(receiver, it->name(), c); |
| 4264 | 4264 |
| 4265 for (; own_lookup.IsFound(); own_lookup.Next()) { | 4265 for (; own_lookup.IsFound(); own_lookup.Next()) { |
| 4266 switch (own_lookup.state()) { | 4266 switch (own_lookup.state()) { |
| 4267 case LookupIterator::ACCESS_CHECK: | 4267 case LookupIterator::ACCESS_CHECK: |
| 4268 if (!own_lookup.HasAccess()) { | 4268 if (!own_lookup.HasAccess()) { |
| 4269 return JSObject::SetPropertyWithFailedAccessCheck(&own_lookup, value, | 4269 return JSObject::SetPropertyWithFailedAccessCheck(&own_lookup, value, |
| 4270 should_throw); | 4270 should_throw); |
| (...skipping 15498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19769 if (cell->value() != *new_value) { | 19769 if (cell->value() != *new_value) { |
| 19770 cell->set_value(*new_value); | 19770 cell->set_value(*new_value); |
| 19771 Isolate* isolate = cell->GetIsolate(); | 19771 Isolate* isolate = cell->GetIsolate(); |
| 19772 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19772 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 19773 isolate, DependentCode::kPropertyCellChangedGroup); | 19773 isolate, DependentCode::kPropertyCellChangedGroup); |
| 19774 } | 19774 } |
| 19775 } | 19775 } |
| 19776 | 19776 |
| 19777 } // namespace internal | 19777 } // namespace internal |
| 19778 } // namespace v8 | 19778 } // namespace v8 |
| OLD | NEW |