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