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

Side by Side Diff: src/builtins/builtins.h

Issue 2622833002: WIP [esnext] implement async iteration proposal (Closed)
Patch Set: Make (most of) for-await-of work (no IteratorClose yet..) 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_BUILTINS_BUILTINS_H_ 5 #ifndef V8_BUILTINS_BUILTINS_H_
6 #define V8_BUILTINS_BUILTINS_H_ 6 #define V8_BUILTINS_BUILTINS_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 10
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 TFJ(TypedArrayPrototypeByteLength, 0) \ 760 TFJ(TypedArrayPrototypeByteLength, 0) \
761 /* ES6 section 22.2.3.3 get %TypedArray%.prototype.byteOffset */ \ 761 /* ES6 section 22.2.3.3 get %TypedArray%.prototype.byteOffset */ \
762 TFJ(TypedArrayPrototypeByteOffset, 0) \ 762 TFJ(TypedArrayPrototypeByteOffset, 0) \
763 /* ES6 section 22.2.3.18 get %TypedArray%.prototype.length */ \ 763 /* ES6 section 22.2.3.18 get %TypedArray%.prototype.length */ \
764 TFJ(TypedArrayPrototypeLength, 0) \ 764 TFJ(TypedArrayPrototypeLength, 0) \
765 /* ES6 #sec-%typedarray%.prototype.entries */ \ 765 /* ES6 #sec-%typedarray%.prototype.entries */ \
766 TFJ(TypedArrayPrototypeEntries, 0) \ 766 TFJ(TypedArrayPrototypeEntries, 0) \
767 /* ES6 #sec-%typedarray%.prototype.keys */ \ 767 /* ES6 #sec-%typedarray%.prototype.keys */ \
768 TFJ(TypedArrayPrototypeKeys, 0) \ 768 TFJ(TypedArrayPrototypeKeys, 0) \
769 /* ES6 #sec-%typedarray%.prototype.values */ \ 769 /* ES6 #sec-%typedarray%.prototype.values */ \
770 TFJ(TypedArrayPrototypeValues, 0) 770 TFJ(TypedArrayPrototypeValues, 0) \
771 \
772 /* AsyncGenerator builtins */ \
773 \
774 /* AsyncGeneratorFunction( p1, p2, ... pn, body ) */ \
775 /* proposal-async-iteration/#sec-asyncgeneratorfunction-constructor */ \
776 CPP(AsyncGeneratorFunctionConstructor) \
777 /* AsyncGenerator.prototype.next ( value ) */ \
778 /* proposal-async-iteration/#sec-asyncgenerator-prototype-next */ \
779 TFJ(AsyncGeneratorPrototypeNext, 1) \
780 /* AsyncGenerator.prototype.return ( value ) */ \
781 /* proposal-async-iteration/#sec-asyncgenerator-prototype-return */ \
782 TFJ(AsyncGeneratorPrototypeReturn, 1) \
783 /* AsyncGenerator.prototype.throw ( exception ) */ \
784 /* proposal-async-iteration/#sec-asyncgenerator-prototype-throw */ \
785 TFJ(AsyncGeneratorPrototypeThrow, 1) \
786 \
787 /* Await (proposal-async-iteration/#await), with resume behaviour */ \
788 /* specific to Async Generators. Internal / Not exposed to JS code. */ \
789 TFJ(AsyncGeneratorAwaitCaught, 2) \
790 TFJ(AsyncGeneratorAwaitUncaught, 2) \
791 TFJ(AsyncGeneratorAwaitResolveClosure, 1) \
792 TFJ(AsyncGeneratorAwaitRejectClosure, 1) \
793 \
794 /* GeneratorYield (proposal-async-iteration/#sec-generatoryield) with */ \
795 /* resume behaviour specific to Async Generators. Internal / not exposed */ \
796 /* to JS code. */ \
797 TFJ(AsyncGeneratorYield, 1) \
798 \
799 /* Async-from-Sync Iterator builtins */ \
800 \
801 /* %AsyncFromSyncIteratorPrototype% */ \
802 /* (proposal-async-iteration/#sec-%asyncfromsynciteratorprototype%-object)*/ \
803 TFJ(AsyncFromSyncIteratorPrototypeNext, 1) \
804 TFJ(AsyncFromSyncIteratorPrototypeThrow, 1) \
805 TFJ(AsyncFromSyncIteratorPrototypeReturn, 1) \
806 \
807 /* proposal-async-iteration/#sec-async-iterator-value-unwrap-functions */ \
808 TFJ(AsyncIteratorValueUnwrap, 1)
771 809
772 #define IGNORE_BUILTIN(...) 810 #define IGNORE_BUILTIN(...)
773 811
774 #define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V) 812 #define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V)
775 813
776 #define BUILTIN_LIST_C(V) \ 814 #define BUILTIN_LIST_C(V) \
777 BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ 815 BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
778 IGNORE_BUILTIN, IGNORE_BUILTIN) 816 IGNORE_BUILTIN, IGNORE_BUILTIN)
779 817
780 #define BUILTIN_LIST_A(V) \ 818 #define BUILTIN_LIST_A(V) \
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 951
914 friend class Isolate; 952 friend class Isolate;
915 953
916 DISALLOW_COPY_AND_ASSIGN(Builtins); 954 DISALLOW_COPY_AND_ASSIGN(Builtins);
917 }; 955 };
918 956
919 } // namespace internal 957 } // namespace internal
920 } // namespace v8 958 } // namespace v8
921 959
922 #endif // V8_BUILTINS_BUILTINS_H_ 960 #endif // V8_BUILTINS_BUILTINS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698