OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 6542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6553 DECLARE_CAST(Struct) | 6553 DECLARE_CAST(Struct) |
6554 }; | 6554 }; |
6555 | 6555 |
6556 // A container struct to hold state required for PromiseResolveThenableJob. | 6556 // A container struct to hold state required for PromiseResolveThenableJob. |
6557 class PromiseResolveThenableJobInfo : public Struct { | 6557 class PromiseResolveThenableJobInfo : public Struct { |
6558 public: | 6558 public: |
6559 DECL_ACCESSORS(thenable, JSReceiver) | 6559 DECL_ACCESSORS(thenable, JSReceiver) |
6560 DECL_ACCESSORS(then, JSReceiver) | 6560 DECL_ACCESSORS(then, JSReceiver) |
6561 DECL_ACCESSORS(resolve, JSFunction) | 6561 DECL_ACCESSORS(resolve, JSFunction) |
6562 DECL_ACCESSORS(reject, JSFunction) | 6562 DECL_ACCESSORS(reject, JSFunction) |
6563 DECL_ACCESSORS(debug_id, Object) | 6563 |
6564 DECL_ACCESSORS(debug_name, Object) | 6564 DECL_INT_ACCESSORS(debug_id) |
| 6565 DECL_INT_ACCESSORS(debug_name) |
| 6566 |
6565 DECL_ACCESSORS(context, Context) | 6567 DECL_ACCESSORS(context, Context) |
6566 | 6568 |
6567 static const int kThenableOffset = Struct::kHeaderSize; | 6569 static const int kThenableOffset = Struct::kHeaderSize; |
6568 static const int kThenOffset = kThenableOffset + kPointerSize; | 6570 static const int kThenOffset = kThenableOffset + kPointerSize; |
6569 static const int kResolveOffset = kThenOffset + kPointerSize; | 6571 static const int kResolveOffset = kThenOffset + kPointerSize; |
6570 static const int kRejectOffset = kResolveOffset + kPointerSize; | 6572 static const int kRejectOffset = kResolveOffset + kPointerSize; |
6571 static const int kDebugIdOffset = kRejectOffset + kPointerSize; | 6573 static const int kDebugIdOffset = kRejectOffset + kPointerSize; |
6572 static const int kDebugNameOffset = kDebugIdOffset + kPointerSize; | 6574 static const int kDebugNameOffset = kDebugIdOffset + kPointerSize; |
6573 static const int kContextOffset = kDebugNameOffset + kPointerSize; | 6575 static const int kContextOffset = kDebugNameOffset + kPointerSize; |
6574 static const int kSize = kContextOffset + kPointerSize; | 6576 static const int kSize = kContextOffset + kPointerSize; |
(...skipping 13 matching lines...) Expand all Loading... |
6588 public: | 6590 public: |
6589 DECL_ACCESSORS(promise, JSPromise) | 6591 DECL_ACCESSORS(promise, JSPromise) |
6590 DECL_ACCESSORS(value, Object) | 6592 DECL_ACCESSORS(value, Object) |
6591 DECL_ACCESSORS(tasks, Object) | 6593 DECL_ACCESSORS(tasks, Object) |
6592 | 6594 |
6593 // Check comment in JSPromise for information on what state these | 6595 // Check comment in JSPromise for information on what state these |
6594 // deferred fields could be in. | 6596 // deferred fields could be in. |
6595 DECL_ACCESSORS(deferred_promise, Object) | 6597 DECL_ACCESSORS(deferred_promise, Object) |
6596 DECL_ACCESSORS(deferred_on_resolve, Object) | 6598 DECL_ACCESSORS(deferred_on_resolve, Object) |
6597 DECL_ACCESSORS(deferred_on_reject, Object) | 6599 DECL_ACCESSORS(deferred_on_reject, Object) |
6598 DECL_ACCESSORS(debug_id, Object) | 6600 |
6599 DECL_ACCESSORS(debug_name, Object) | 6601 DECL_INT_ACCESSORS(debug_id) |
| 6602 DECL_INT_ACCESSORS(debug_name) |
| 6603 |
6600 DECL_ACCESSORS(context, Context) | 6604 DECL_ACCESSORS(context, Context) |
6601 | 6605 |
6602 static const int kPromiseOffset = Struct::kHeaderSize; | 6606 static const int kPromiseOffset = Struct::kHeaderSize; |
6603 static const int kValueOffset = kPromiseOffset + kPointerSize; | 6607 static const int kValueOffset = kPromiseOffset + kPointerSize; |
6604 static const int kTasksOffset = kValueOffset + kPointerSize; | 6608 static const int kTasksOffset = kValueOffset + kPointerSize; |
6605 static const int kDeferredPromiseOffset = kTasksOffset + kPointerSize; | 6609 static const int kDeferredPromiseOffset = kTasksOffset + kPointerSize; |
6606 static const int kDeferredOnResolveOffset = | 6610 static const int kDeferredOnResolveOffset = |
6607 kDeferredPromiseOffset + kPointerSize; | 6611 kDeferredPromiseOffset + kPointerSize; |
6608 static const int kDeferredOnRejectOffset = | 6612 static const int kDeferredOnRejectOffset = |
6609 kDeferredOnResolveOffset + kPointerSize; | 6613 kDeferredOnResolveOffset + kPointerSize; |
(...skipping 5139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11749 } | 11753 } |
11750 }; | 11754 }; |
11751 | 11755 |
11752 | 11756 |
11753 } // NOLINT, false-positive due to second-order macros. | 11757 } // NOLINT, false-positive due to second-order macros. |
11754 } // NOLINT, false-positive due to second-order macros. | 11758 } // NOLINT, false-positive due to second-order macros. |
11755 | 11759 |
11756 #include "src/objects/object-macros-undef.h" | 11760 #include "src/objects/object-macros-undef.h" |
11757 | 11761 |
11758 #endif // V8_OBJECTS_H_ | 11762 #endif // V8_OBJECTS_H_ |
OLD | NEW |