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

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

Issue 2424433002: [ic] Delete old KeyedLoadIC code (Closed)
Patch Set: fix failing test Created 4 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 | « src/field-index.h ('k') | src/flag-definitions.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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 inline FieldIndex FieldIndex::ForDescriptor(Map* map, int descriptor_index) { 87 inline FieldIndex FieldIndex::ForDescriptor(Map* map, int descriptor_index) {
88 PropertyDetails details = 88 PropertyDetails details =
89 map->instance_descriptors()->GetDetails(descriptor_index); 89 map->instance_descriptors()->GetDetails(descriptor_index);
90 int field_index = details.field_index(); 90 int field_index = details.field_index();
91 return ForPropertyIndex(map, field_index, 91 return ForPropertyIndex(map, field_index,
92 details.representation().IsDouble()); 92 details.representation().IsDouble());
93 } 93 }
94 94
95
96 inline FieldIndex FieldIndex::ForKeyedLookupCacheIndex(Map* map, int index) {
97 if (FLAG_compiled_keyed_generic_loads) {
98 return ForLoadByFieldIndex(map, index);
99 } else {
100 return ForPropertyIndex(map, index);
101 }
102 }
103
104
105 inline FieldIndex FieldIndex::FromFieldAccessStubKey(int key) { 95 inline FieldIndex FieldIndex::FromFieldAccessStubKey(int key) {
106 return FieldIndex(key); 96 return FieldIndex(key);
107 } 97 }
108 98
109
110 inline int FieldIndex::GetKeyedLookupCacheIndex() const {
111 if (FLAG_compiled_keyed_generic_loads) {
112 return GetLoadByFieldIndex();
113 } else {
114 return property_index();
115 }
116 }
117
118
119 } // namespace internal 99 } // namespace internal
120 } // namespace v8 100 } // namespace v8
121 101
122 #endif 102 #endif
OLDNEW
« no previous file with comments | « src/field-index.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698