| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 3876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3887 } | 3887 } |
| 3888 | 3888 |
| 3889 | 3889 |
| 3890 // Reconfigures a property to a data property with attributes, even if it is not | 3890 // Reconfigures a property to a data property with attributes, even if it is not |
| 3891 // reconfigurable. | 3891 // reconfigurable. |
| 3892 MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes( | 3892 MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes( |
| 3893 Handle<JSObject> object, | 3893 Handle<JSObject> object, |
| 3894 Handle<Name> name, | 3894 Handle<Name> name, |
| 3895 Handle<Object> value, | 3895 Handle<Object> value, |
| 3896 PropertyAttributes attributes, | 3896 PropertyAttributes attributes, |
| 3897 StoreFromKeyed store_from_keyed, | |
| 3898 ExecutableAccessorInfoHandling handling) { | 3897 ExecutableAccessorInfoHandling handling) { |
| 3899 DCHECK(!value->IsTheHole()); | 3898 DCHECK(!value->IsTheHole()); |
| 3900 LookupIterator it(object, name, LookupIterator::CHECK_HIDDEN_ACCESS); | 3899 LookupIterator it(object, name, LookupIterator::CHECK_HIDDEN_ACCESS); |
| 3901 bool is_observed = object->map()->is_observed() && | 3900 bool is_observed = object->map()->is_observed() && |
| 3902 *name != it.isolate()->heap()->hidden_string(); | 3901 *name != it.isolate()->heap()->hidden_string(); |
| 3903 for (; it.IsFound(); it.Next()) { | 3902 for (; it.IsFound(); it.Next()) { |
| 3904 switch (it.state()) { | 3903 switch (it.state()) { |
| 3905 case LookupIterator::NOT_FOUND: | 3904 case LookupIterator::NOT_FOUND: |
| 3906 case LookupIterator::JSPROXY: | 3905 case LookupIterator::JSPROXY: |
| 3907 case LookupIterator::INTERCEPTOR: | 3906 case LookupIterator::INTERCEPTOR: |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4005 old_value = it.isolate()->factory()->the_hole_value(); | 4004 old_value = it.isolate()->factory()->the_hole_value(); |
| 4006 } | 4005 } |
| 4007 EnqueueChangeRecord(object, "reconfigure", name, old_value); | 4006 EnqueueChangeRecord(object, "reconfigure", name, old_value); |
| 4008 } | 4007 } |
| 4009 | 4008 |
| 4010 return value; | 4009 return value; |
| 4011 } | 4010 } |
| 4012 } | 4011 } |
| 4013 } | 4012 } |
| 4014 | 4013 |
| 4015 return AddDataProperty(&it, value, attributes, STRICT, store_from_keyed); | 4014 return AddDataProperty(&it, value, attributes, STRICT, |
| 4015 CERTAINLY_NOT_STORE_FROM_KEYED); |
| 4016 } | 4016 } |
| 4017 | 4017 |
| 4018 | 4018 |
| 4019 Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithInterceptor( | 4019 Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithInterceptor( |
| 4020 Handle<JSObject> holder, | 4020 Handle<JSObject> holder, |
| 4021 Handle<Object> receiver, | 4021 Handle<Object> receiver, |
| 4022 Handle<Name> name) { | 4022 Handle<Name> name) { |
| 4023 // TODO(rossberg): Support symbols in the API. | 4023 // TODO(rossberg): Support symbols in the API. |
| 4024 if (name->IsSymbol()) return maybe(ABSENT); | 4024 if (name->IsSymbol()) return maybe(ABSENT); |
| 4025 | 4025 |
| (...skipping 12653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16679 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16679 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16680 static const char* error_messages_[] = { | 16680 static const char* error_messages_[] = { |
| 16681 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16681 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16682 }; | 16682 }; |
| 16683 #undef ERROR_MESSAGES_TEXTS | 16683 #undef ERROR_MESSAGES_TEXTS |
| 16684 return error_messages_[reason]; | 16684 return error_messages_[reason]; |
| 16685 } | 16685 } |
| 16686 | 16686 |
| 16687 | 16687 |
| 16688 } } // namespace v8::internal | 16688 } } // namespace v8::internal |
| OLD | NEW |