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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 FieldAccess AccessBuilder::ForJSObjectOffset( | 97 FieldAccess AccessBuilder::ForJSObjectOffset( |
98 int offset, WriteBarrierKind write_barrier_kind) { | 98 int offset, WriteBarrierKind write_barrier_kind) { |
99 FieldAccess access = {kTaggedBase, offset, | 99 FieldAccess access = {kTaggedBase, offset, |
100 MaybeHandle<Name>(), MaybeHandle<Map>(), | 100 MaybeHandle<Name>(), MaybeHandle<Map>(), |
101 Type::NonInternal(), MachineType::AnyTagged(), | 101 Type::NonInternal(), MachineType::AnyTagged(), |
102 write_barrier_kind}; | 102 write_barrier_kind}; |
103 return access; | 103 return access; |
104 } | 104 } |
105 | 105 |
106 // static | 106 // static |
| 107 FieldAccess AccessBuilder::ForJSCollectionTable() { |
| 108 FieldAccess access = {kTaggedBase, JSCollection::kTableOffset, |
| 109 MaybeHandle<Name>(), MaybeHandle<Map>(), |
| 110 Type::OtherInternal(), MachineType::TaggedPointer(), |
| 111 kPointerWriteBarrier}; |
| 112 return access; |
| 113 } |
| 114 |
| 115 // static |
107 FieldAccess AccessBuilder::ForJSFunctionPrototypeOrInitialMap() { | 116 FieldAccess AccessBuilder::ForJSFunctionPrototypeOrInitialMap() { |
108 FieldAccess access = { | 117 FieldAccess access = { |
109 kTaggedBase, JSFunction::kPrototypeOrInitialMapOffset, | 118 kTaggedBase, JSFunction::kPrototypeOrInitialMapOffset, |
110 MaybeHandle<Name>(), MaybeHandle<Map>(), | 119 MaybeHandle<Name>(), MaybeHandle<Map>(), |
111 Type::Any(), MachineType::AnyTagged(), | 120 Type::Any(), MachineType::AnyTagged(), |
112 kFullWriteBarrier}; | 121 kFullWriteBarrier}; |
113 return access; | 122 return access; |
114 } | 123 } |
115 | 124 |
116 // static | 125 // static |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 FieldAccess AccessBuilder::ForModuleRegularImports() { | 485 FieldAccess AccessBuilder::ForModuleRegularImports() { |
477 FieldAccess access = {kTaggedBase, Module::kRegularImportsOffset, | 486 FieldAccess access = {kTaggedBase, Module::kRegularImportsOffset, |
478 Handle<Name>(), MaybeHandle<Map>(), | 487 Handle<Name>(), MaybeHandle<Map>(), |
479 Type::OtherInternal(), MachineType::TaggedPointer(), | 488 Type::OtherInternal(), MachineType::TaggedPointer(), |
480 kPointerWriteBarrier}; | 489 kPointerWriteBarrier}; |
481 return access; | 490 return access; |
482 } | 491 } |
483 | 492 |
484 // static | 493 // static |
485 FieldAccess AccessBuilder::ForNameHashField() { | 494 FieldAccess AccessBuilder::ForNameHashField() { |
486 FieldAccess access = {kTaggedBase, Name::kHashFieldOffset, | 495 FieldAccess access = {kTaggedBase, Name::kHashFieldOffset, |
487 Handle<Name>(), MaybeHandle<Map>(), | 496 Handle<Name>(), MaybeHandle<Map>(), |
488 Type::Internal(), MachineType::Uint32(), | 497 Type::Unsigned32(), MachineType::Uint32(), |
489 kNoWriteBarrier}; | 498 kNoWriteBarrier}; |
490 return access; | 499 return access; |
491 } | 500 } |
492 | 501 |
493 // static | 502 // static |
494 FieldAccess AccessBuilder::ForStringLength() { | 503 FieldAccess AccessBuilder::ForStringLength() { |
495 FieldAccess access = {kTaggedBase, | 504 FieldAccess access = {kTaggedBase, |
496 String::kLengthOffset, | 505 String::kLengthOffset, |
497 Handle<Name>(), | 506 Handle<Name>(), |
498 MaybeHandle<Map>(), | 507 MaybeHandle<Map>(), |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 MaybeHandle<Map>(), | 938 MaybeHandle<Map>(), |
930 Type::SignedSmall(), | 939 Type::SignedSmall(), |
931 MachineType::TaggedSigned(), | 940 MachineType::TaggedSigned(), |
932 kNoWriteBarrier}; | 941 kNoWriteBarrier}; |
933 return access; | 942 return access; |
934 } | 943 } |
935 | 944 |
936 } // namespace compiler | 945 } // namespace compiler |
937 } // namespace internal | 946 } // namespace internal |
938 } // namespace v8 | 947 } // namespace v8 |
OLD | NEW |