| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 17508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17519 PropertyDetails details = dictionary->DetailsAt(i); | 17519 PropertyDetails details = dictionary->DetailsAt(i); |
| 17520 if (details.IsDontEnum()) { | 17520 if (details.IsDontEnum()) { |
| 17521 if (mode == KeyCollectionMode::kIncludePrototypes) { | 17521 if (mode == KeyCollectionMode::kIncludePrototypes) { |
| 17522 is_shadowing_key = true; | 17522 is_shadowing_key = true; |
| 17523 } else { | 17523 } else { |
| 17524 continue; | 17524 continue; |
| 17525 } | 17525 } |
| 17526 } | 17526 } |
| 17527 if (dictionary->IsDeleted(i)) continue; | 17527 if (dictionary->IsDeleted(i)) continue; |
| 17528 if (is_shadowing_key) { | 17528 if (is_shadowing_key) { |
| 17529 accumulator->AddShadowKey(key); | 17529 accumulator->AddShadowingKey(key); |
| 17530 continue; | 17530 continue; |
| 17531 } else { | 17531 } else { |
| 17532 storage->set(properties, Smi::FromInt(i)); | 17532 storage->set(properties, Smi::FromInt(i)); |
| 17533 } | 17533 } |
| 17534 properties++; | 17534 properties++; |
| 17535 if (properties == length) break; | 17535 if (properties == length) break; |
| 17536 } | 17536 } |
| 17537 | 17537 |
| 17538 CHECK_EQ(length, properties); | 17538 CHECK_EQ(length, properties); |
| 17539 DisallowHeapAllocation no_gc; | 17539 DisallowHeapAllocation no_gc; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 17559 PropertyFilter filter = keys->filter(); | 17559 PropertyFilter filter = keys->filter(); |
| 17560 { | 17560 { |
| 17561 DisallowHeapAllocation no_gc; | 17561 DisallowHeapAllocation no_gc; |
| 17562 Dictionary<Derived, Shape, Key>* raw_dict = *dictionary; | 17562 Dictionary<Derived, Shape, Key>* raw_dict = *dictionary; |
| 17563 for (int i = 0; i < capacity; i++) { | 17563 for (int i = 0; i < capacity; i++) { |
| 17564 Object* k = raw_dict->KeyAt(i); | 17564 Object* k = raw_dict->KeyAt(i); |
| 17565 if (!raw_dict->IsKey(isolate, k) || k->FilterKey(filter)) continue; | 17565 if (!raw_dict->IsKey(isolate, k) || k->FilterKey(filter)) continue; |
| 17566 if (raw_dict->IsDeleted(i)) continue; | 17566 if (raw_dict->IsDeleted(i)) continue; |
| 17567 PropertyDetails details = raw_dict->DetailsAt(i); | 17567 PropertyDetails details = raw_dict->DetailsAt(i); |
| 17568 if ((details.attributes() & filter) != 0) { | 17568 if ((details.attributes() & filter) != 0) { |
| 17569 keys->AddShadowKey(k); | 17569 keys->AddShadowingKey(k); |
| 17570 continue; | 17570 continue; |
| 17571 } | 17571 } |
| 17572 if (filter & ONLY_ALL_CAN_READ) { | 17572 if (filter & ONLY_ALL_CAN_READ) { |
| 17573 if (details.kind() != kAccessor) continue; | 17573 if (details.kind() != kAccessor) continue; |
| 17574 Object* accessors = raw_dict->ValueAt(i); | 17574 Object* accessors = raw_dict->ValueAt(i); |
| 17575 if (accessors->IsPropertyCell()) { | 17575 if (accessors->IsPropertyCell()) { |
| 17576 accessors = PropertyCell::cast(accessors)->value(); | 17576 accessors = PropertyCell::cast(accessors)->value(); |
| 17577 } | 17577 } |
| 17578 if (!accessors->IsAccessorInfo()) continue; | 17578 if (!accessors->IsAccessorInfo()) continue; |
| 17579 if (!AccessorInfo::cast(accessors)->all_can_read()) continue; | 17579 if (!AccessorInfo::cast(accessors)->all_can_read()) continue; |
| (...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18934 | 18934 |
| 18935 Object* data_obj = | 18935 Object* data_obj = |
| 18936 constructor->shared()->get_api_func_data()->access_check_info(); | 18936 constructor->shared()->get_api_func_data()->access_check_info(); |
| 18937 if (data_obj->IsUndefined(isolate)) return nullptr; | 18937 if (data_obj->IsUndefined(isolate)) return nullptr; |
| 18938 | 18938 |
| 18939 return AccessCheckInfo::cast(data_obj); | 18939 return AccessCheckInfo::cast(data_obj); |
| 18940 } | 18940 } |
| 18941 | 18941 |
| 18942 } // namespace internal | 18942 } // namespace internal |
| 18943 } // namespace v8 | 18943 } // namespace v8 |
| OLD | NEW |