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 8894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8905 // or deferred registered. | 8905 // or deferred registered. |
8906 // 2) Object -- There is a single Callable directly attached to the | 8906 // 2) Object -- There is a single Callable directly attached to the |
8907 // fulfill_reactions, reject_reactions and the deferred JSObject is | 8907 // fulfill_reactions, reject_reactions and the deferred JSObject is |
8908 // directly attached to the deferred field. | 8908 // directly attached to the deferred field. |
8909 // 3) FixedArray -- There is more than one callback and deferred | 8909 // 3) FixedArray -- There is more than one callback and deferred |
8910 // attached to a FixedArray. | 8910 // attached to a FixedArray. |
8911 DECL_ACCESSORS(deferred, Object) | 8911 DECL_ACCESSORS(deferred, Object) |
8912 DECL_ACCESSORS(fulfill_reactions, Object) | 8912 DECL_ACCESSORS(fulfill_reactions, Object) |
8913 DECL_ACCESSORS(reject_reactions, Object) | 8913 DECL_ACCESSORS(reject_reactions, Object) |
8914 | 8914 |
8915 // TODO(gsathya): Use a BitField | |
8916 DECL_INT_ACCESSORS(has_handler) | |
jgruber
2016/12/07 12:59:38
Please add a comment for content meaning and possi
Igor Sheludko
2016/12/07 16:23:52
+1. Please turn this into smi "flag" field + boole
gsathya
2016/12/08 05:18:15
Done.
| |
8917 | |
8915 static const char* Status(int status); | 8918 static const char* Status(int status); |
8916 | 8919 |
8917 DECLARE_CAST(JSPromise) | 8920 DECLARE_CAST(JSPromise) |
8918 | 8921 |
8919 // Dispatched behavior. | 8922 // Dispatched behavior. |
8920 DECLARE_PRINTER(JSPromise) | 8923 DECLARE_PRINTER(JSPromise) |
8921 DECLARE_VERIFIER(JSPromise) | 8924 DECLARE_VERIFIER(JSPromise) |
8922 | 8925 |
8923 // Layout description. | 8926 // Layout description. |
8924 static const int kStatusOffset = JSObject::kHeaderSize; | 8927 static const int kStatusOffset = JSObject::kHeaderSize; |
8925 static const int kResultOffset = kStatusOffset + kPointerSize; | 8928 static const int kResultOffset = kStatusOffset + kPointerSize; |
8926 static const int kDeferredOffset = kResultOffset + kPointerSize; | 8929 static const int kDeferredOffset = kResultOffset + kPointerSize; |
8927 static const int kFulfillReactionsOffset = kDeferredOffset + kPointerSize; | 8930 static const int kFulfillReactionsOffset = kDeferredOffset + kPointerSize; |
8928 static const int kRejectReactionsOffset = | 8931 static const int kRejectReactionsOffset = |
8929 kFulfillReactionsOffset + kPointerSize; | 8932 kFulfillReactionsOffset + kPointerSize; |
8930 static const int kSize = kRejectReactionsOffset + kPointerSize; | 8933 static const int kHasHandlerOffset = kRejectReactionsOffset + kPointerSize; |
8934 static const int kSize = kHasHandlerOffset + kPointerSize; | |
8931 }; | 8935 }; |
8932 | 8936 |
8933 // Regular expressions | 8937 // Regular expressions |
8934 // The regular expression holds a single reference to a FixedArray in | 8938 // The regular expression holds a single reference to a FixedArray in |
8935 // the kDataOffset field. | 8939 // the kDataOffset field. |
8936 // The FixedArray contains the following data: | 8940 // The FixedArray contains the following data: |
8937 // - tag : type of regexp implementation (not compiled yet, atom or irregexp) | 8941 // - tag : type of regexp implementation (not compiled yet, atom or irregexp) |
8938 // - reference to the original source string | 8942 // - reference to the original source string |
8939 // - reference to the original flag string | 8943 // - reference to the original flag string |
8940 // If it is an atom regexp | 8944 // If it is an atom regexp |
(...skipping 3047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11988 } | 11992 } |
11989 return value; | 11993 return value; |
11990 } | 11994 } |
11991 }; | 11995 }; |
11992 | 11996 |
11993 | 11997 |
11994 } // NOLINT, false-positive due to second-order macros. | 11998 } // NOLINT, false-positive due to second-order macros. |
11995 } // NOLINT, false-positive due to second-order macros. | 11999 } // NOLINT, false-positive due to second-order macros. |
11996 | 12000 |
11997 #endif // V8_OBJECTS_H_ | 12001 #endif // V8_OBJECTS_H_ |
OLD | NEW |