| 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/contexts.h" | 7 #include "src/contexts.h" |
| 8 #include "src/frames.h" | 8 #include "src/frames.h" |
| 9 #include "src/handles-inl.h" | 9 #include "src/handles-inl.h" |
| 10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 FieldAccess access = {kTaggedBase, | 123 FieldAccess access = {kTaggedBase, |
| 124 JSFunction::kNextFunctionLinkOffset, | 124 JSFunction::kNextFunctionLinkOffset, |
| 125 Handle<Name>(), | 125 Handle<Name>(), |
| 126 Type::Any(), | 126 Type::Any(), |
| 127 MachineType::AnyTagged(), | 127 MachineType::AnyTagged(), |
| 128 kPointerWriteBarrier}; | 128 kPointerWriteBarrier}; |
| 129 return access; | 129 return access; |
| 130 } | 130 } |
| 131 | 131 |
| 132 // static | 132 // static |
| 133 FieldAccess AccessBuilder::ForJSGeneratorObjectContext() { |
| 134 FieldAccess access = {kTaggedBase, |
| 135 JSGeneratorObject::kContextOffset, |
| 136 Handle<Name>(), |
| 137 Type::Internal(), |
| 138 MachineType::AnyTagged(), |
| 139 kPointerWriteBarrier}; |
| 140 return access; |
| 141 } |
| 142 |
| 143 // static |
| 144 FieldAccess AccessBuilder::ForJSGeneratorObjectContinuation() { |
| 145 TypeCache const& type_cache = TypeCache::Get(); |
| 146 FieldAccess access = {kTaggedBase, |
| 147 JSGeneratorObject::kContinuationOffset, |
| 148 Handle<Name>(), |
| 149 type_cache.kSmi, |
| 150 MachineType::AnyTagged(), |
| 151 kNoWriteBarrier}; |
| 152 return access; |
| 153 } |
| 154 |
| 155 // static |
| 156 FieldAccess AccessBuilder::ForJSGeneratorObjectOperandStack() { |
| 157 FieldAccess access = {kTaggedBase, |
| 158 JSGeneratorObject::kOperandStackOffset, |
| 159 Handle<Name>(), |
| 160 Type::Internal(), |
| 161 MachineType::AnyTagged(), |
| 162 kPointerWriteBarrier}; |
| 163 return access; |
| 164 } |
| 165 |
| 166 // static |
| 133 FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) { | 167 FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) { |
| 134 TypeCache const& type_cache = TypeCache::Get(); | 168 TypeCache const& type_cache = TypeCache::Get(); |
| 135 FieldAccess access = {kTaggedBase, | 169 FieldAccess access = {kTaggedBase, |
| 136 JSArray::kLengthOffset, | 170 JSArray::kLengthOffset, |
| 137 Handle<Name>(), | 171 Handle<Name>(), |
| 138 type_cache.kJSArrayLengthType, | 172 type_cache.kJSArrayLengthType, |
| 139 MachineType::AnyTagged(), | 173 MachineType::AnyTagged(), |
| 140 kFullWriteBarrier}; | 174 kFullWriteBarrier}; |
| 141 if (IsFastDoubleElementsKind(elements_kind)) { | 175 if (IsFastDoubleElementsKind(elements_kind)) { |
| 142 access.type = type_cache.kFixedDoubleArrayLengthType; | 176 access.type = type_cache.kFixedDoubleArrayLengthType; |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 } | 533 } |
| 500 UNREACHABLE(); | 534 UNREACHABLE(); |
| 501 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), | 535 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), |
| 502 kNoWriteBarrier}; | 536 kNoWriteBarrier}; |
| 503 return access; | 537 return access; |
| 504 } | 538 } |
| 505 | 539 |
| 506 } // namespace compiler | 540 } // namespace compiler |
| 507 } // namespace internal | 541 } // namespace internal |
| 508 } // namespace v8 | 542 } // namespace v8 |
| OLD | NEW |