Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index 4efccc8bb908089ea94957b8b6e798cb21da47ef..f2631ff4cc14fe0874d56bf38d1cb861182bee1f 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -1078,6 +1078,7 @@ enum FunctionKind : uint16_t { |
kGetterFunction = 1 << 6, |
kSetterFunction = 1 << 7, |
kAsyncFunction = 1 << 8, |
+ kModule = 1 << 9, |
kAccessorFunction = kGetterFunction | kSetterFunction, |
kDefaultBaseConstructor = kDefaultConstructor | kBaseConstructor, |
kDefaultSubclassConstructor = kDefaultConstructor | kSubclassConstructor, |
@@ -1091,6 +1092,7 @@ inline bool IsValidFunctionKind(FunctionKind kind) { |
return kind == FunctionKind::kNormalFunction || |
kind == FunctionKind::kArrowFunction || |
kind == FunctionKind::kGeneratorFunction || |
+ kind == FunctionKind::kModule || |
kind == FunctionKind::kConciseMethod || |
kind == FunctionKind::kConciseGeneratorMethod || |
kind == FunctionKind::kGetterFunction || |
@@ -1117,13 +1119,18 @@ inline bool IsGeneratorFunction(FunctionKind kind) { |
return kind & FunctionKind::kGeneratorFunction; |
} |
+inline bool IsModule(FunctionKind kind) { |
+ DCHECK(IsValidFunctionKind(kind)); |
+ return kind & FunctionKind::kModule; |
+} |
+ |
inline bool IsAsyncFunction(FunctionKind kind) { |
DCHECK(IsValidFunctionKind(kind)); |
return kind & FunctionKind::kAsyncFunction; |
} |
inline bool IsResumableFunction(FunctionKind kind) { |
- return IsGeneratorFunction(kind) || IsAsyncFunction(kind); |
+ return IsGeneratorFunction(kind) || IsAsyncFunction(kind) || IsModule(kind); |
} |
inline bool IsConciseMethod(FunctionKind kind) { |