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

Side by Side Diff: src/factory.cc

Issue 2622413004: [runtime] Remove further usages of PropertyType in favor of PropertyKind/PropertyLocation. (Closed)
Patch Set: Created 3 years, 11 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 | « src/elements.cc ('k') | src/lookup.cc » ('j') | no next file with comments »
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/factory.h" 5 #include "src/factory.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/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 Handle<GlobalDictionary> dictionary = 1730 Handle<GlobalDictionary> dictionary =
1731 GlobalDictionary::New(isolate(), at_least_space_for); 1731 GlobalDictionary::New(isolate(), at_least_space_for);
1732 1732
1733 // The global object might be created from an object template with accessors. 1733 // The global object might be created from an object template with accessors.
1734 // Fill these accessors into the dictionary. 1734 // Fill these accessors into the dictionary.
1735 Handle<DescriptorArray> descs(map->instance_descriptors()); 1735 Handle<DescriptorArray> descs(map->instance_descriptors());
1736 for (int i = 0; i < map->NumberOfOwnDescriptors(); i++) { 1736 for (int i = 0; i < map->NumberOfOwnDescriptors(); i++) {
1737 PropertyDetails details = descs->GetDetails(i); 1737 PropertyDetails details = descs->GetDetails(i);
1738 // Only accessors are expected. 1738 // Only accessors are expected.
1739 DCHECK_EQ(kAccessor, details.kind()); 1739 DCHECK_EQ(kAccessor, details.kind());
1740 PropertyDetails d(details.attributes(), ACCESSOR_CONSTANT, i + 1, 1740 PropertyDetails d(kAccessor, details.attributes(), i + 1,
1741 PropertyCellType::kMutable); 1741 PropertyCellType::kMutable);
1742 Handle<Name> name(descs->GetKey(i)); 1742 Handle<Name> name(descs->GetKey(i));
1743 Handle<PropertyCell> cell = NewPropertyCell(); 1743 Handle<PropertyCell> cell = NewPropertyCell();
1744 cell->set_value(descs->GetCallbacksObject(i)); 1744 cell->set_value(descs->GetCallbacksObject(i));
1745 // |dictionary| already contains enough space for all properties. 1745 // |dictionary| already contains enough space for all properties.
1746 USE(GlobalDictionary::Add(dictionary, name, cell, d)); 1746 USE(GlobalDictionary::Add(dictionary, name, cell, d));
1747 } 1747 }
1748 1748
1749 // Allocate the global object and initialize it with the backing store. 1749 // Allocate the global object and initialize it with the backing store.
1750 Handle<JSGlobalObject> global = New<JSGlobalObject>(map, OLD_SPACE); 1750 Handle<JSGlobalObject> global = New<JSGlobalObject>(map, OLD_SPACE);
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
2804 Handle<AccessorInfo> prototype = 2804 Handle<AccessorInfo> prototype =
2805 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); 2805 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs);
2806 Descriptor d = Descriptor::AccessorConstant( 2806 Descriptor d = Descriptor::AccessorConstant(
2807 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); 2807 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs);
2808 map->AppendDescriptor(&d); 2808 map->AppendDescriptor(&d);
2809 } 2809 }
2810 } 2810 }
2811 2811
2812 } // namespace internal 2812 } // namespace internal
2813 } // namespace v8 2813 } // namespace v8
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698