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/compiler/type-cache.h" | 7 #include "src/compiler/type-cache.h" |
8 #include "src/contexts.h" | 8 #include "src/contexts.h" |
9 #include "src/frames.h" | 9 #include "src/frames.h" |
10 #include "src/handles-inl.h" | 10 #include "src/handles-inl.h" |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 FieldAccess AccessBuilder::ForJSGlobalObjectNativeContext() { | 541 FieldAccess AccessBuilder::ForJSGlobalObjectNativeContext() { |
542 FieldAccess access = {kTaggedBase, | 542 FieldAccess access = {kTaggedBase, |
543 JSGlobalObject::kNativeContextOffset, | 543 JSGlobalObject::kNativeContextOffset, |
544 Handle<Name>(), | 544 Handle<Name>(), |
545 Type::Internal(), | 545 Type::Internal(), |
546 MachineType::TaggedPointer(), | 546 MachineType::TaggedPointer(), |
547 kPointerWriteBarrier}; | 547 kPointerWriteBarrier}; |
548 return access; | 548 return access; |
549 } | 549 } |
550 | 550 |
| 551 // static |
| 552 FieldAccess AccessBuilder::ForJSStringIteratorString() { |
| 553 FieldAccess access = { |
| 554 kTaggedBase, JSStringIterator::kStringOffset, Handle<Name>(), |
| 555 Type::String(), MachineType::TaggedPointer(), kPointerWriteBarrier}; |
| 556 return access; |
| 557 } |
| 558 |
| 559 // static |
| 560 FieldAccess AccessBuilder::ForJSStringIteratorIndex() { |
| 561 FieldAccess access = {kTaggedBase, |
| 562 JSStringIterator::kNextIndexOffset, |
| 563 Handle<Name>(), |
| 564 TypeCache::Get().kStringLengthType, |
| 565 MachineType::TaggedSigned(), |
| 566 kNoWriteBarrier}; |
| 567 return access; |
| 568 } |
551 | 569 |
552 // static | 570 // static |
553 FieldAccess AccessBuilder::ForValue() { | 571 FieldAccess AccessBuilder::ForValue() { |
554 FieldAccess access = { | 572 FieldAccess access = { |
555 kTaggedBase, JSValue::kValueOffset, Handle<Name>(), | 573 kTaggedBase, JSValue::kValueOffset, Handle<Name>(), |
556 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier}; | 574 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier}; |
557 return access; | 575 return access; |
558 } | 576 } |
559 | 577 |
560 | 578 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 } | 744 } |
727 UNREACHABLE(); | 745 UNREACHABLE(); |
728 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), | 746 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), |
729 kNoWriteBarrier}; | 747 kNoWriteBarrier}; |
730 return access; | 748 return access; |
731 } | 749 } |
732 | 750 |
733 } // namespace compiler | 751 } // namespace compiler |
734 } // namespace internal | 752 } // namespace internal |
735 } // namespace v8 | 753 } // namespace v8 |
OLD | NEW |