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 13 matching lines...) Expand all Loading... |
24 | 24 |
25 | 25 |
26 // static | 26 // static |
27 FieldAccess AccessBuilder::ForJSObjectElements() { | 27 FieldAccess AccessBuilder::ForJSObjectElements() { |
28 return {kTaggedBase, JSObject::kElementsOffset, Handle<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() { | |
35 return {kTaggedBase, JSFunction::kContextOffset, Handle<Name>(), | |
36 Type::Internal(), kMachAnyTagged}; | |
37 } | |
38 | |
39 | |
40 // static | |
41 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() { | 34 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() { |
42 return {kTaggedBase, JSArrayBuffer::kBackingStoreOffset, Handle<Name>(), | 35 return {kTaggedBase, JSArrayBuffer::kBackingStoreOffset, Handle<Name>(), |
43 Type::UntaggedPtr(), kMachPtr}; | 36 Type::UntaggedPtr(), kMachPtr}; |
44 } | 37 } |
45 | 38 |
46 | 39 |
47 // static | 40 // static |
48 FieldAccess AccessBuilder::ForExternalArrayPointer() { | 41 FieldAccess AccessBuilder::ForExternalArrayPointer() { |
49 return {kTaggedBase, ExternalArray::kExternalPointerOffset, Handle<Name>(), | 42 return {kTaggedBase, ExternalArray::kExternalPointerOffset, Handle<Name>(), |
50 Type::UntaggedPtr(), kMachPtr}; | 43 Type::UntaggedPtr(), kMachPtr}; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 case kExternalFloat64Array: | 81 case kExternalFloat64Array: |
89 return {taggedness, header_size, Type::Number(), kRepFloat64}; | 82 return {taggedness, header_size, Type::Number(), kRepFloat64}; |
90 } | 83 } |
91 UNREACHABLE(); | 84 UNREACHABLE(); |
92 return {kUntaggedBase, 0, Type::None(), kMachNone}; | 85 return {kUntaggedBase, 0, Type::None(), kMachNone}; |
93 } | 86 } |
94 | 87 |
95 } // namespace compiler | 88 } // namespace compiler |
96 } // namespace internal | 89 } // namespace internal |
97 } // namespace v8 | 90 } // namespace v8 |
OLD | NEW |