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 4229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4240 return value; | 4240 return value; |
4241 } | 4241 } |
4242 | 4242 |
4243 // Reconfigure the accessor if attributes mismatch. | 4243 // Reconfigure the accessor if attributes mismatch. |
4244 Handle<ExecutableAccessorInfo> new_data = Accessors::CloneAccessor( | 4244 Handle<ExecutableAccessorInfo> new_data = Accessors::CloneAccessor( |
4245 it.isolate(), Handle<ExecutableAccessorInfo>::cast(accessors)); | 4245 it.isolate(), Handle<ExecutableAccessorInfo>::cast(accessors)); |
4246 new_data->set_property_attributes(attributes); | 4246 new_data->set_property_attributes(attributes); |
4247 // By clearing the setter we don't have to introduce a lookup to | 4247 // By clearing the setter we don't have to introduce a lookup to |
4248 // the setter, simply make it unavailable to reflect the | 4248 // the setter, simply make it unavailable to reflect the |
4249 // attributes. | 4249 // attributes. |
4250 if (attributes & READ_ONLY) new_data->clear_setter(); | 4250 if (attributes & READ_ONLY) { |
| 4251 ExecutableAccessorInfo::ClearSetter(new_data); |
| 4252 } |
4251 SetPropertyCallback(object, name, new_data, attributes); | 4253 SetPropertyCallback(object, name, new_data, attributes); |
4252 if (is_observed) { | 4254 if (is_observed) { |
4253 RETURN_ON_EXCEPTION( | 4255 RETURN_ON_EXCEPTION( |
4254 it.isolate(), | 4256 it.isolate(), |
4255 EnqueueChangeRecord(object, "reconfigure", name, | 4257 EnqueueChangeRecord(object, "reconfigure", name, |
4256 it.isolate()->factory()->the_hole_value()), | 4258 it.isolate()->factory()->the_hole_value()), |
4257 Object); | 4259 Object); |
4258 } | 4260 } |
4259 return value; | 4261 return value; |
4260 } | 4262 } |
(...skipping 12858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17119 // Deopt when transitioning from a constant type. | 17121 // Deopt when transitioning from a constant type. |
17120 if (!invalidate && (old_type != new_type)) { | 17122 if (!invalidate && (old_type != new_type)) { |
17121 auto isolate = dictionary->GetIsolate(); | 17123 auto isolate = dictionary->GetIsolate(); |
17122 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 17124 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
17123 isolate, DependentCode::kPropertyCellChangedGroup); | 17125 isolate, DependentCode::kPropertyCellChangedGroup); |
17124 } | 17126 } |
17125 return value; | 17127 return value; |
17126 } | 17128 } |
17127 | 17129 |
17128 } } // namespace v8::internal | 17130 } } // namespace v8::internal |
OLD | NEW |