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_COMPILER_ACCESS_BUILDER_H_ | 5 #ifndef V8_COMPILER_ACCESS_BUILDER_H_ |
6 #define V8_COMPILER_ACCESS_BUILDER_H_ | 6 #define V8_COMPILER_ACCESS_BUILDER_H_ |
7 | 7 |
8 #include "src/compiler/simplified-operator.h" | 8 #include "src/compiler/simplified-operator.h" |
| 9 #include "src/elements-kind.h" |
9 | 10 |
10 namespace v8 { | 11 namespace v8 { |
11 namespace internal { | 12 namespace internal { |
12 namespace compiler { | 13 namespace compiler { |
13 | 14 |
14 // This access builder provides a set of static methods constructing commonly | 15 // This access builder provides a set of static methods constructing commonly |
15 // used FieldAccess and ElementAccess descriptors. These descriptors serve as | 16 // used FieldAccess and ElementAccess descriptors. These descriptors serve as |
16 // parameters to simplified load/store operators. | 17 // parameters to simplified load/store operators. |
17 class AccessBuilder final : public AllStatic { | 18 class AccessBuilder final : public AllStatic { |
18 public: | 19 public: |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 185 |
185 // Provides access to Context slots. | 186 // Provides access to Context slots. |
186 static FieldAccess ForContextSlot(size_t index); | 187 static FieldAccess ForContextSlot(size_t index); |
187 | 188 |
188 // Provides access to PropertyCell::value() field. | 189 // Provides access to PropertyCell::value() field. |
189 static FieldAccess ForPropertyCellValue(); | 190 static FieldAccess ForPropertyCellValue(); |
190 static FieldAccess ForPropertyCellValue(Type* type); | 191 static FieldAccess ForPropertyCellValue(Type* type); |
191 | 192 |
192 // Provides access to FixedArray elements. | 193 // Provides access to FixedArray elements. |
193 static ElementAccess ForFixedArrayElement(); | 194 static ElementAccess ForFixedArrayElement(); |
| 195 static ElementAccess ForFixedArrayElement(ElementsKind kind); |
194 | 196 |
195 // Provides access to FixedDoubleArray elements. | 197 // Provides access to FixedDoubleArray elements. |
196 static ElementAccess ForFixedDoubleArrayElement(); | 198 static ElementAccess ForFixedDoubleArrayElement(); |
197 | 199 |
198 // Provides access to Fixed{type}TypedArray and External{type}Array elements. | 200 // Provides access to Fixed{type}TypedArray and External{type}Array elements. |
199 static ElementAccess ForTypedArrayElement(ExternalArrayType type, | 201 static ElementAccess ForTypedArrayElement(ExternalArrayType type, |
200 bool is_external); | 202 bool is_external); |
201 | 203 |
202 private: | 204 private: |
203 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessBuilder); | 205 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessBuilder); |
204 }; | 206 }; |
205 | 207 |
206 } // namespace compiler | 208 } // namespace compiler |
207 } // namespace internal | 209 } // namespace internal |
208 } // namespace v8 | 210 } // namespace v8 |
209 | 211 |
210 #endif // V8_COMPILER_ACCESS_BUILDER_H_ | 212 #endif // V8_COMPILER_ACCESS_BUILDER_H_ |
OLD | NEW |