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

Side by Side Diff: src/field-index-inl.h

Issue 1363293002: JSObject::GetEnumProperty cleanup (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: handlifying method Created 5 years, 2 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/objects.h » ('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 #ifndef V8_FIELD_INDEX_INL_H_ 5 #ifndef V8_FIELD_INDEX_INL_H_
6 #define V8_FIELD_INDEX_INL_H_ 6 #define V8_FIELD_INDEX_INL_H_
7 7
8 #include "src/field-index.h" 8 #include "src/field-index.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 result = -result - 1; 82 result = -result - 1;
83 } 83 }
84 result <<= 1; 84 result <<= 1;
85 return is_double() ? (result | 1) : result; 85 return is_double() ? (result | 1) : result;
86 } 86 }
87 87
88 88
89 inline FieldIndex FieldIndex::ForDescriptor(Map* map, int descriptor_index) { 89 inline FieldIndex FieldIndex::ForDescriptor(Map* map, int descriptor_index) {
90 PropertyDetails details = 90 PropertyDetails details =
91 map->instance_descriptors()->GetDetails(descriptor_index); 91 map->instance_descriptors()->GetDetails(descriptor_index);
92 int field_index = 92 int field_index = details.field_index();
93 map->instance_descriptors()->GetFieldIndex(descriptor_index);
94 return ForPropertyIndex(map, field_index, 93 return ForPropertyIndex(map, field_index,
95 details.representation().IsDouble()); 94 details.representation().IsDouble());
96 } 95 }
97 96
98 97
99 inline FieldIndex FieldIndex::ForKeyedLookupCacheIndex(Map* map, int index) { 98 inline FieldIndex FieldIndex::ForKeyedLookupCacheIndex(Map* map, int index) {
100 if (FLAG_compiled_keyed_generic_loads) { 99 if (FLAG_compiled_keyed_generic_loads) {
101 return ForLoadByFieldIndex(map, index); 100 return ForLoadByFieldIndex(map, index);
102 } else { 101 } else {
103 return ForPropertyIndex(map, index); 102 return ForPropertyIndex(map, index);
(...skipping 11 matching lines...) Expand all
115 return GetLoadByFieldIndex(); 114 return GetLoadByFieldIndex();
116 } else { 115 } else {
117 return property_index(); 116 return property_index();
118 } 117 }
119 } 118 }
120 119
121 120
122 } } // namespace v8::internal 121 } } // namespace v8::internal
123 122
124 #endif 123 #endif
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698