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

Side by Side Diff: src/property-descriptor.cc

Issue 2633553002: [runtime] Cleanup DescriptorArray interface, remove more PropertyType usages. (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/objects-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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/property-descriptor.h" 5 #include "src/property-descriptor.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 #include "src/lookup.h" 10 #include "src/lookup.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 FieldIndex::ForDescriptor(map, i)); 68 FieldIndex::ForDescriptor(map, i));
69 } else { 69 } else {
70 DCHECK_EQ(kAccessor, details.kind()); 70 DCHECK_EQ(kAccessor, details.kind());
71 // Bail out to slow path. 71 // Bail out to slow path.
72 return false; 72 return false;
73 } 73 }
74 74
75 } else { 75 } else {
76 DCHECK_EQ(kDescriptor, details.location()); 76 DCHECK_EQ(kDescriptor, details.location());
77 if (details.kind() == kData) { 77 if (details.kind() == kData) {
78 value = handle(descs->GetConstant(i), isolate); 78 value = handle(descs->GetValue(i), isolate);
79 } else { 79 } else {
80 DCHECK_EQ(kAccessor, details.kind()); 80 DCHECK_EQ(kAccessor, details.kind());
81 // Bail out to slow path. 81 // Bail out to slow path.
82 return false; 82 return false;
83 } 83 }
84 } 84 }
85 Heap* heap = isolate->heap(); 85 Heap* heap = isolate->heap();
86 if (key == heap->enumerable_string()) { 86 if (key == heap->enumerable_string()) {
87 desc->set_enumerable(value->BooleanValue()); 87 desc->set_enumerable(value->BooleanValue());
88 } else if (key == heap->configurable_string()) { 88 } else if (key == heap->configurable_string()) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // Desc.[[Enumerable]] to like.[[Enumerable]]. 336 // Desc.[[Enumerable]] to like.[[Enumerable]].
337 if (!desc->has_enumerable()) desc->set_enumerable(false); 337 if (!desc->has_enumerable()) desc->set_enumerable(false);
338 // 7. If Desc does not have a [[Configurable]] field, set 338 // 7. If Desc does not have a [[Configurable]] field, set
339 // Desc.[[Configurable]] to like.[[Configurable]]. 339 // Desc.[[Configurable]] to like.[[Configurable]].
340 if (!desc->has_configurable()) desc->set_configurable(false); 340 if (!desc->has_configurable()) desc->set_configurable(false);
341 // 8. Return Desc. 341 // 8. Return Desc.
342 } 342 }
343 343
344 } // namespace internal 344 } // namespace internal
345 } // namespace v8 345 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698