| 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|    415   V(JS_ARRAY_TYPE)                                              \ |    415   V(JS_ARRAY_TYPE)                                              \ | 
|    416   V(JS_ARRAY_BUFFER_TYPE)                                       \ |    416   V(JS_ARRAY_BUFFER_TYPE)                                       \ | 
|    417   V(JS_TYPED_ARRAY_TYPE)                                        \ |    417   V(JS_TYPED_ARRAY_TYPE)                                        \ | 
|    418   V(JS_DATA_VIEW_TYPE)                                          \ |    418   V(JS_DATA_VIEW_TYPE)                                          \ | 
|    419   V(JS_SET_TYPE)                                                \ |    419   V(JS_SET_TYPE)                                                \ | 
|    420   V(JS_MAP_TYPE)                                                \ |    420   V(JS_MAP_TYPE)                                                \ | 
|    421   V(JS_SET_ITERATOR_TYPE)                                       \ |    421   V(JS_SET_ITERATOR_TYPE)                                       \ | 
|    422   V(JS_MAP_ITERATOR_TYPE)                                       \ |    422   V(JS_MAP_ITERATOR_TYPE)                                       \ | 
|    423   V(JS_WEAK_MAP_TYPE)                                           \ |    423   V(JS_WEAK_MAP_TYPE)                                           \ | 
|    424   V(JS_WEAK_SET_TYPE)                                           \ |    424   V(JS_WEAK_SET_TYPE)                                           \ | 
 |    425   V(JS_PROMISE_CAPABILITY_TYPE)                                 \ | 
|    425   V(JS_PROMISE_TYPE)                                            \ |    426   V(JS_PROMISE_TYPE)                                            \ | 
|    426   V(JS_REGEXP_TYPE)                                             \ |    427   V(JS_REGEXP_TYPE)                                             \ | 
|    427   V(JS_ERROR_TYPE)                                              \ |    428   V(JS_ERROR_TYPE)                                              \ | 
|    428   V(JS_STRING_ITERATOR_TYPE)                                    \ |    429   V(JS_STRING_ITERATOR_TYPE)                                    \ | 
|    429                                                                 \ |    430                                                                 \ | 
|    430   V(JS_TYPED_ARRAY_KEY_ITERATOR_TYPE)                           \ |    431   V(JS_TYPED_ARRAY_KEY_ITERATOR_TYPE)                           \ | 
|    431   V(JS_FAST_ARRAY_KEY_ITERATOR_TYPE)                            \ |    432   V(JS_FAST_ARRAY_KEY_ITERATOR_TYPE)                            \ | 
|    432   V(JS_GENERIC_ARRAY_KEY_ITERATOR_TYPE)                         \ |    433   V(JS_GENERIC_ARRAY_KEY_ITERATOR_TYPE)                         \ | 
|    433                                                                 \ |    434                                                                 \ | 
|    434   V(JS_UINT8_ARRAY_KEY_VALUE_ITERATOR_TYPE)                     \ |    435   V(JS_UINT8_ARRAY_KEY_VALUE_ITERATOR_TYPE)                     \ | 
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|    760   JS_ARRAY_TYPE, |    761   JS_ARRAY_TYPE, | 
|    761   JS_ARRAY_BUFFER_TYPE, |    762   JS_ARRAY_BUFFER_TYPE, | 
|    762   JS_TYPED_ARRAY_TYPE, |    763   JS_TYPED_ARRAY_TYPE, | 
|    763   JS_DATA_VIEW_TYPE, |    764   JS_DATA_VIEW_TYPE, | 
|    764   JS_SET_TYPE, |    765   JS_SET_TYPE, | 
|    765   JS_MAP_TYPE, |    766   JS_MAP_TYPE, | 
|    766   JS_SET_ITERATOR_TYPE, |    767   JS_SET_ITERATOR_TYPE, | 
|    767   JS_MAP_ITERATOR_TYPE, |    768   JS_MAP_ITERATOR_TYPE, | 
|    768   JS_WEAK_MAP_TYPE, |    769   JS_WEAK_MAP_TYPE, | 
|    769   JS_WEAK_SET_TYPE, |    770   JS_WEAK_SET_TYPE, | 
 |    771   JS_PROMISE_CAPABILITY_TYPE, | 
|    770   JS_PROMISE_TYPE, |    772   JS_PROMISE_TYPE, | 
|    771   JS_REGEXP_TYPE, |    773   JS_REGEXP_TYPE, | 
|    772   JS_ERROR_TYPE, |    774   JS_ERROR_TYPE, | 
|    773   JS_STRING_ITERATOR_TYPE, |    775   JS_STRING_ITERATOR_TYPE, | 
|    774  |    776  | 
|    775   JS_TYPED_ARRAY_KEY_ITERATOR_TYPE, |    777   JS_TYPED_ARRAY_KEY_ITERATOR_TYPE, | 
|    776   JS_FAST_ARRAY_KEY_ITERATOR_TYPE, |    778   JS_FAST_ARRAY_KEY_ITERATOR_TYPE, | 
|    777   JS_GENERIC_ARRAY_KEY_ITERATOR_TYPE, |    779   JS_GENERIC_ARRAY_KEY_ITERATOR_TYPE, | 
|    778  |    780  | 
|    779   JS_UINT8_ARRAY_KEY_VALUE_ITERATOR_TYPE, |    781   JS_UINT8_ARRAY_KEY_VALUE_ITERATOR_TYPE, | 
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   1081   V(Boolean)                     \ |   1083   V(Boolean)                     \ | 
|   1082   V(JSArray)                     \ |   1084   V(JSArray)                     \ | 
|   1083   V(JSArrayBuffer)               \ |   1085   V(JSArrayBuffer)               \ | 
|   1084   V(JSArrayBufferView)           \ |   1086   V(JSArrayBufferView)           \ | 
|   1085   V(JSCollection)                \ |   1087   V(JSCollection)                \ | 
|   1086   V(JSTypedArray)                \ |   1088   V(JSTypedArray)                \ | 
|   1087   V(JSArrayIterator)             \ |   1089   V(JSArrayIterator)             \ | 
|   1088   V(JSDataView)                  \ |   1090   V(JSDataView)                  \ | 
|   1089   V(JSProxy)                     \ |   1091   V(JSProxy)                     \ | 
|   1090   V(JSError)                     \ |   1092   V(JSError)                     \ | 
 |   1093   V(JSPromiseCapability)         \ | 
|   1091   V(JSPromise)                   \ |   1094   V(JSPromise)                   \ | 
|   1092   V(JSStringIterator)            \ |   1095   V(JSStringIterator)            \ | 
|   1093   V(JSSet)                       \ |   1096   V(JSSet)                       \ | 
|   1094   V(JSMap)                       \ |   1097   V(JSMap)                       \ | 
|   1095   V(JSSetIterator)               \ |   1098   V(JSSetIterator)               \ | 
|   1096   V(JSMapIterator)               \ |   1099   V(JSMapIterator)               \ | 
|   1097   V(JSWeakCollection)            \ |   1100   V(JSWeakCollection)            \ | 
|   1098   V(JSWeakMap)                   \ |   1101   V(JSWeakMap)                   \ | 
|   1099   V(JSWeakSet)                   \ |   1102   V(JSWeakSet)                   \ | 
|   1100   V(JSRegExp)                    \ |   1103   V(JSRegExp)                    \ | 
| (...skipping 7523 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   8624   static const int kStartPositionOffset = kStackFramesOffset + kPointerSize; |   8627   static const int kStartPositionOffset = kStackFramesOffset + kPointerSize; | 
|   8625   static const int kEndPositionOffset = kStartPositionOffset + kPointerSize; |   8628   static const int kEndPositionOffset = kStartPositionOffset + kPointerSize; | 
|   8626   static const int kErrorLevelOffset = kEndPositionOffset + kPointerSize; |   8629   static const int kErrorLevelOffset = kEndPositionOffset + kPointerSize; | 
|   8627   static const int kSize = kErrorLevelOffset + kPointerSize; |   8630   static const int kSize = kErrorLevelOffset + kPointerSize; | 
|   8628  |   8631  | 
|   8629   typedef FixedBodyDescriptor<HeapObject::kMapOffset, |   8632   typedef FixedBodyDescriptor<HeapObject::kMapOffset, | 
|   8630                               kStackFramesOffset + kPointerSize, |   8633                               kStackFramesOffset + kPointerSize, | 
|   8631                               kSize> BodyDescriptor; |   8634                               kSize> BodyDescriptor; | 
|   8632 }; |   8635 }; | 
|   8633  |   8636  | 
 |   8637 class JSPromise; | 
 |   8638 class JSPromiseCapability : public JSObject { | 
 |   8639  public: | 
 |   8640   DECLARE_CAST(JSPromiseCapability) | 
 |   8641  | 
 |   8642   DECLARE_VERIFIER(JSPromiseCapability) | 
 |   8643  | 
 |   8644   DECL_ACCESSORS(promise, Object) | 
 |   8645   DECL_ACCESSORS(resolve, Object) | 
 |   8646   DECL_ACCESSORS(reject, Object) | 
 |   8647  | 
 |   8648   static const int kPromiseOffset = JSObject::kHeaderSize; | 
 |   8649   static const int kResolveOffset = kPromiseOffset + kPointerSize; | 
 |   8650   static const int kRejectOffset = kResolveOffset + kPointerSize; | 
 |   8651   static const int kSize = kRejectOffset + kPointerSize; | 
 |   8652  | 
 |   8653   enum InObjectPropertyIndex { | 
 |   8654     kPromiseIndex, | 
 |   8655     kResolveIndex, | 
 |   8656     kRejectIndex, | 
 |   8657     kInObjectPropertyCount  // Dummy. | 
 |   8658   }; | 
 |   8659  | 
 |   8660  private: | 
 |   8661   DISALLOW_IMPLICIT_CONSTRUCTORS(JSPromiseCapability); | 
 |   8662 }; | 
 |   8663  | 
|   8634 class JSPromise : public JSObject { |   8664 class JSPromise : public JSObject { | 
|   8635  public: |   8665  public: | 
|   8636   DECL_INT_ACCESSORS(status) |   8666   DECL_INT_ACCESSORS(status) | 
|   8637   DECL_ACCESSORS(result, Object) |   8667   DECL_ACCESSORS(result, Object) | 
|   8638  |   8668  | 
|   8639   // There are 3 possible states for these fields -- |   8669   // There are 3 possible states for these fields -- | 
|   8640   // 1) Undefined -- This is the zero state when there is no callback |   8670   // 1) Undefined -- This is the zero state when there is no callback | 
|   8641   // or deferred registered. |   8671   // or deferred registered. | 
|   8642   // 2) Object -- There is a single Callable directly attached to the |   8672   // 2) Object -- There is a single Callable directly attached to the | 
|   8643   // fulfill_reactions, reject_reactions and the deferred JSObject is |   8673   // fulfill_reactions, reject_reactions and the deferred JSObject is | 
| (...skipping 3062 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  11706   } |  11736   } | 
|  11707 }; |  11737 }; | 
|  11708  |  11738  | 
|  11709  |  11739  | 
|  11710 }  // NOLINT, false-positive due to second-order macros. |  11740 }  // NOLINT, false-positive due to second-order macros. | 
|  11711 }  // NOLINT, false-positive due to second-order macros. |  11741 }  // NOLINT, false-positive due to second-order macros. | 
|  11712  |  11742  | 
|  11713 #include "src/objects/object-macros-undef.h" |  11743 #include "src/objects/object-macros-undef.h" | 
|  11714  |  11744  | 
|  11715 #endif  // V8_OBJECTS_H_ |  11745 #endif  // V8_OBJECTS_H_ | 
| OLD | NEW |