Index: src/property-descriptor.cc |
diff --git a/src/property-descriptor.cc b/src/property-descriptor.cc |
index f22a2630e21505ce8d21c20b12641c3cf1879f00..f1e7cade68a49ec7a181c38cef0593be0adec622 100644 |
--- a/src/property-descriptor.cc |
+++ b/src/property-descriptor.cc |
@@ -61,19 +61,26 @@ bool ToPropertyDescriptorFastPath(Isolate* isolate, Handle<JSReceiver> obj, |
PropertyDetails details = descs->GetDetails(i); |
Name* key = descs->GetKey(i); |
Handle<Object> value; |
- switch (details.type()) { |
- case DATA: |
+ if (details.location() == kField) { |
+ if (details.kind() == kData) { |
value = JSObject::FastPropertyAt(Handle<JSObject>::cast(obj), |
details.representation(), |
FieldIndex::ForDescriptor(map, i)); |
- break; |
- case DATA_CONSTANT: |
+ } else { |
+ DCHECK_EQ(kAccessor, details.kind()); |
+ // Bail out to slow path. |
+ return false; |
+ } |
+ |
+ } else { |
+ DCHECK_EQ(kDescriptor, details.location()); |
+ if (details.kind() == kData) { |
value = handle(descs->GetConstant(i), isolate); |
- break; |
- case ACCESSOR: |
- case ACCESSOR_CONSTANT: |
+ } else { |
+ DCHECK_EQ(kAccessor, details.kind()); |
// Bail out to slow path. |
return false; |
+ } |
} |
Heap* heap = isolate->heap(); |
if (key == heap->enumerable_string()) { |