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 4047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4058 Maybe<bool> Object::RedefineIncompatibleProperty(Isolate* isolate, | 4058 Maybe<bool> Object::RedefineIncompatibleProperty(Isolate* isolate, |
4059 Handle<Object> name, | 4059 Handle<Object> name, |
4060 Handle<Object> value, | 4060 Handle<Object> value, |
4061 ShouldThrow should_throw) { | 4061 ShouldThrow should_throw) { |
4062 RETURN_FAILURE(isolate, should_throw, | 4062 RETURN_FAILURE(isolate, should_throw, |
4063 NewTypeError(MessageTemplate::kRedefineDisallowed, name)); | 4063 NewTypeError(MessageTemplate::kRedefineDisallowed, name)); |
4064 } | 4064 } |
4065 | 4065 |
4066 | 4066 |
4067 Maybe<bool> Object::SetDataProperty(LookupIterator* it, Handle<Object> value) { | 4067 Maybe<bool> Object::SetDataProperty(LookupIterator* it, Handle<Object> value) { |
4068 // Proxies are handled on the WithHandler path. Other non-JSObjects cannot | 4068 // Proxies are handled elsewhere. Other non-JSObjects cannot have own |
4069 // have own properties. | 4069 // properties. |
4070 Handle<JSObject> receiver = Handle<JSObject>::cast(it->GetReceiver()); | 4070 Handle<JSObject> receiver = Handle<JSObject>::cast(it->GetReceiver()); |
4071 | 4071 |
4072 // Store on the holder which may be hidden behind the receiver. | 4072 // Store on the holder which may be hidden behind the receiver. |
4073 DCHECK(it->HolderIsReceiverOrHiddenPrototype()); | 4073 DCHECK(it->HolderIsReceiverOrHiddenPrototype()); |
4074 | 4074 |
4075 // Old value for the observation change record. | 4075 // Old value for the observation change record. |
4076 // Fetch before transforming the object since the encoding may become | 4076 // Fetch before transforming the object since the encoding may become |
4077 // incompatible with what's cached in |it|. | 4077 // incompatible with what's cached in |it|. |
4078 bool is_observed = receiver->map()->is_observed() && | 4078 bool is_observed = receiver->map()->is_observed() && |
4079 (it->IsElement() || | 4079 (it->IsElement() || |
(...skipping 14975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19055 if (cell->value() != *new_value) { | 19055 if (cell->value() != *new_value) { |
19056 cell->set_value(*new_value); | 19056 cell->set_value(*new_value); |
19057 Isolate* isolate = cell->GetIsolate(); | 19057 Isolate* isolate = cell->GetIsolate(); |
19058 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19058 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19059 isolate, DependentCode::kPropertyCellChangedGroup); | 19059 isolate, DependentCode::kPropertyCellChangedGroup); |
19060 } | 19060 } |
19061 } | 19061 } |
19062 | 19062 |
19063 } // namespace internal | 19063 } // namespace internal |
19064 } // namespace v8 | 19064 } // namespace v8 |
OLD | NEW |