Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index 7167423a48e125f96cf6254af65b467994f597f2..827857d4d0faeb2e49a6ce716a1c6f4a162e6229 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -944,11 +944,14 @@ enum FunctionKind { |
kBaseConstructor = 1 << 5, |
kGetterFunction = 1 << 6, |
kSetterFunction = 1 << 7, |
+ kAsyncFunction = 1 << 8, |
kAccessorFunction = kGetterFunction | kSetterFunction, |
kDefaultBaseConstructor = kDefaultConstructor | kBaseConstructor, |
kDefaultSubclassConstructor = kDefaultConstructor | kSubclassConstructor, |
kClassConstructor = |
kBaseConstructor | kSubclassConstructor | kDefaultConstructor, |
+ kAsyncArrowFunction = kArrowFunction | kAsyncFunction, |
+ kAsyncConciseMethod = kAsyncFunction | kConciseMethod |
}; |
inline bool IsValidFunctionKind(FunctionKind kind) { |
@@ -963,7 +966,10 @@ inline bool IsValidFunctionKind(FunctionKind kind) { |
kind == FunctionKind::kDefaultBaseConstructor || |
kind == FunctionKind::kDefaultSubclassConstructor || |
kind == FunctionKind::kBaseConstructor || |
- kind == FunctionKind::kSubclassConstructor; |
+ kind == FunctionKind::kSubclassConstructor || |
+ kind == FunctionKind::kAsyncFunction || |
+ kind == FunctionKind::kAsyncArrowFunction || |
+ kind == FunctionKind::kAsyncConciseMethod; |
} |
@@ -978,6 +984,10 @@ inline bool IsGeneratorFunction(FunctionKind kind) { |
return kind & FunctionKind::kGeneratorFunction; |
} |
+inline bool IsAsyncFunction(FunctionKind kind) { |
+ DCHECK(IsValidFunctionKind(kind)); |
+ return kind & FunctionKind::kAsyncFunction; |
+} |
inline bool IsConciseMethod(FunctionKind kind) { |
DCHECK(IsValidFunctionKind(kind)); |