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/handles-inl.h" | 9 #include "src/handles-inl.h" |
10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 // static | 261 // static |
262 FieldAccess AccessBuilder::ForValue() { | 262 FieldAccess AccessBuilder::ForValue() { |
263 FieldAccess access = {kTaggedBase, JSValue::kValueOffset, Handle<Name>(), | 263 FieldAccess access = {kTaggedBase, JSValue::kValueOffset, Handle<Name>(), |
264 Type::Any(), MachineType::AnyTagged()}; | 264 Type::Any(), MachineType::AnyTagged()}; |
265 return access; | 265 return access; |
266 } | 266 } |
267 | 267 |
268 | 268 |
269 // static | 269 // static |
270 FieldAccess AccessBuilder::ForArgumentsLength() { | 270 FieldAccess AccessBuilder::ForArgumentsLength() { |
271 int offset = | 271 FieldAccess access = {kTaggedBase, JSArgumentsObject::kLengthOffset, |
272 JSObject::kHeaderSize + Heap::kArgumentsLengthIndex * kPointerSize; | 272 Handle<Name>(), Type::Any(), MachineType::AnyTagged()}; |
273 FieldAccess access = {kTaggedBase, offset, Handle<Name>(), Type::Any(), | |
274 MachineType::AnyTagged()}; | |
275 return access; | 273 return access; |
276 } | 274 } |
277 | 275 |
278 | 276 |
279 // static | 277 // static |
280 FieldAccess AccessBuilder::ForArgumentsCallee() { | 278 FieldAccess AccessBuilder::ForArgumentsCallee() { |
281 int offset = | 279 FieldAccess access = {kTaggedBase, JSSloppyArgumentsObject::kCalleeOffset, |
282 JSObject::kHeaderSize + Heap::kArgumentsCalleeIndex * kPointerSize; | 280 Handle<Name>(), Type::Any(), MachineType::AnyTagged()}; |
283 FieldAccess access = {kTaggedBase, offset, Handle<Name>(), Type::Any(), | |
284 MachineType::AnyTagged()}; | |
285 return access; | 281 return access; |
286 } | 282 } |
287 | 283 |
288 | 284 |
289 // static | 285 // static |
290 FieldAccess AccessBuilder::ForFixedArraySlot(size_t index) { | 286 FieldAccess AccessBuilder::ForFixedArraySlot(size_t index) { |
291 int offset = FixedArray::OffsetOfElementAt(static_cast<int>(index)); | 287 int offset = FixedArray::OffsetOfElementAt(static_cast<int>(index)); |
292 FieldAccess access = {kTaggedBase, offset, Handle<Name>(), Type::Any(), | 288 FieldAccess access = {kTaggedBase, offset, Handle<Name>(), Type::Any(), |
293 MachineType::AnyTagged()}; | 289 MachineType::AnyTagged()}; |
294 return access; | 290 return access; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 // static | 397 // static |
402 FieldAccess AccessBuilder::ForStatsCounter() { | 398 FieldAccess AccessBuilder::ForStatsCounter() { |
403 FieldAccess access = {kUntaggedBase, 0, MaybeHandle<Name>(), | 399 FieldAccess access = {kUntaggedBase, 0, MaybeHandle<Name>(), |
404 TypeCache::Get().kInt32, MachineType::Int32()}; | 400 TypeCache::Get().kInt32, MachineType::Int32()}; |
405 return access; | 401 return access; |
406 } | 402 } |
407 | 403 |
408 } // namespace compiler | 404 } // namespace compiler |
409 } // namespace internal | 405 } // namespace internal |
410 } // namespace v8 | 406 } // namespace v8 |
OLD | NEW |