| 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 { |
| 11 | 11 |
| 12 // static | 12 // static |
| 13 FieldAccess AccessBuilder::ForMap() { | 13 FieldAccess AccessBuilder::ForMap() { |
| 14 return {kTaggedBase, HeapObject::kMapOffset, MaybeHandle<Name>(), Type::Any(), | 14 return {kTaggedBase, HeapObject::kMapOffset, Handle<Name>(), Type::Any(), |
| 15 kMachAnyTagged}; | 15 kMachAnyTagged}; |
| 16 } | 16 } |
| 17 | 17 |
| 18 | 18 |
| 19 // static | 19 // static |
| 20 FieldAccess AccessBuilder::ForJSObjectProperties() { | 20 FieldAccess AccessBuilder::ForJSObjectProperties() { |
| 21 return {kTaggedBase, JSObject::kPropertiesOffset, MaybeHandle<Name>(), | 21 return {kTaggedBase, JSObject::kPropertiesOffset, Handle<Name>(), Type::Any(), |
| 22 Type::Any(), kMachAnyTagged}; | 22 kMachAnyTagged}; |
| 23 } | 23 } |
| 24 | 24 |
| 25 | 25 |
| 26 // static | 26 // static |
| 27 FieldAccess AccessBuilder::ForJSObjectElements() { | 27 FieldAccess AccessBuilder::ForJSObjectElements() { |
| 28 return {kTaggedBase, JSObject::kElementsOffset, MaybeHandle<Name>(), | 28 return {kTaggedBase, JSObject::kElementsOffset, Handle<Name>(), |
| 29 Type::Internal(), kMachAnyTagged}; | 29 Type::Internal(), kMachAnyTagged}; |
| 30 } | 30 } |
| 31 | 31 |
| 32 | 32 |
| 33 // static | 33 // static |
| 34 FieldAccess AccessBuilder::ForJSFunctionContext() { | 34 FieldAccess AccessBuilder::ForJSFunctionContext() { |
| 35 return {kTaggedBase, JSFunction::kContextOffset, MaybeHandle<Name>(), | 35 return {kTaggedBase, JSFunction::kContextOffset, Handle<Name>(), |
| 36 Type::Internal(), kMachAnyTagged}; | 36 Type::Internal(), kMachAnyTagged}; |
| 37 } | 37 } |
| 38 | 38 |
| 39 | 39 |
| 40 // static | 40 // static |
| 41 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() { | 41 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() { |
| 42 return {kTaggedBase, JSArrayBuffer::kBackingStoreOffset, MaybeHandle<Name>(), | 42 return {kTaggedBase, JSArrayBuffer::kBackingStoreOffset, Handle<Name>(), |
| 43 Type::UntaggedPtr(), kMachPtr}; | 43 Type::UntaggedPtr(), kMachPtr}; |
| 44 } | 44 } |
| 45 | 45 |
| 46 | 46 |
| 47 // static | 47 // static |
| 48 FieldAccess AccessBuilder::ForExternalArrayPointer() { | 48 FieldAccess AccessBuilder::ForExternalArrayPointer() { |
| 49 return {kTaggedBase, ExternalArray::kExternalPointerOffset, | 49 return {kTaggedBase, ExternalArray::kExternalPointerOffset, Handle<Name>(), |
| 50 MaybeHandle<Name>(), Type::UntaggedPtr(), kMachPtr}; | 50 Type::UntaggedPtr(), kMachPtr}; |
| 51 } | 51 } |
| 52 | 52 |
| 53 | 53 |
| 54 // static | 54 // static |
| 55 ElementAccess AccessBuilder::ForFixedArrayElement() { | 55 ElementAccess AccessBuilder::ForFixedArrayElement() { |
| 56 return {kNoBoundsCheck, kTaggedBase, FixedArray::kHeaderSize, Type::Any(), | 56 return {kNoBoundsCheck, kTaggedBase, FixedArray::kHeaderSize, Type::Any(), |
| 57 kMachAnyTagged}; | 57 kMachAnyTagged}; |
| 58 } | 58 } |
| 59 | 59 |
| 60 | 60 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 90 return {kTypedArrayBoundsCheck, taggedness, header_size, Type::Number(), | 90 return {kTypedArrayBoundsCheck, taggedness, header_size, Type::Number(), |
| 91 kRepFloat64}; | 91 kRepFloat64}; |
| 92 } | 92 } |
| 93 UNREACHABLE(); | 93 UNREACHABLE(); |
| 94 return {kTypedArrayBoundsCheck, kUntaggedBase, 0, Type::None(), kMachNone}; | 94 return {kTypedArrayBoundsCheck, kUntaggedBase, 0, Type::None(), kMachNone}; |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace compiler | 97 } // namespace compiler |
| 98 } // namespace internal | 98 } // namespace internal |
| 99 } // namespace v8 | 99 } // namespace v8 |
| OLD | NEW |