Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index c7e59198b10f805765991ec5320adce8b792eda0..777f4297cb903fe950a76f8ccf8087fefb1cf56c 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -963,11 +963,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) { |
@@ -982,7 +985,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; |
} |
@@ -997,6 +1003,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)); |