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 #include "src/types-inl.h" | 6 #include "src/types-inl.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace compiler { | 10 namespace compiler { |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 | 39 |
40 // static | 40 // static |
41 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() { | 41 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() { |
42 return {kTaggedBase, JSArrayBuffer::kBackingStoreOffset, MaybeHandle<Name>(), | 42 return {kTaggedBase, JSArrayBuffer::kBackingStoreOffset, MaybeHandle<Name>(), |
43 Type::UntaggedPointer(), kMachPtr}; | 43 Type::UntaggedPointer(), kMachPtr}; |
44 } | 44 } |
45 | 45 |
46 | 46 |
47 // static | 47 // static |
| 48 FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) { |
| 49 return {kTaggedBase, JSDate::kValueOffset + index * kPointerSize, |
| 50 MaybeHandle<Name>(), Type::Number(), kMachAnyTagged}; |
| 51 } |
| 52 |
| 53 |
| 54 // static |
48 FieldAccess AccessBuilder::ForFixedArrayLength() { | 55 FieldAccess AccessBuilder::ForFixedArrayLength() { |
49 // TODO(turbofan): 2^30 is a valid upper limit for the FixedArray::length | 56 // TODO(turbofan): 2^30 is a valid upper limit for the FixedArray::length |
50 // field, although it's not the best. If we had a Zone we could create an | 57 // field, although it's not the best. If we had a Zone we could create an |
51 // appropriate range type instead. | 58 // appropriate range type instead. |
52 STATIC_ASSERT(FixedArray::kMaxLength <= 1 << 30); | 59 STATIC_ASSERT(FixedArray::kMaxLength <= 1 << 30); |
53 return {kTaggedBase, FixedArray::kLengthOffset, MaybeHandle<Name>(), | 60 return {kTaggedBase, FixedArray::kLengthOffset, MaybeHandle<Name>(), |
54 Type::Intersect(Type::Unsigned30(), Type::TaggedSigned()), | 61 Type::Intersect(Type::Unsigned30(), Type::TaggedSigned()), |
55 kMachAnyTagged}; | 62 kMachAnyTagged}; |
56 } | 63 } |
57 | 64 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 214 |
208 // static | 215 // static |
209 FieldAccess AccessBuilder::ForFrameMarker() { | 216 FieldAccess AccessBuilder::ForFrameMarker() { |
210 return {kUntaggedBase, StandardFrameConstants::kMarkerOffset, | 217 return {kUntaggedBase, StandardFrameConstants::kMarkerOffset, |
211 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; | 218 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; |
212 } | 219 } |
213 | 220 |
214 } // namespace compiler | 221 } // namespace compiler |
215 } // namespace internal | 222 } // namespace internal |
216 } // namespace v8 | 223 } // namespace v8 |
OLD | NEW |