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 7775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7786 JSObject::CollectOwnElementKeys(current, &accumulator, | 7786 JSObject::CollectOwnElementKeys(current, &accumulator, |
7787 static_cast<PropertyAttributes>(DONT_ENUM)); | 7787 static_cast<PropertyAttributes>(DONT_ENUM)); |
7788 | 7788 |
7789 // Add the element keys from the interceptor. | 7789 // Add the element keys from the interceptor. |
7790 if (current->HasIndexedInterceptor()) { | 7790 if (current->HasIndexedInterceptor()) { |
7791 Handle<JSObject> result; | 7791 Handle<JSObject> result; |
7792 if (JSObject::GetKeysForIndexedInterceptor(current, object) | 7792 if (JSObject::GetKeysForIndexedInterceptor(current, object) |
7793 .ToHandle(&result)) { | 7793 .ToHandle(&result)) { |
7794 accumulator.AddElementKeysFromInterceptor(result); | 7794 accumulator.AddElementKeysFromInterceptor(result); |
7795 } | 7795 } |
| 7796 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, FixedArray); |
7796 } | 7797 } |
7797 | 7798 |
7798 if (filter == SKIP_SYMBOLS) { | 7799 if (filter == SKIP_SYMBOLS) { |
7799 // We can cache the computed property keys if access checks are | 7800 // We can cache the computed property keys if access checks are |
7800 // not needed and no interceptors are involved. | 7801 // not needed and no interceptors are involved. |
7801 // | 7802 // |
7802 // We do not use the cache if the object has elements and | 7803 // We do not use the cache if the object has elements and |
7803 // therefore it does not make sense to cache the property names | 7804 // therefore it does not make sense to cache the property names |
7804 // for arguments objects. Arguments objects will always have | 7805 // for arguments objects. Arguments objects will always have |
7805 // elements. | 7806 // elements. |
(...skipping 16 matching lines...) Expand all Loading... |
7822 JSObject::CollectOwnElementKeys(current, &accumulator, attr_filter); | 7823 JSObject::CollectOwnElementKeys(current, &accumulator, attr_filter); |
7823 } | 7824 } |
7824 | 7825 |
7825 // Add the property keys from the interceptor. | 7826 // Add the property keys from the interceptor. |
7826 if (current->HasNamedInterceptor()) { | 7827 if (current->HasNamedInterceptor()) { |
7827 Handle<JSObject> result; | 7828 Handle<JSObject> result; |
7828 if (JSObject::GetKeysForNamedInterceptor(current, object) | 7829 if (JSObject::GetKeysForNamedInterceptor(current, object) |
7829 .ToHandle(&result)) { | 7830 .ToHandle(&result)) { |
7830 accumulator.AddKeys(result); | 7831 accumulator.AddKeys(result); |
7831 } | 7832 } |
| 7833 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, FixedArray); |
7832 } | 7834 } |
7833 } | 7835 } |
7834 | 7836 |
7835 Handle<FixedArray> keys = accumulator.GetKeys(getConversion); | 7837 Handle<FixedArray> keys = accumulator.GetKeys(getConversion); |
7836 DCHECK(ContainsOnlyValidKeys(keys)); | 7838 DCHECK(ContainsOnlyValidKeys(keys)); |
7837 return keys; | 7839 return keys; |
7838 } | 7840 } |
7839 | 7841 |
7840 | 7842 |
7841 bool Map::DictionaryElementsInPrototypeChainOnly() { | 7843 bool Map::DictionaryElementsInPrototypeChainOnly() { |
(...skipping 10008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17850 if (cell->value() != *new_value) { | 17852 if (cell->value() != *new_value) { |
17851 cell->set_value(*new_value); | 17853 cell->set_value(*new_value); |
17852 Isolate* isolate = cell->GetIsolate(); | 17854 Isolate* isolate = cell->GetIsolate(); |
17853 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 17855 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
17854 isolate, DependentCode::kPropertyCellChangedGroup); | 17856 isolate, DependentCode::kPropertyCellChangedGroup); |
17855 } | 17857 } |
17856 } | 17858 } |
17857 | 17859 |
17858 } // namespace internal | 17860 } // namespace internal |
17859 } // namespace v8 | 17861 } // namespace v8 |
OLD | NEW |