| 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 <iomanip> | 5 #include <iomanip> |
| 6 #include <sstream> | 6 #include <sstream> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 6328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6339 // Ignore accessors on typed arrays. | 6339 // Ignore accessors on typed arrays. |
| 6340 if (it.IsElement() && (object->HasFixedTypedArrayElements() || | 6340 if (it.IsElement() && (object->HasFixedTypedArrayElements() || |
| 6341 object->HasExternalArrayElements())) { | 6341 object->HasExternalArrayElements())) { |
| 6342 return it.factory()->undefined_value(); | 6342 return it.factory()->undefined_value(); |
| 6343 } | 6343 } |
| 6344 | 6344 |
| 6345 CHECK(GetPropertyAttributes(&it).IsJust()); | 6345 CHECK(GetPropertyAttributes(&it).IsJust()); |
| 6346 | 6346 |
| 6347 // ES5 forbids turning a property into an accessor if it's not | 6347 // ES5 forbids turning a property into an accessor if it's not |
| 6348 // configurable. See 8.6.1 (Table 5). | 6348 // configurable. See 8.6.1 (Table 5). |
| 6349 if (it.IsFound() && (it.IsReadOnly() || !it.IsConfigurable())) { | 6349 if (it.IsFound() && !it.IsConfigurable()) { |
| 6350 return it.factory()->undefined_value(); | 6350 return it.factory()->undefined_value(); |
| 6351 } | 6351 } |
| 6352 | 6352 |
| 6353 it.TransitionToAccessorPair(info, info->property_attributes()); | 6353 it.TransitionToAccessorPair(info, info->property_attributes()); |
| 6354 | 6354 |
| 6355 return object; | 6355 return object; |
| 6356 } | 6356 } |
| 6357 | 6357 |
| 6358 | 6358 |
| 6359 MaybeHandle<Object> JSObject::GetAccessor(Handle<JSObject> object, | 6359 MaybeHandle<Object> JSObject::GetAccessor(Handle<JSObject> object, |
| (...skipping 9578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15938 Handle<Object> new_value) { | 15938 Handle<Object> new_value) { |
| 15939 if (cell->value() != *new_value) { | 15939 if (cell->value() != *new_value) { |
| 15940 cell->set_value(*new_value); | 15940 cell->set_value(*new_value); |
| 15941 Isolate* isolate = cell->GetIsolate(); | 15941 Isolate* isolate = cell->GetIsolate(); |
| 15942 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 15942 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 15943 isolate, DependentCode::kPropertyCellChangedGroup); | 15943 isolate, DependentCode::kPropertyCellChangedGroup); |
| 15944 } | 15944 } |
| 15945 } | 15945 } |
| 15946 } // namespace internal | 15946 } // namespace internal |
| 15947 } // namespace v8 | 15947 } // namespace v8 |
| OLD | NEW |