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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 FieldAccess AccessBuilder::ForArgumentsLength() { | 150 FieldAccess AccessBuilder::ForArgumentsLength() { |
151 int offset = | 151 int offset = |
152 JSObject::kHeaderSize + Heap::kArgumentsLengthIndex * kPointerSize; | 152 JSObject::kHeaderSize + Heap::kArgumentsLengthIndex * kPointerSize; |
153 FieldAccess access = {kTaggedBase, offset, Handle<Name>(), Type::Any(), | 153 FieldAccess access = {kTaggedBase, offset, Handle<Name>(), Type::Any(), |
154 kMachAnyTagged}; | 154 kMachAnyTagged}; |
155 return access; | 155 return access; |
156 } | 156 } |
157 | 157 |
158 | 158 |
159 // static | 159 // static |
| 160 FieldAccess AccessBuilder::ForArgumentsCallee() { |
| 161 int offset = |
| 162 JSObject::kHeaderSize + Heap::kArgumentsCalleeIndex * kPointerSize; |
| 163 FieldAccess access = {kTaggedBase, offset, Handle<Name>(), Type::Any(), |
| 164 kMachAnyTagged}; |
| 165 return access; |
| 166 } |
| 167 |
| 168 |
| 169 // static |
160 FieldAccess AccessBuilder::ForFixedArraySlot(size_t index) { | 170 FieldAccess AccessBuilder::ForFixedArraySlot(size_t index) { |
161 int offset = FixedArray::OffsetOfElementAt(static_cast<int>(index)); | 171 int offset = FixedArray::OffsetOfElementAt(static_cast<int>(index)); |
162 FieldAccess access = {kTaggedBase, offset, Handle<Name>(), Type::Any(), | 172 FieldAccess access = {kTaggedBase, offset, Handle<Name>(), Type::Any(), |
163 kMachAnyTagged}; | 173 kMachAnyTagged}; |
164 return access; | 174 return access; |
165 } | 175 } |
166 | 176 |
167 | 177 |
168 // static | 178 // static |
169 FieldAccess AccessBuilder::ForContextSlot(size_t index) { | 179 FieldAccess AccessBuilder::ForContextSlot(size_t index) { |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 // static | 309 // static |
300 FieldAccess AccessBuilder::ForFrameMarker() { | 310 FieldAccess AccessBuilder::ForFrameMarker() { |
301 FieldAccess access = {kUntaggedBase, StandardFrameConstants::kMarkerOffset, | 311 FieldAccess access = {kUntaggedBase, StandardFrameConstants::kMarkerOffset, |
302 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; | 312 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; |
303 return access; | 313 return access; |
304 } | 314 } |
305 | 315 |
306 } // namespace compiler | 316 } // namespace compiler |
307 } // namespace internal | 317 } // namespace internal |
308 } // namespace v8 | 318 } // namespace v8 |
OLD | NEW |