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 #include "src/compiler/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
6 | 6 |
7 #include "src/contexts.h" | 7 #include "src/contexts.h" |
8 #include "src/frames.h" | 8 #include "src/frames.h" |
9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
10 #include "src/type-cache.h" | 10 #include "src/type-cache.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 // static | 268 // static |
269 FieldAccess AccessBuilder::ForSharedFunctionInfoTypeFeedbackVector() { | 269 FieldAccess AccessBuilder::ForSharedFunctionInfoTypeFeedbackVector() { |
270 FieldAccess access = {kTaggedBase, SharedFunctionInfo::kFeedbackVectorOffset, | 270 FieldAccess access = {kTaggedBase, SharedFunctionInfo::kFeedbackVectorOffset, |
271 Handle<Name>(), Type::Any(), kMachAnyTagged}; | 271 Handle<Name>(), Type::Any(), kMachAnyTagged}; |
272 return access; | 272 return access; |
273 } | 273 } |
274 | 274 |
275 | 275 |
276 // static | 276 // static |
277 ElementAccess AccessBuilder::ForFixedArrayElement() { | 277 ElementAccess AccessBuilder::ForFixedArrayElement() { |
278 ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(), | 278 ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Tagged(), |
279 kMachAnyTagged}; | 279 kMachAnyTagged}; |
280 return access; | 280 return access; |
281 } | 281 } |
282 | 282 |
283 | 283 |
284 // static | 284 // static |
| 285 ElementAccess AccessBuilder::ForFixedDoubleArrayElement() { |
| 286 ElementAccess access = {kTaggedBase, FixedDoubleArray::kHeaderSize, |
| 287 TypeCache::Get().kFloat64, kMachFloat64}; |
| 288 return access; |
| 289 } |
| 290 |
| 291 |
| 292 // static |
285 ElementAccess AccessBuilder::ForTypedArrayElement(ExternalArrayType type, | 293 ElementAccess AccessBuilder::ForTypedArrayElement(ExternalArrayType type, |
286 bool is_external) { | 294 bool is_external) { |
287 BaseTaggedness taggedness = is_external ? kUntaggedBase : kTaggedBase; | 295 BaseTaggedness taggedness = is_external ? kUntaggedBase : kTaggedBase; |
288 int header_size = is_external ? 0 : FixedTypedArrayBase::kDataOffset; | 296 int header_size = is_external ? 0 : FixedTypedArrayBase::kDataOffset; |
289 switch (type) { | 297 switch (type) { |
290 case kExternalInt8Array: { | 298 case kExternalInt8Array: { |
291 ElementAccess access = {taggedness, header_size, Type::Signed32(), | 299 ElementAccess access = {taggedness, header_size, Type::Signed32(), |
292 kMachInt8}; | 300 kMachInt8}; |
293 return access; | 301 return access; |
294 } | 302 } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 // static | 362 // static |
355 FieldAccess AccessBuilder::ForFrameMarker() { | 363 FieldAccess AccessBuilder::ForFrameMarker() { |
356 FieldAccess access = {kUntaggedBase, StandardFrameConstants::kMarkerOffset, | 364 FieldAccess access = {kUntaggedBase, StandardFrameConstants::kMarkerOffset, |
357 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; | 365 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; |
358 return access; | 366 return access; |
359 } | 367 } |
360 | 368 |
361 } // namespace compiler | 369 } // namespace compiler |
362 } // namespace internal | 370 } // namespace internal |
363 } // namespace v8 | 371 } // namespace v8 |
OLD | NEW |