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 <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 7986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7997 dictionary->DetailsAtPut(entry, details); | 7997 dictionary->DetailsAtPut(entry, details); |
7998 } | 7998 } |
7999 | 7999 |
8000 template <> | 8000 template <> |
8001 void DictionaryDetailsAtPut<GlobalDictionary>( | 8001 void DictionaryDetailsAtPut<GlobalDictionary>( |
8002 Isolate* isolate, Handle<GlobalDictionary> dictionary, int entry, | 8002 Isolate* isolate, Handle<GlobalDictionary> dictionary, int entry, |
8003 PropertyDetails details) { | 8003 PropertyDetails details) { |
8004 Object* value = dictionary->ValueAt(entry); | 8004 Object* value = dictionary->ValueAt(entry); |
8005 DCHECK(value->IsPropertyCell()); | 8005 DCHECK(value->IsPropertyCell()); |
8006 value = PropertyCell::cast(value)->value(); | 8006 value = PropertyCell::cast(value)->value(); |
| 8007 if (value->IsTheHole(isolate)) return; |
8007 PropertyCell::PrepareForValue(dictionary, entry, handle(value, isolate), | 8008 PropertyCell::PrepareForValue(dictionary, entry, handle(value, isolate), |
8008 details); | 8009 details); |
8009 } | 8010 } |
8010 | 8011 |
8011 template <typename Dictionary> | 8012 template <typename Dictionary> |
8012 void ApplyAttributesToDictionary(Isolate* isolate, | 8013 void ApplyAttributesToDictionary(Isolate* isolate, |
8013 Handle<Dictionary> dictionary, | 8014 Handle<Dictionary> dictionary, |
8014 const PropertyAttributes attributes) { | 8015 const PropertyAttributes attributes) { |
8015 int capacity = dictionary->Capacity(); | 8016 int capacity = dictionary->Capacity(); |
8016 for (int i = 0; i < capacity; i++) { | 8017 for (int i = 0; i < capacity; i++) { |
(...skipping 12322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20339 // Check if the accessor uses a cached property. | 20340 // Check if the accessor uses a cached property. |
20340 if (!fti->cached_property_name()->IsTheHole(isolate)) { | 20341 if (!fti->cached_property_name()->IsTheHole(isolate)) { |
20341 return handle(Name::cast(fti->cached_property_name())); | 20342 return handle(Name::cast(fti->cached_property_name())); |
20342 } | 20343 } |
20343 } | 20344 } |
20344 return MaybeHandle<Name>(); | 20345 return MaybeHandle<Name>(); |
20345 } | 20346 } |
20346 | 20347 |
20347 } // namespace internal | 20348 } // namespace internal |
20348 } // namespace v8 | 20349 } // namespace v8 |
OLD | NEW |