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 6875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6886 static const int kSize = kContextOffset + kPointerSize; | 6886 static const int kSize = kContextOffset + kPointerSize; |
6887 | 6887 |
6888 DECLARE_CAST(PromiseResolveThenableJobInfo) | 6888 DECLARE_CAST(PromiseResolveThenableJobInfo) |
6889 DECLARE_PRINTER(PromiseResolveThenableJobInfo) | 6889 DECLARE_PRINTER(PromiseResolveThenableJobInfo) |
6890 DECLARE_VERIFIER(PromiseResolveThenableJobInfo) | 6890 DECLARE_VERIFIER(PromiseResolveThenableJobInfo) |
6891 | 6891 |
6892 private: | 6892 private: |
6893 DISALLOW_IMPLICIT_CONSTRUCTORS(PromiseResolveThenableJobInfo); | 6893 DISALLOW_IMPLICIT_CONSTRUCTORS(PromiseResolveThenableJobInfo); |
6894 }; | 6894 }; |
6895 | 6895 |
| 6896 class JSPromise; |
| 6897 |
6896 // Struct to hold state required for PromiseReactionJob. | 6898 // Struct to hold state required for PromiseReactionJob. |
6897 class PromiseReactionJobInfo : public Struct { | 6899 class PromiseReactionJobInfo : public Struct { |
6898 public: | 6900 public: |
| 6901 DECL_ACCESSORS(promise, JSPromise) |
6899 DECL_ACCESSORS(value, Object) | 6902 DECL_ACCESSORS(value, Object) |
6900 DECL_ACCESSORS(tasks, Object) | 6903 DECL_ACCESSORS(tasks, Object) |
6901 DECL_ACCESSORS(deferred, Object) | 6904 DECL_ACCESSORS(deferred, Object) |
6902 DECL_ACCESSORS(debug_id, Object) | 6905 DECL_ACCESSORS(debug_id, Object) |
6903 DECL_ACCESSORS(debug_name, Object) | 6906 DECL_ACCESSORS(debug_name, Object) |
6904 DECL_ACCESSORS(context, Context) | 6907 DECL_ACCESSORS(context, Context) |
6905 | 6908 |
6906 static const int kValueOffset = Struct::kHeaderSize; | 6909 static const int kPromiseOffset = Struct::kHeaderSize; |
| 6910 static const int kValueOffset = kPromiseOffset + kPointerSize; |
6907 static const int kTasksOffset = kValueOffset + kPointerSize; | 6911 static const int kTasksOffset = kValueOffset + kPointerSize; |
6908 static const int kDeferredOffset = kTasksOffset + kPointerSize; | 6912 static const int kDeferredOffset = kTasksOffset + kPointerSize; |
6909 static const int kDebugIdOffset = kDeferredOffset + kPointerSize; | 6913 static const int kDebugIdOffset = kDeferredOffset + kPointerSize; |
6910 static const int kDebugNameOffset = kDebugIdOffset + kPointerSize; | 6914 static const int kDebugNameOffset = kDebugIdOffset + kPointerSize; |
6911 static const int kContextOffset = kDebugNameOffset + kPointerSize; | 6915 static const int kContextOffset = kDebugNameOffset + kPointerSize; |
6912 static const int kSize = kContextOffset + kPointerSize; | 6916 static const int kSize = kContextOffset + kPointerSize; |
6913 | 6917 |
6914 DECLARE_CAST(PromiseReactionJobInfo) | 6918 DECLARE_CAST(PromiseReactionJobInfo) |
6915 DECLARE_PRINTER(PromiseReactionJobInfo) | 6919 DECLARE_PRINTER(PromiseReactionJobInfo) |
6916 DECLARE_VERIFIER(PromiseReactionJobInfo) | 6920 DECLARE_VERIFIER(PromiseReactionJobInfo) |
(...skipping 5091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12008 } | 12012 } |
12009 return value; | 12013 return value; |
12010 } | 12014 } |
12011 }; | 12015 }; |
12012 | 12016 |
12013 | 12017 |
12014 } // NOLINT, false-positive due to second-order macros. | 12018 } // NOLINT, false-positive due to second-order macros. |
12015 } // NOLINT, false-positive due to second-order macros. | 12019 } // NOLINT, false-positive due to second-order macros. |
12016 | 12020 |
12017 #endif // V8_OBJECTS_H_ | 12021 #endif // V8_OBJECTS_H_ |
OLD | NEW |