diff options
Diffstat (limited to 'deps/v8/src/objects/function-kind.h')
-rw-r--r-- | deps/v8/src/objects/function-kind.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/deps/v8/src/objects/function-kind.h b/deps/v8/src/objects/function-kind.h index dda576fd8a0..5e17ebf054d 100644 --- a/deps/v8/src/objects/function-kind.h +++ b/deps/v8/src/objects/function-kind.h @@ -6,6 +6,7 @@ #define V8_OBJECTS_FUNCTION_KIND_H_ #include "src/base/bounds.h" +#include "src/base/macros.h" namespace v8 { namespace internal { @@ -56,6 +57,9 @@ enum FunctionKind : uint8_t { kLastFunctionKind = kClassMembersInitializerFunction, }; +constexpr int kFunctionKindBitSize = 5; +STATIC_ASSERT(kLastFunctionKind < (1 << kFunctionKindBitSize)); + inline bool IsArrowFunction(FunctionKind kind) { return base::IsInRange(kind, FunctionKind::kArrowFunction, FunctionKind::kAsyncArrowFunction); |