| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 FieldAccess access = {kTaggedBase, | 146 FieldAccess access = {kTaggedBase, |
| 147 JSGeneratorObject::kContinuationOffset, | 147 JSGeneratorObject::kContinuationOffset, |
| 148 Handle<Name>(), | 148 Handle<Name>(), |
| 149 type_cache.kSmi, | 149 type_cache.kSmi, |
| 150 MachineType::AnyTagged(), | 150 MachineType::AnyTagged(), |
| 151 kNoWriteBarrier}; | 151 kNoWriteBarrier}; |
| 152 return access; | 152 return access; |
| 153 } | 153 } |
| 154 | 154 |
| 155 // static | 155 // static |
| 156 FieldAccess AccessBuilder::ForJSGeneratorObjectInput() { |
| 157 FieldAccess access = { |
| 158 kTaggedBase, JSGeneratorObject::kInputOffset, Handle<Name>(), |
| 159 Type::Any(), MachineType::AnyTagged(), kFullWriteBarrier}; |
| 160 return access; |
| 161 } |
| 162 |
| 163 // static |
| 156 FieldAccess AccessBuilder::ForJSGeneratorObjectOperandStack() { | 164 FieldAccess AccessBuilder::ForJSGeneratorObjectOperandStack() { |
| 157 FieldAccess access = {kTaggedBase, | 165 FieldAccess access = {kTaggedBase, |
| 158 JSGeneratorObject::kOperandStackOffset, | 166 JSGeneratorObject::kOperandStackOffset, |
| 159 Handle<Name>(), | 167 Handle<Name>(), |
| 160 Type::Internal(), | 168 Type::Internal(), |
| 161 MachineType::AnyTagged(), | 169 MachineType::AnyTagged(), |
| 162 kPointerWriteBarrier}; | 170 kPointerWriteBarrier}; |
| 163 return access; | 171 return access; |
| 164 } | 172 } |
| 165 | 173 |
| 166 // static | 174 // static |
| 175 FieldAccess AccessBuilder::ForJSGeneratorObjectResumeMode() { |
| 176 TypeCache const& type_cache = TypeCache::Get(); |
| 177 FieldAccess access = {kTaggedBase, |
| 178 JSGeneratorObject::kResumeModeOffset, |
| 179 Handle<Name>(), |
| 180 type_cache.kSmi, |
| 181 MachineType::AnyTagged(), |
| 182 kNoWriteBarrier}; |
| 183 return access; |
| 184 } |
| 185 |
| 186 // static |
| 167 FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) { | 187 FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) { |
| 168 TypeCache const& type_cache = TypeCache::Get(); | 188 TypeCache const& type_cache = TypeCache::Get(); |
| 169 FieldAccess access = {kTaggedBase, | 189 FieldAccess access = {kTaggedBase, |
| 170 JSArray::kLengthOffset, | 190 JSArray::kLengthOffset, |
| 171 Handle<Name>(), | 191 Handle<Name>(), |
| 172 type_cache.kJSArrayLengthType, | 192 type_cache.kJSArrayLengthType, |
| 173 MachineType::AnyTagged(), | 193 MachineType::AnyTagged(), |
| 174 kFullWriteBarrier}; | 194 kFullWriteBarrier}; |
| 175 if (IsFastDoubleElementsKind(elements_kind)) { | 195 if (IsFastDoubleElementsKind(elements_kind)) { |
| 176 access.type = type_cache.kFixedDoubleArrayLengthType; | 196 access.type = type_cache.kFixedDoubleArrayLengthType; |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 553 } |
| 534 UNREACHABLE(); | 554 UNREACHABLE(); |
| 535 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), | 555 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), |
| 536 kNoWriteBarrier}; | 556 kNoWriteBarrier}; |
| 537 return access; | 557 return access; |
| 538 } | 558 } |
| 539 | 559 |
| 540 } // namespace compiler | 560 } // namespace compiler |
| 541 } // namespace internal | 561 } // namespace internal |
| 542 } // namespace v8 | 562 } // namespace v8 |
| OLD | NEW |