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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) { | 61 FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) { |
62 FieldAccess access = {kTaggedBase, | 62 FieldAccess access = {kTaggedBase, |
63 JSDate::kValueOffset + index * kPointerSize, | 63 JSDate::kValueOffset + index * kPointerSize, |
64 MaybeHandle<Name>(), Type::Number(), kMachAnyTagged}; | 64 MaybeHandle<Name>(), Type::Number(), kMachAnyTagged}; |
65 return access; | 65 return access; |
66 } | 66 } |
67 | 67 |
68 | 68 |
69 // static | 69 // static |
70 FieldAccess AccessBuilder::ForFixedArrayLength(Zone* zone) { | 70 FieldAccess AccessBuilder::ForFixedArrayLength(Zone* zone) { |
71 STATIC_ASSERT(FixedArray::kMaxLength <= 1 << 30); | |
72 FieldAccess access = { | 71 FieldAccess access = { |
73 kTaggedBase, FixedArray::kLengthOffset, MaybeHandle<Name>(), | 72 kTaggedBase, FixedArray::kLengthOffset, MaybeHandle<Name>(), |
74 Type::Intersect(Type::Range(0, FixedArray::kMaxLength, zone), | 73 Type::Intersect(Type::Range(0, FixedArray::kMaxLength, zone), |
75 Type::TaggedSigned(), zone), | 74 Type::TaggedSigned(), zone), |
76 kMachAnyTagged}; | 75 kMachAnyTagged}; |
77 return access; | 76 return access; |
78 } | 77 } |
79 | 78 |
80 | 79 |
81 // static | 80 // static |
82 FieldAccess AccessBuilder::ForDescriptorArrayEnumCache() { | 81 FieldAccess AccessBuilder::ForDescriptorArrayEnumCache() { |
83 FieldAccess access = {kTaggedBase, DescriptorArray::kEnumCacheOffset, | 82 FieldAccess access = {kTaggedBase, DescriptorArray::kEnumCacheOffset, |
84 Handle<Name>(), Type::TaggedPointer(), kMachAnyTagged}; | 83 Handle<Name>(), Type::TaggedPointer(), kMachAnyTagged}; |
85 return access; | 84 return access; |
86 } | 85 } |
87 | 86 |
88 | 87 |
89 // static | 88 // static |
90 FieldAccess AccessBuilder::ForDescriptorArrayEnumCacheBridgeCache() { | 89 FieldAccess AccessBuilder::ForDescriptorArrayEnumCacheBridgeCache() { |
91 FieldAccess access = {kTaggedBase, | 90 FieldAccess access = {kTaggedBase, |
92 DescriptorArray::kEnumCacheBridgeCacheOffset, | 91 DescriptorArray::kEnumCacheBridgeCacheOffset, |
93 Handle<Name>(), Type::TaggedPointer(), kMachAnyTagged}; | 92 Handle<Name>(), Type::TaggedPointer(), kMachAnyTagged}; |
94 return access; | 93 return access; |
95 } | 94 } |
96 | 95 |
97 | 96 |
98 // static | 97 // static |
99 FieldAccess AccessBuilder::ForMapBitField3() { | 98 FieldAccess AccessBuilder::ForMapBitField3(Zone* zone) { |
100 FieldAccess access = {kTaggedBase, Map::kBitField3Offset, Handle<Name>(), | 99 FieldAccess access = { |
101 Type::UntaggedUnsigned32(), kMachUint32}; | 100 kTaggedBase, Map::kBitField3Offset, Handle<Name>(), |
| 101 Type::Intersect(Type::Signed32(), Type::UntaggedSigned32(), zone), |
| 102 kMachInt32}; |
102 return access; | 103 return access; |
103 } | 104 } |
104 | 105 |
105 | 106 |
106 // static | 107 // static |
107 FieldAccess AccessBuilder::ForMapDescriptors() { | 108 FieldAccess AccessBuilder::ForMapDescriptors() { |
108 FieldAccess access = {kTaggedBase, Map::kDescriptorsOffset, Handle<Name>(), | 109 FieldAccess access = {kTaggedBase, Map::kDescriptorsOffset, Handle<Name>(), |
109 Type::TaggedPointer(), kMachAnyTagged}; | 110 Type::TaggedPointer(), kMachAnyTagged}; |
110 return access; | 111 return access; |
111 } | 112 } |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 // static | 300 // static |
300 FieldAccess AccessBuilder::ForFrameMarker() { | 301 FieldAccess AccessBuilder::ForFrameMarker() { |
301 FieldAccess access = {kUntaggedBase, StandardFrameConstants::kMarkerOffset, | 302 FieldAccess access = {kUntaggedBase, StandardFrameConstants::kMarkerOffset, |
302 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; | 303 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; |
303 return access; | 304 return access; |
304 } | 305 } |
305 | 306 |
306 } // namespace compiler | 307 } // namespace compiler |
307 } // namespace internal | 308 } // namespace internal |
308 } // namespace v8 | 309 } // namespace v8 |
OLD | NEW |