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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 | 53 |
54 // static | 54 // static |
55 FieldAccess AccessBuilder::ForMapInstanceType() { | 55 FieldAccess AccessBuilder::ForMapInstanceType() { |
56 return {kTaggedBase, Map::kInstanceTypeOffset, Handle<Name>(), | 56 return {kTaggedBase, Map::kInstanceTypeOffset, Handle<Name>(), |
57 Type::UntaggedInt8(), kMachUint8}; | 57 Type::UntaggedInt8(), kMachUint8}; |
58 } | 58 } |
59 | 59 |
60 | 60 |
61 // static | 61 // static |
| 62 FieldAccess AccessBuilder::ForStringLength() { |
| 63 return {kTaggedBase, String::kLengthOffset, Handle<Name>(), |
| 64 Type::SignedSmall(), kMachAnyTagged}; |
| 65 } |
| 66 |
| 67 |
| 68 // static |
62 FieldAccess AccessBuilder::ForValue() { | 69 FieldAccess AccessBuilder::ForValue() { |
63 return {kTaggedBase, JSValue::kValueOffset, Handle<Name>(), Type::Any(), | 70 return {kTaggedBase, JSValue::kValueOffset, Handle<Name>(), Type::Any(), |
64 kMachAnyTagged}; | 71 kMachAnyTagged}; |
65 } | 72 } |
66 | 73 |
67 | 74 |
68 // static | 75 // static |
69 ElementAccess AccessBuilder::ForFixedArrayElement() { | 76 ElementAccess AccessBuilder::ForFixedArrayElement() { |
70 return {kNoBoundsCheck, kTaggedBase, FixedArray::kHeaderSize, Type::Any(), | 77 return {kNoBoundsCheck, kTaggedBase, FixedArray::kHeaderSize, Type::Any(), |
71 kMachAnyTagged}; | 78 kMachAnyTagged}; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 return {kTypedArrayBoundsCheck, taggedness, header_size, Type::Number(), | 111 return {kTypedArrayBoundsCheck, taggedness, header_size, Type::Number(), |
105 kRepFloat64}; | 112 kRepFloat64}; |
106 } | 113 } |
107 UNREACHABLE(); | 114 UNREACHABLE(); |
108 return {kTypedArrayBoundsCheck, kUntaggedBase, 0, Type::None(), kMachNone}; | 115 return {kTypedArrayBoundsCheck, kUntaggedBase, 0, Type::None(), kMachNone}; |
109 } | 116 } |
110 | 117 |
111 } // namespace compiler | 118 } // namespace compiler |
112 } // namespace internal | 119 } // namespace internal |
113 } // namespace v8 | 120 } // namespace v8 |
OLD | NEW |