OLD | NEW |
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 inline FieldIndex FieldIndex::ForKeyedLookupCacheIndex(Map* map, int index) { | 104 inline FieldIndex FieldIndex::ForKeyedLookupCacheIndex(Map* map, int index) { |
105 if (FLAG_compiled_keyed_generic_loads) { | 105 if (FLAG_compiled_keyed_generic_loads) { |
106 return ForLoadByFieldIndex(map, index); | 106 return ForLoadByFieldIndex(map, index); |
107 } else { | 107 } else { |
108 return ForPropertyIndex(map, index); | 108 return ForPropertyIndex(map, index); |
109 } | 109 } |
110 } | 110 } |
111 | 111 |
112 | 112 |
| 113 inline FieldIndex FieldIndex::FromFieldAccessStubKey(int key) { |
| 114 return FieldIndex(key); |
| 115 } |
| 116 |
| 117 |
113 inline int FieldIndex::GetKeyedLookupCacheIndex() const { | 118 inline int FieldIndex::GetKeyedLookupCacheIndex() const { |
114 if (FLAG_compiled_keyed_generic_loads) { | 119 if (FLAG_compiled_keyed_generic_loads) { |
115 return GetLoadByFieldIndex(); | 120 return GetLoadByFieldIndex(); |
116 } else { | 121 } else { |
117 return property_index(); | 122 return property_index(); |
118 } | 123 } |
119 } | 124 } |
120 | 125 |
121 | 126 |
122 } } // namespace v8::internal | 127 } } // namespace v8::internal |
123 | 128 |
124 #endif | 129 #endif |
OLD | NEW |