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/compiler/type-cache.h" | 7 #include "src/compiler/type-cache.h" |
8 #include "src/contexts.h" | 8 #include "src/contexts.h" |
9 #include "src/frames.h" | 9 #include "src/frames.h" |
10 #include "src/handles-inl.h" | 10 #include "src/handles-inl.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // static | 173 // static |
174 FieldAccess AccessBuilder::ForJSGeneratorObjectContext() { | 174 FieldAccess AccessBuilder::ForJSGeneratorObjectContext() { |
175 FieldAccess access = {kTaggedBase, JSGeneratorObject::kContextOffset, | 175 FieldAccess access = {kTaggedBase, JSGeneratorObject::kContextOffset, |
176 Handle<Name>(), MaybeHandle<Map>(), | 176 Handle<Name>(), MaybeHandle<Map>(), |
177 Type::Internal(), MachineType::TaggedPointer(), | 177 Type::Internal(), MachineType::TaggedPointer(), |
178 kPointerWriteBarrier}; | 178 kPointerWriteBarrier}; |
179 return access; | 179 return access; |
180 } | 180 } |
181 | 181 |
182 // static | 182 // static |
| 183 FieldAccess AccessBuilder::ForJSGeneratorObjectFunction() { |
| 184 FieldAccess access = {kTaggedBase, JSGeneratorObject::kFunctionOffset, |
| 185 Handle<Name>(), MaybeHandle<Map>(), |
| 186 Type::Function(), MachineType::TaggedPointer(), |
| 187 kPointerWriteBarrier}; |
| 188 return access; |
| 189 } |
| 190 |
| 191 // static |
| 192 FieldAccess AccessBuilder::ForJSGeneratorObjectReceiver() { |
| 193 FieldAccess access = {kTaggedBase, JSGeneratorObject::kReceiverOffset, |
| 194 Handle<Name>(), MaybeHandle<Map>(), |
| 195 Type::Internal(), MachineType::TaggedPointer(), |
| 196 kPointerWriteBarrier}; |
| 197 return access; |
| 198 } |
| 199 |
| 200 // static |
183 FieldAccess AccessBuilder::ForJSGeneratorObjectContinuation() { | 201 FieldAccess AccessBuilder::ForJSGeneratorObjectContinuation() { |
184 FieldAccess access = { | 202 FieldAccess access = { |
185 kTaggedBase, JSGeneratorObject::kContinuationOffset, | 203 kTaggedBase, JSGeneratorObject::kContinuationOffset, |
186 Handle<Name>(), MaybeHandle<Map>(), | 204 Handle<Name>(), MaybeHandle<Map>(), |
187 Type::SignedSmall(), MachineType::TaggedSigned(), | 205 Type::SignedSmall(), MachineType::TaggedSigned(), |
188 kNoWriteBarrier}; | 206 kNoWriteBarrier}; |
189 return access; | 207 return access; |
190 } | 208 } |
191 | 209 |
192 // static | 210 // static |
193 FieldAccess AccessBuilder::ForJSGeneratorObjectInputOrDebugPos() { | 211 FieldAccess AccessBuilder::ForJSGeneratorObjectInputOrDebugPos() { |
194 FieldAccess access = { | 212 FieldAccess access = { |
195 kTaggedBase, JSGeneratorObject::kInputOrDebugPosOffset, | 213 kTaggedBase, JSGeneratorObject::kInputOrDebugPosOffset, |
196 Handle<Name>(), MaybeHandle<Map>(), | 214 Handle<Name>(), MaybeHandle<Map>(), |
197 Type::NonInternal(), MachineType::AnyTagged(), | 215 Type::NonInternal(), MachineType::AnyTagged(), |
198 kFullWriteBarrier}; | 216 kFullWriteBarrier}; |
199 return access; | 217 return access; |
200 } | 218 } |
201 | 219 |
202 // static | |
203 FieldAccess AccessBuilder::ForJSAsyncGeneratorObjectAwaitInputOrDebugPos() { | |
204 FieldAccess access = { | |
205 kTaggedBase, JSAsyncGeneratorObject::kAwaitInputOrDebugPosOffset, | |
206 Handle<Name>(), MaybeHandle<Map>(), | |
207 Type::NonInternal(), MachineType::AnyTagged(), | |
208 kFullWriteBarrier}; | |
209 return access; | |
210 } | |
211 | 220 |
212 // static | 221 // static |
213 FieldAccess AccessBuilder::ForJSGeneratorObjectRegisterFile() { | 222 FieldAccess AccessBuilder::ForJSGeneratorObjectRegisterFile() { |
214 FieldAccess access = { | 223 FieldAccess access = { |
215 kTaggedBase, JSGeneratorObject::kRegisterFileOffset, | 224 kTaggedBase, JSGeneratorObject::kRegisterFileOffset, |
216 Handle<Name>(), MaybeHandle<Map>(), | 225 Handle<Name>(), MaybeHandle<Map>(), |
217 Type::Internal(), MachineType::AnyTagged(), | 226 Type::Internal(), MachineType::AnyTagged(), |
218 kPointerWriteBarrier}; | 227 kPointerWriteBarrier}; |
219 return access; | 228 return access; |
220 } | 229 } |
221 | 230 |
222 // static | 231 // static |
223 FieldAccess AccessBuilder::ForJSGeneratorObjectResumeMode() { | 232 FieldAccess AccessBuilder::ForJSGeneratorObjectResumeMode() { |
224 FieldAccess access = { | 233 FieldAccess access = { |
225 kTaggedBase, JSGeneratorObject::kResumeModeOffset, | 234 kTaggedBase, JSGeneratorObject::kResumeModeOffset, |
226 Handle<Name>(), MaybeHandle<Map>(), | 235 Handle<Name>(), MaybeHandle<Map>(), |
227 Type::SignedSmall(), MachineType::TaggedSigned(), | 236 Type::SignedSmall(), MachineType::TaggedSigned(), |
228 kNoWriteBarrier}; | 237 kNoWriteBarrier}; |
229 return access; | 238 return access; |
230 } | 239 } |
231 | 240 |
232 // static | 241 // static |
| 242 FieldAccess AccessBuilder::ForJSAsyncGeneratorObjectQueue() { |
| 243 FieldAccess access = { |
| 244 kTaggedBase, JSAsyncGeneratorObject::kQueueOffset, |
| 245 Handle<Name>(), MaybeHandle<Map>(), |
| 246 Type::NonInternal(), MachineType::AnyTagged(), |
| 247 kFullWriteBarrier}; |
| 248 return access; |
| 249 } |
| 250 |
| 251 // static |
| 252 FieldAccess AccessBuilder::ForJSAsyncGeneratorObjectAwaitInputOrDebugPos() { |
| 253 FieldAccess access = { |
| 254 kTaggedBase, JSAsyncGeneratorObject::kAwaitInputOrDebugPosOffset, |
| 255 Handle<Name>(), MaybeHandle<Map>(), |
| 256 Type::NonInternal(), MachineType::AnyTagged(), |
| 257 kFullWriteBarrier}; |
| 258 return access; |
| 259 } |
| 260 |
| 261 // static |
| 262 FieldAccess AccessBuilder::ForJSAsyncGeneratorObjectAwaitedPromise() { |
| 263 FieldAccess access = { |
| 264 kTaggedBase, JSAsyncGeneratorObject::kAwaitedPromiseOffset, |
| 265 Handle<Name>(), MaybeHandle<Map>(), |
| 266 Type::NonInternal(), MachineType::AnyTagged(), |
| 267 kFullWriteBarrier}; |
| 268 return access; |
| 269 } |
| 270 |
| 271 // static |
233 FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) { | 272 FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) { |
234 TypeCache const& type_cache = TypeCache::Get(); | 273 TypeCache const& type_cache = TypeCache::Get(); |
235 FieldAccess access = {kTaggedBase, | 274 FieldAccess access = {kTaggedBase, |
236 JSArray::kLengthOffset, | 275 JSArray::kLengthOffset, |
237 Handle<Name>(), | 276 Handle<Name>(), |
238 MaybeHandle<Map>(), | 277 MaybeHandle<Map>(), |
239 type_cache.kJSArrayLengthType, | 278 type_cache.kJSArrayLengthType, |
240 MachineType::TaggedSigned(), | 279 MachineType::TaggedSigned(), |
241 kFullWriteBarrier}; | 280 kFullWriteBarrier}; |
242 if (IsFastDoubleElementsKind(elements_kind)) { | 281 if (IsFastDoubleElementsKind(elements_kind)) { |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 MaybeHandle<Map>(), | 987 MaybeHandle<Map>(), |
949 Type::SignedSmall(), | 988 Type::SignedSmall(), |
950 MachineType::TaggedSigned(), | 989 MachineType::TaggedSigned(), |
951 kNoWriteBarrier}; | 990 kNoWriteBarrier}; |
952 return access; | 991 return access; |
953 } | 992 } |
954 | 993 |
955 } // namespace compiler | 994 } // namespace compiler |
956 } // namespace internal | 995 } // namespace internal |
957 } // namespace v8 | 996 } // namespace v8 |
OLD | NEW |