Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/objects.h

Issue 2622833002: WIP [esnext] implement async iteration proposal (Closed)
Patch Set: fix async tests Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 V(ALLOCATION_SITE_TYPE) \ 383 V(ALLOCATION_SITE_TYPE) \
384 V(ALLOCATION_MEMENTO_TYPE) \ 384 V(ALLOCATION_MEMENTO_TYPE) \
385 V(SCRIPT_TYPE) \ 385 V(SCRIPT_TYPE) \
386 V(TYPE_FEEDBACK_INFO_TYPE) \ 386 V(TYPE_FEEDBACK_INFO_TYPE) \
387 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \ 387 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \
388 V(BOX_TYPE) \ 388 V(BOX_TYPE) \
389 V(PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE) \ 389 V(PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE) \
390 V(PROMISE_REACTION_JOB_INFO_TYPE) \ 390 V(PROMISE_REACTION_JOB_INFO_TYPE) \
391 V(DEBUG_INFO_TYPE) \ 391 V(DEBUG_INFO_TYPE) \
392 V(BREAK_POINT_INFO_TYPE) \ 392 V(BREAK_POINT_INFO_TYPE) \
393 V(ASYNC_GENERATOR_REQUEST_TYPE) \
393 V(PROTOTYPE_INFO_TYPE) \ 394 V(PROTOTYPE_INFO_TYPE) \
394 V(TUPLE2_TYPE) \ 395 V(TUPLE2_TYPE) \
395 V(TUPLE3_TYPE) \ 396 V(TUPLE3_TYPE) \
396 V(CONTEXT_EXTENSION_TYPE) \ 397 V(CONTEXT_EXTENSION_TYPE) \
397 V(CONSTANT_ELEMENTS_PAIR_TYPE) \ 398 V(CONSTANT_ELEMENTS_PAIR_TYPE) \
398 V(MODULE_TYPE) \ 399 V(MODULE_TYPE) \
399 V(MODULE_INFO_ENTRY_TYPE) \ 400 V(MODULE_INFO_ENTRY_TYPE) \
400 V(FIXED_ARRAY_TYPE) \ 401 V(FIXED_ARRAY_TYPE) \
401 V(TRANSITION_ARRAY_TYPE) \ 402 V(TRANSITION_ARRAY_TYPE) \
402 V(SHARED_FUNCTION_INFO_TYPE) \ 403 V(SHARED_FUNCTION_INFO_TYPE) \
403 V(CELL_TYPE) \ 404 V(CELL_TYPE) \
404 V(WEAK_CELL_TYPE) \ 405 V(WEAK_CELL_TYPE) \
405 V(PROPERTY_CELL_TYPE) \ 406 V(PROPERTY_CELL_TYPE) \
406 \ 407 \
407 V(JS_PROXY_TYPE) \ 408 V(JS_PROXY_TYPE) \
408 V(JS_GLOBAL_OBJECT_TYPE) \ 409 V(JS_GLOBAL_OBJECT_TYPE) \
409 V(JS_GLOBAL_PROXY_TYPE) \ 410 V(JS_GLOBAL_PROXY_TYPE) \
410 V(JS_SPECIAL_API_OBJECT_TYPE) \ 411 V(JS_SPECIAL_API_OBJECT_TYPE) \
411 V(JS_VALUE_TYPE) \ 412 V(JS_VALUE_TYPE) \
412 V(JS_MESSAGE_OBJECT_TYPE) \ 413 V(JS_MESSAGE_OBJECT_TYPE) \
413 V(JS_DATE_TYPE) \ 414 V(JS_DATE_TYPE) \
414 V(JS_API_OBJECT_TYPE) \ 415 V(JS_API_OBJECT_TYPE) \
415 V(JS_OBJECT_TYPE) \ 416 V(JS_OBJECT_TYPE) \
416 V(JS_ARGUMENTS_TYPE) \ 417 V(JS_ARGUMENTS_TYPE) \
417 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \ 418 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \
418 V(JS_GENERATOR_OBJECT_TYPE) \ 419 V(JS_GENERATOR_OBJECT_TYPE) \
420 V(JS_ASYNC_GENERATOR_OBJECT_TYPE) \
421 V(JS_ASYNC_FROM_SYNC_ITERATOR_TYPE) \
419 V(JS_MODULE_NAMESPACE_TYPE) \ 422 V(JS_MODULE_NAMESPACE_TYPE) \
420 V(JS_ARRAY_TYPE) \ 423 V(JS_ARRAY_TYPE) \
421 V(JS_ARRAY_BUFFER_TYPE) \ 424 V(JS_ARRAY_BUFFER_TYPE) \
422 V(JS_TYPED_ARRAY_TYPE) \ 425 V(JS_TYPED_ARRAY_TYPE) \
423 V(JS_DATA_VIEW_TYPE) \ 426 V(JS_DATA_VIEW_TYPE) \
424 V(JS_SET_TYPE) \ 427 V(JS_SET_TYPE) \
425 V(JS_MAP_TYPE) \ 428 V(JS_MAP_TYPE) \
426 V(JS_SET_ITERATOR_TYPE) \ 429 V(JS_SET_ITERATOR_TYPE) \
427 V(JS_MAP_ITERATOR_TYPE) \ 430 V(JS_MAP_ITERATOR_TYPE) \
428 V(JS_WEAK_MAP_TYPE) \ 431 V(JS_WEAK_MAP_TYPE) \
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 V(PROMISE_REACTION_JOB_INFO, PromiseReactionJobInfo, \ 561 V(PROMISE_REACTION_JOB_INFO, PromiseReactionJobInfo, \
559 promise_reaction_job_info) \ 562 promise_reaction_job_info) \
560 V(DEBUG_INFO, DebugInfo, debug_info) \ 563 V(DEBUG_INFO, DebugInfo, debug_info) \
561 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) \ 564 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) \
562 V(PROTOTYPE_INFO, PrototypeInfo, prototype_info) \ 565 V(PROTOTYPE_INFO, PrototypeInfo, prototype_info) \
563 V(TUPLE2, Tuple2, tuple2) \ 566 V(TUPLE2, Tuple2, tuple2) \
564 V(TUPLE3, Tuple3, tuple3) \ 567 V(TUPLE3, Tuple3, tuple3) \
565 V(CONTEXT_EXTENSION, ContextExtension, context_extension) \ 568 V(CONTEXT_EXTENSION, ContextExtension, context_extension) \
566 V(CONSTANT_ELEMENTS_PAIR, ConstantElementsPair, constant_elements_pair) \ 569 V(CONSTANT_ELEMENTS_PAIR, ConstantElementsPair, constant_elements_pair) \
567 V(MODULE, Module, module) \ 570 V(MODULE, Module, module) \
568 V(MODULE_INFO_ENTRY, ModuleInfoEntry, module_info_entry) 571 V(MODULE_INFO_ENTRY, ModuleInfoEntry, module_info_entry) \
572 V(ASYNC_GENERATOR_REQUEST, AsyncGeneratorRequest, async_generator_request)
569 573
570 // We use the full 8 bits of the instance_type field to encode heap object 574 // We use the full 8 bits of the instance_type field to encode heap object
571 // instance types. The high-order bit (bit 7) is set if the object is not a 575 // instance types. The high-order bit (bit 7) is set if the object is not a
572 // string, and cleared if it is a string. 576 // string, and cleared if it is a string.
573 const uint32_t kIsNotStringMask = 0x80; 577 const uint32_t kIsNotStringMask = 0x80;
574 const uint32_t kStringTag = 0x0; 578 const uint32_t kStringTag = 0x0;
575 const uint32_t kNotStringTag = 0x80; 579 const uint32_t kNotStringTag = 0x80;
576 580
577 // Bit 6 indicates that the object is an internalized string (if set) or not. 581 // Bit 6 indicates that the object is an internalized string (if set) or not.
578 // Bit 7 has to be clear as well. 582 // Bit 7 has to be clear as well.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 FUNCTION_TEMPLATE_INFO_TYPE, 726 FUNCTION_TEMPLATE_INFO_TYPE,
723 OBJECT_TEMPLATE_INFO_TYPE, 727 OBJECT_TEMPLATE_INFO_TYPE,
724 ALLOCATION_SITE_TYPE, 728 ALLOCATION_SITE_TYPE,
725 ALLOCATION_MEMENTO_TYPE, 729 ALLOCATION_MEMENTO_TYPE,
726 SCRIPT_TYPE, 730 SCRIPT_TYPE,
727 TYPE_FEEDBACK_INFO_TYPE, 731 TYPE_FEEDBACK_INFO_TYPE,
728 ALIASED_ARGUMENTS_ENTRY_TYPE, 732 ALIASED_ARGUMENTS_ENTRY_TYPE,
729 BOX_TYPE, 733 BOX_TYPE,
730 PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE, 734 PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE,
731 PROMISE_REACTION_JOB_INFO_TYPE, 735 PROMISE_REACTION_JOB_INFO_TYPE,
736 ASYNC_GENERATOR_REQUEST_TYPE,
732 DEBUG_INFO_TYPE, 737 DEBUG_INFO_TYPE,
733 BREAK_POINT_INFO_TYPE, 738 BREAK_POINT_INFO_TYPE,
734 PROTOTYPE_INFO_TYPE, 739 PROTOTYPE_INFO_TYPE,
735 TUPLE2_TYPE, 740 TUPLE2_TYPE,
736 TUPLE3_TYPE, 741 TUPLE3_TYPE,
737 CONTEXT_EXTENSION_TYPE, 742 CONTEXT_EXTENSION_TYPE,
738 CONSTANT_ELEMENTS_PAIR_TYPE, 743 CONSTANT_ELEMENTS_PAIR_TYPE,
739 MODULE_TYPE, 744 MODULE_TYPE,
740 MODULE_INFO_ENTRY_TYPE, 745 MODULE_INFO_ENTRY_TYPE,
741 FIXED_ARRAY_TYPE, 746 FIXED_ARRAY_TYPE,
(...skipping 15 matching lines...) Expand all
757 JS_SPECIAL_API_OBJECT_TYPE, // LAST_SPECIAL_RECEIVER_TYPE 762 JS_SPECIAL_API_OBJECT_TYPE, // LAST_SPECIAL_RECEIVER_TYPE
758 JS_VALUE_TYPE, // LAST_CUSTOM_ELEMENTS_RECEIVER 763 JS_VALUE_TYPE, // LAST_CUSTOM_ELEMENTS_RECEIVER
759 JS_MESSAGE_OBJECT_TYPE, 764 JS_MESSAGE_OBJECT_TYPE,
760 JS_DATE_TYPE, 765 JS_DATE_TYPE,
761 // Like JS_OBJECT_TYPE, but created from API function. 766 // Like JS_OBJECT_TYPE, but created from API function.
762 JS_API_OBJECT_TYPE, 767 JS_API_OBJECT_TYPE,
763 JS_OBJECT_TYPE, 768 JS_OBJECT_TYPE,
764 JS_ARGUMENTS_TYPE, 769 JS_ARGUMENTS_TYPE,
765 JS_CONTEXT_EXTENSION_OBJECT_TYPE, 770 JS_CONTEXT_EXTENSION_OBJECT_TYPE,
766 JS_GENERATOR_OBJECT_TYPE, 771 JS_GENERATOR_OBJECT_TYPE,
772 JS_ASYNC_GENERATOR_OBJECT_TYPE,
773 JS_ASYNC_FROM_SYNC_ITERATOR_TYPE,
767 JS_MODULE_NAMESPACE_TYPE, 774 JS_MODULE_NAMESPACE_TYPE,
768 JS_ARRAY_TYPE, 775 JS_ARRAY_TYPE,
769 JS_ARRAY_BUFFER_TYPE, 776 JS_ARRAY_BUFFER_TYPE,
770 JS_TYPED_ARRAY_TYPE, 777 JS_TYPED_ARRAY_TYPE,
771 JS_DATA_VIEW_TYPE, 778 JS_DATA_VIEW_TYPE,
772 JS_SET_TYPE, 779 JS_SET_TYPE,
773 JS_MAP_TYPE, 780 JS_MAP_TYPE,
774 JS_SET_ITERATOR_TYPE, 781 JS_SET_ITERATOR_TYPE,
775 JS_MAP_ITERATOR_TYPE, 782 JS_MAP_ITERATOR_TYPE,
776 JS_WEAK_MAP_TYPE, 783 JS_WEAK_MAP_TYPE,
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 V(FixedInt32Array) \ 1054 V(FixedInt32Array) \
1048 V(FixedFloat32Array) \ 1055 V(FixedFloat32Array) \
1049 V(FixedFloat64Array) \ 1056 V(FixedFloat64Array) \
1050 V(FixedUint8ClampedArray) \ 1057 V(FixedUint8ClampedArray) \
1051 V(ByteArray) \ 1058 V(ByteArray) \
1052 V(BytecodeArray) \ 1059 V(BytecodeArray) \
1053 V(FreeSpace) \ 1060 V(FreeSpace) \
1054 V(JSReceiver) \ 1061 V(JSReceiver) \
1055 V(JSObject) \ 1062 V(JSObject) \
1056 V(JSArgumentsObject) \ 1063 V(JSArgumentsObject) \
1064 V(JSAsyncFromSyncIterator) \
1057 V(JSContextExtensionObject) \ 1065 V(JSContextExtensionObject) \
1058 V(JSGeneratorObject) \ 1066 V(JSGeneratorObject) \
1067 V(JSAsyncGeneratorObject) \
1059 V(JSModuleNamespace) \ 1068 V(JSModuleNamespace) \
1060 V(Map) \ 1069 V(Map) \
1061 V(DescriptorArray) \ 1070 V(DescriptorArray) \
1062 V(FrameArray) \ 1071 V(FrameArray) \
1063 V(TransitionArray) \ 1072 V(TransitionArray) \
1064 V(LiteralsArray) \ 1073 V(LiteralsArray) \
1065 V(TypeFeedbackMetadata) \ 1074 V(TypeFeedbackMetadata) \
1066 V(TypeFeedbackVector) \ 1075 V(TypeFeedbackVector) \
1067 V(DeoptimizationInputData) \ 1076 V(DeoptimizationInputData) \
1068 V(DeoptimizationOutputData) \ 1077 V(DeoptimizationOutputData) \
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after
2756 static const int kDoneOffset = kValueOffset + kPointerSize; 2765 static const int kDoneOffset = kValueOffset + kPointerSize;
2757 static const int kSize = kDoneOffset + kPointerSize; 2766 static const int kSize = kDoneOffset + kPointerSize;
2758 // Indices of in-object properties. 2767 // Indices of in-object properties.
2759 static const int kValueIndex = 0; 2768 static const int kValueIndex = 0;
2760 static const int kDoneIndex = 1; 2769 static const int kDoneIndex = 1;
2761 2770
2762 private: 2771 private:
2763 DISALLOW_IMPLICIT_CONSTRUCTORS(JSIteratorResult); 2772 DISALLOW_IMPLICIT_CONSTRUCTORS(JSIteratorResult);
2764 }; 2773 };
2765 2774
2775 class JSAsyncFromSyncIterator : public JSObject {
2776 public:
2777 DECLARE_CAST(JSAsyncFromSyncIterator)
2778
2779 DECLARE_PRINTER(JSAsyncFromSyncIterator)
2780 DECLARE_VERIFIER(JSAsyncFromSyncIterator)
2781
2782 // Async-from-Sync Iterator instances are ordinary objects that inherit
2783 // properties from the %AsyncFromSyncIteratorPrototype% intrinsic object.
2784 // Async-from-Sync Iterator instances are initially created with the internal
2785 // slots listed in Table 4.
2786 // (proposal-async-iteration/#table-async-from-sync-iterator-internal-slots)
2787 DECL_ACCESSORS(sync_iterator, HeapObject)
2788
2789 // Offsets of object fields.
2790 static const int kSyncIteratorOffset = JSObject::kHeaderSize;
2791 static const int kSize = kSyncIteratorOffset + kPointerSize;
2792
2793 private:
2794 DISALLOW_IMPLICIT_CONSTRUCTORS(JSAsyncFromSyncIterator);
2795 };
2766 2796
2767 // Common superclass for JSSloppyArgumentsObject and JSStrictArgumentsObject. 2797 // Common superclass for JSSloppyArgumentsObject and JSStrictArgumentsObject.
2768 class JSArgumentsObject: public JSObject { 2798 class JSArgumentsObject: public JSObject {
2769 public: 2799 public:
2770 // Offsets of object fields. 2800 // Offsets of object fields.
2771 static const int kLengthOffset = JSObject::kHeaderSize; 2801 static const int kLengthOffset = JSObject::kHeaderSize;
2772 static const int kHeaderSize = kLengthOffset + kPointerSize; 2802 static const int kHeaderSize = kLengthOffset + kPointerSize;
2773 // Indices of in-object properties. 2803 // Indices of in-object properties.
2774 static const int kLengthIndex = 0; 2804 static const int kLengthIndex = 0;
2775 2805
(...skipping 3859 matching lines...) Expand 10 before | Expand all | Expand 10 after
6635 static const int kSize = kContextOffset + kPointerSize; 6665 static const int kSize = kContextOffset + kPointerSize;
6636 6666
6637 DECLARE_CAST(PromiseReactionJobInfo) 6667 DECLARE_CAST(PromiseReactionJobInfo)
6638 DECLARE_PRINTER(PromiseReactionJobInfo) 6668 DECLARE_PRINTER(PromiseReactionJobInfo)
6639 DECLARE_VERIFIER(PromiseReactionJobInfo) 6669 DECLARE_VERIFIER(PromiseReactionJobInfo)
6640 6670
6641 private: 6671 private:
6642 DISALLOW_IMPLICIT_CONSTRUCTORS(PromiseReactionJobInfo); 6672 DISALLOW_IMPLICIT_CONSTRUCTORS(PromiseReactionJobInfo);
6643 }; 6673 };
6644 6674
6675 class AsyncGeneratorRequest : public Struct {
6676 public:
6677 // Holds an AsyncGeneratorRequest, or Undefined.
6678 DECL_ACCESSORS(next, Object)
6679 DECL_INT_ACCESSORS(resume_mode)
6680 DECL_ACCESSORS(value, Object)
6681 DECL_ACCESSORS(promise, Object)
6682 DECL_ACCESSORS(awaited_promise, Object)
6683
6684 static const int kNextOffset = Struct::kHeaderSize;
6685 static const int kResumeModeOffset = kNextOffset + kPointerSize;
6686 static const int kValueOffset = kResumeModeOffset + kPointerSize;
6687 static const int kPromiseOffset = kValueOffset + kPointerSize;
6688 static const int kAwaitedPromiseOffset = kPromiseOffset + kPointerSize;
6689 static const int kSize = kAwaitedPromiseOffset + kPointerSize;
6690
6691 DECLARE_CAST(AsyncGeneratorRequest)
6692 DECLARE_PRINTER(AsyncGeneratorRequest)
6693 DECLARE_VERIFIER(AsyncGeneratorRequest)
6694
6695 private:
6696 DISALLOW_IMPLICIT_CONSTRUCTORS(AsyncGeneratorRequest);
6697 };
6698
6645 // A simple one-element struct, useful where smis need to be boxed. 6699 // A simple one-element struct, useful where smis need to be boxed.
6646 class Box : public Struct { 6700 class Box : public Struct {
6647 public: 6701 public:
6648 // [value]: the boxed contents. 6702 // [value]: the boxed contents.
6649 DECL_ACCESSORS(value, Object) 6703 DECL_ACCESSORS(value, Object)
6650 6704
6651 DECLARE_CAST(Box) 6705 DECLARE_CAST(Box)
6652 6706
6653 // Dispatched behavior. 6707 // Dispatched behavior.
6654 DECLARE_PRINTER(Box) 6708 DECLARE_PRINTER(Box)
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
7879 7933
7880 // [context]: The context of the suspended computation. 7934 // [context]: The context of the suspended computation.
7881 DECL_ACCESSORS(context, Context) 7935 DECL_ACCESSORS(context, Context)
7882 7936
7883 // [receiver]: The receiver of the suspended computation. 7937 // [receiver]: The receiver of the suspended computation.
7884 DECL_ACCESSORS(receiver, Object) 7938 DECL_ACCESSORS(receiver, Object)
7885 7939
7886 // [input_or_debug_pos] 7940 // [input_or_debug_pos]
7887 // For executing generators: the most recent input value. 7941 // For executing generators: the most recent input value.
7888 // For suspended generators: debug information (bytecode offset). 7942 // For suspended generators: debug information (bytecode offset).
7889 // There is currently no need to remember the most recent input value for a 7943 // If a generator has been suspended via Await(), then the previous input
7890 // suspended generator. 7944 // value is moved to the Await value register, and restored on resume.
7891 DECL_ACCESSORS(input_or_debug_pos, Object) 7945 DECL_ACCESSORS(input_or_debug_pos, Object)
7946 DECL_ACCESSORS(await_input, Object)
Dan Ehrenberg 2017/01/13 19:41:09 Why is this added to JSGeneratorObject? I would ex
caitp 2017/01/13 20:11:52 I don't think it matters a whole lot, but OK, will
7892 7947
7893 // [resume_mode]: The most recent resume mode. 7948 // [resume_mode]: The most recent resume mode.
7894 enum ResumeMode { kNext, kReturn, kThrow }; 7949 enum ResumeMode { kNext, kReturn, kThrow };
7895 DECL_INT_ACCESSORS(resume_mode) 7950 DECL_INT_ACCESSORS(resume_mode)
7896 7951
7897 // [continuation] 7952 // [continuation]
7898 // 7953 //
7899 // A positive value indicates a suspended generator. The special 7954 // A positive value indicates a suspended generator. The special
7900 // kGeneratorExecuting and kGeneratorClosed values indicate that a generator 7955 // kGeneratorExecuting and kGeneratorClosed values indicate that a generator
7901 // cannot be resumed. 7956 // cannot be resumed.
(...skipping 17 matching lines...) Expand all
7919 7974
7920 // Magic sentinel values for the continuation. 7975 // Magic sentinel values for the continuation.
7921 static const int kGeneratorExecuting = -2; 7976 static const int kGeneratorExecuting = -2;
7922 static const int kGeneratorClosed = -1; 7977 static const int kGeneratorClosed = -1;
7923 7978
7924 // Layout description. 7979 // Layout description.
7925 static const int kFunctionOffset = JSObject::kHeaderSize; 7980 static const int kFunctionOffset = JSObject::kHeaderSize;
7926 static const int kContextOffset = kFunctionOffset + kPointerSize; 7981 static const int kContextOffset = kFunctionOffset + kPointerSize;
7927 static const int kReceiverOffset = kContextOffset + kPointerSize; 7982 static const int kReceiverOffset = kContextOffset + kPointerSize;
7928 static const int kInputOrDebugPosOffset = kReceiverOffset + kPointerSize; 7983 static const int kInputOrDebugPosOffset = kReceiverOffset + kPointerSize;
7929 static const int kResumeModeOffset = kInputOrDebugPosOffset + kPointerSize; 7984 static const int kAwaitInputOffset = kInputOrDebugPosOffset + kPointerSize;
7985 static const int kResumeModeOffset = kAwaitInputOffset + kPointerSize;
7930 static const int kContinuationOffset = kResumeModeOffset + kPointerSize; 7986 static const int kContinuationOffset = kResumeModeOffset + kPointerSize;
7931 static const int kRegisterFileOffset = kContinuationOffset + kPointerSize; 7987 static const int kRegisterFileOffset = kContinuationOffset + kPointerSize;
7932 static const int kSize = kRegisterFileOffset + kPointerSize; 7988 static const int kSize = kRegisterFileOffset + kPointerSize;
7933 7989
7934 private: 7990 private:
7935 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject); 7991 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject);
7936 }; 7992 };
7937 7993
7994 class JSAsyncGeneratorObject : public JSGeneratorObject {
7995 public:
7996 DECLARE_CAST(JSAsyncGeneratorObject)
7997
7998 // Dispatched behavior.
7999 DECLARE_VERIFIER(JSAsyncGeneratorObject)
8000
8001 // [queue]
8002 // Pointer to the head of a singly linked list of AsyncGeneratorRequest, or
8003 // undefined.
8004 DECL_ACCESSORS(queue, HeapObject)
8005
8006 // [awaited_promise]
8007 // A reference to the Promise of an AwaitExpression.
8008 DECL_ACCESSORS(awaited_promise, HeapObject)
8009
8010 // Layout description.
8011 static const int kQueueOffset = JSGeneratorObject::kSize;
8012 static const int kSize = kQueueOffset + kPointerSize;
8013
8014 private:
8015 DISALLOW_IMPLICIT_CONSTRUCTORS(JSAsyncGeneratorObject);
8016 };
8017
7938 class ModuleInfoEntry : public Struct { 8018 class ModuleInfoEntry : public Struct {
7939 public: 8019 public:
7940 DECLARE_CAST(ModuleInfoEntry) 8020 DECLARE_CAST(ModuleInfoEntry)
7941 DECLARE_PRINTER(ModuleInfoEntry) 8021 DECLARE_PRINTER(ModuleInfoEntry)
7942 DECLARE_VERIFIER(ModuleInfoEntry) 8022 DECLARE_VERIFIER(ModuleInfoEntry)
7943 8023
7944 DECL_ACCESSORS(export_name, Object) 8024 DECL_ACCESSORS(export_name, Object)
7945 DECL_ACCESSORS(local_name, Object) 8025 DECL_ACCESSORS(local_name, Object)
7946 DECL_ACCESSORS(import_name, Object) 8026 DECL_ACCESSORS(import_name, Object)
7947 DECL_INT_ACCESSORS(module_request) 8027 DECL_INT_ACCESSORS(module_request)
(...skipping 3800 matching lines...) Expand 10 before | Expand all | Expand 10 after
11748 } 11828 }
11749 }; 11829 };
11750 11830
11751 11831
11752 } // NOLINT, false-positive due to second-order macros. 11832 } // NOLINT, false-positive due to second-order macros.
11753 } // NOLINT, false-positive due to second-order macros. 11833 } // NOLINT, false-positive due to second-order macros.
11754 11834
11755 #include "src/objects/object-macros-undef.h" 11835 #include "src/objects/object-macros-undef.h"
11756 11836
11757 #endif // V8_OBJECTS_H_ 11837 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698