Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index 3f2c33593b012acabb7c9102cf269f51a26ee55d..0248bb1600d8e8487fa2d1ffae2f9fba33a04013 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -820,7 +820,8 @@ enum FunctionKind { |
kConciseGeneratorMethod = kGeneratorFunction | kConciseMethod, |
kAccessorFunction = 1 << 3, |
kDefaultConstructor = 1 << 4, |
- kSubclassConstructor = 1 << 5 |
+ kSubclassConstructor = 1 << 5, |
+ kBaseConstructor = 1 << 6, |
}; |
@@ -832,6 +833,7 @@ inline bool IsValidFunctionKind(FunctionKind kind) { |
kind == FunctionKind::kConciseGeneratorMethod || |
kind == FunctionKind::kAccessorFunction || |
kind == FunctionKind::kDefaultConstructor || |
+ kind == FunctionKind::kBaseConstructor || |
kind == FunctionKind::kSubclassConstructor; |
} |
@@ -866,10 +868,24 @@ inline bool IsDefaultConstructor(FunctionKind kind) { |
} |
+inline bool IsBaseConstructor(FunctionKind kind) { |
+ DCHECK(IsValidFunctionKind(kind)); |
+ return kind & FunctionKind::kBaseConstructor; |
+} |
+ |
+ |
inline bool IsSubclassConstructor(FunctionKind kind) { |
DCHECK(IsValidFunctionKind(kind)); |
return kind & FunctionKind::kSubclassConstructor; |
} |
+ |
+ |
+inline bool IsConstructor(FunctionKind kind) { |
+ DCHECK(IsValidFunctionKind(kind)); |
+ return kind & |
+ (FunctionKind::kBaseConstructor | FunctionKind::kSubclassConstructor | |
+ FunctionKind::kDefaultConstructor); |
+} |
} } // namespace v8::internal |
namespace i = v8::internal; |