Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: src/bootstrapper.cc

Issue 1156993018: GlobalDictionary now stores PropertyDetails in PropertyCells. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/heap-snapshot-generator.cc » ('j') | src/objects-inl.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2855 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 for (int i = 0; i < capacity; i++) { 2866 for (int i = 0; i < capacity; i++) {
2867 Object* raw_key(properties->KeyAt(i)); 2867 Object* raw_key(properties->KeyAt(i));
2868 if (properties->IsKey(raw_key)) { 2868 if (properties->IsKey(raw_key)) {
2869 DCHECK(raw_key->IsName()); 2869 DCHECK(raw_key->IsName());
2870 // If the property is already there we skip it. 2870 // If the property is already there we skip it.
2871 Handle<Name> key(Name::cast(raw_key)); 2871 Handle<Name> key(Name::cast(raw_key));
2872 LookupIterator it(to, key, LookupIterator::OWN_SKIP_INTERCEPTOR); 2872 LookupIterator it(to, key, LookupIterator::OWN_SKIP_INTERCEPTOR);
2873 CHECK_NE(LookupIterator::ACCESS_CHECK, it.state()); 2873 CHECK_NE(LookupIterator::ACCESS_CHECK, it.state());
2874 if (it.IsFound()) continue; 2874 if (it.IsFound()) continue;
2875 // Set the property. 2875 // Set the property.
2876 Handle<Object> value = 2876 DCHECK(properties->ValueAt(i)->IsPropertyCell());
2877 Handle<Object>(properties->ValueAt(i), isolate()); 2877 Handle<PropertyCell> cell(PropertyCell::cast(properties->ValueAt(i)));
2878 DCHECK(value->IsPropertyCell()); 2878 Handle<Object> value(cell->value(), isolate());
2879 value = handle(PropertyCell::cast(*value)->value(), isolate());
2880 if (value->IsTheHole()) continue; 2879 if (value->IsTheHole()) continue;
2881 PropertyDetails details = properties->DetailsAt(i); 2880 PropertyDetails details = cell->property_details();
2882 DCHECK_EQ(kData, details.kind()); 2881 DCHECK_EQ(kData, details.kind());
2883 JSObject::AddProperty(to, key, value, details.attributes()); 2882 JSObject::AddProperty(to, key, value, details.attributes());
2884 } 2883 }
2885 } 2884 }
2886 } else { 2885 } else {
2887 Handle<NameDictionary> properties = 2886 Handle<NameDictionary> properties =
2888 Handle<NameDictionary>(from->property_dictionary()); 2887 Handle<NameDictionary>(from->property_dictionary());
2889 int capacity = properties->Capacity(); 2888 int capacity = properties->Capacity();
2890 for (int i = 0; i < capacity; i++) { 2889 for (int i = 0; i < capacity; i++) {
2891 Object* raw_key(properties->KeyAt(i)); 2890 Object* raw_key(properties->KeyAt(i));
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3092 return from + sizeof(NestingCounterType); 3091 return from + sizeof(NestingCounterType);
3093 } 3092 }
3094 3093
3095 3094
3096 // Called when the top-level V8 mutex is destroyed. 3095 // Called when the top-level V8 mutex is destroyed.
3097 void Bootstrapper::FreeThreadResources() { 3096 void Bootstrapper::FreeThreadResources() {
3098 DCHECK(!IsActive()); 3097 DCHECK(!IsActive());
3099 } 3098 }
3100 3099
3101 } } // namespace v8::internal 3100 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap-snapshot-generator.cc » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698