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

Side by Side Diff: src/globals.h

Issue 1895603002: [esnext] prototype runtime implementation for async functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@AsyncFunction
Patch Set: Try new strategy (Option C) Created 4 years, 8 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_GLOBALS_H_ 5 #ifndef V8_GLOBALS_H_
6 #define V8_GLOBALS_H_ 6 #define V8_GLOBALS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 kBaseConstructor = 1 << 5, 944 kBaseConstructor = 1 << 5,
945 kGetterFunction = 1 << 6, 945 kGetterFunction = 1 << 6,
946 kSetterFunction = 1 << 7, 946 kSetterFunction = 1 << 7,
947 kAsyncFunction = 1 << 8, 947 kAsyncFunction = 1 << 8,
948 kAccessorFunction = kGetterFunction | kSetterFunction, 948 kAccessorFunction = kGetterFunction | kSetterFunction,
949 kDefaultBaseConstructor = kDefaultConstructor | kBaseConstructor, 949 kDefaultBaseConstructor = kDefaultConstructor | kBaseConstructor,
950 kDefaultSubclassConstructor = kDefaultConstructor | kSubclassConstructor, 950 kDefaultSubclassConstructor = kDefaultConstructor | kSubclassConstructor,
951 kClassConstructor = 951 kClassConstructor =
952 kBaseConstructor | kSubclassConstructor | kDefaultConstructor, 952 kBaseConstructor | kSubclassConstructor | kDefaultConstructor,
953 kAsyncArrowFunction = kArrowFunction | kAsyncFunction, 953 kAsyncArrowFunction = kArrowFunction | kAsyncFunction,
954 kAsyncConciseMethod = kAsyncFunction | kConciseMethod 954 kAsyncConciseMethod = kAsyncFunction | kConciseMethod,
955 kArrowGeneratorFunction = kGeneratorFunction | kArrowFunction
955 }; 956 };
956 957
957 inline bool IsValidFunctionKind(FunctionKind kind) { 958 inline bool IsValidFunctionKind(FunctionKind kind) {
958 return kind == FunctionKind::kNormalFunction || 959 return kind == FunctionKind::kNormalFunction ||
959 kind == FunctionKind::kArrowFunction || 960 kind == FunctionKind::kArrowFunction ||
960 kind == FunctionKind::kGeneratorFunction || 961 kind == FunctionKind::kGeneratorFunction ||
961 kind == FunctionKind::kConciseMethod || 962 kind == FunctionKind::kConciseMethod ||
962 kind == FunctionKind::kConciseGeneratorMethod || 963 kind == FunctionKind::kConciseGeneratorMethod ||
963 kind == FunctionKind::kGetterFunction || 964 kind == FunctionKind::kGetterFunction ||
964 kind == FunctionKind::kSetterFunction || 965 kind == FunctionKind::kSetterFunction ||
965 kind == FunctionKind::kAccessorFunction || 966 kind == FunctionKind::kAccessorFunction ||
966 kind == FunctionKind::kDefaultBaseConstructor || 967 kind == FunctionKind::kDefaultBaseConstructor ||
967 kind == FunctionKind::kDefaultSubclassConstructor || 968 kind == FunctionKind::kDefaultSubclassConstructor ||
968 kind == FunctionKind::kBaseConstructor || 969 kind == FunctionKind::kBaseConstructor ||
969 kind == FunctionKind::kSubclassConstructor || 970 kind == FunctionKind::kSubclassConstructor ||
970 kind == FunctionKind::kAsyncFunction || 971 kind == FunctionKind::kAsyncFunction ||
971 kind == FunctionKind::kAsyncArrowFunction || 972 kind == FunctionKind::kAsyncArrowFunction ||
972 kind == FunctionKind::kAsyncConciseMethod; 973 kind == FunctionKind::kAsyncConciseMethod ||
974 kind == FunctionKind::kArrowGeneratorFunction;
973 } 975 }
974 976
975 977
976 inline bool IsArrowFunction(FunctionKind kind) { 978 inline bool IsArrowFunction(FunctionKind kind) {
977 DCHECK(IsValidFunctionKind(kind)); 979 DCHECK(IsValidFunctionKind(kind));
978 return kind & FunctionKind::kArrowFunction; 980 return kind & FunctionKind::kArrowFunction;
979 } 981 }
980 982
981 983
982 inline bool IsGeneratorFunction(FunctionKind kind) { 984 inline bool IsGeneratorFunction(FunctionKind kind) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> 1051 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >>
1050 kPointerSizeLog2); 1052 kPointerSizeLog2);
1051 } 1053 }
1052 1054
1053 } // namespace internal 1055 } // namespace internal
1054 } // namespace v8 1056 } // namespace v8
1055 1057
1056 namespace i = v8::internal; 1058 namespace i = v8::internal;
1057 1059
1058 #endif // V8_GLOBALS_H_ 1060 #endif // V8_GLOBALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698