Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index 83fa2fa720e7b660034d84df15ee9a3c4a2e18cb..52b2913f2c357a3db2833eeb934204d10f80c8ef 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -797,7 +797,8 @@ enum FunctionKind { |
kConciseMethod = 4, |
kConciseGeneratorMethod = kGeneratorFunction | kConciseMethod, |
kDefaultConstructor = 8, |
- kSubclassConstructor = 16 |
+ kBaseConstructor = 16, |
+ kSubclassConstructor = 32, |
}; |
@@ -808,6 +809,7 @@ inline bool IsValidFunctionKind(FunctionKind kind) { |
kind == FunctionKind::kConciseMethod || |
kind == FunctionKind::kConciseGeneratorMethod || |
kind == FunctionKind::kDefaultConstructor || |
+ kind == FunctionKind::kBaseConstructor || |
kind == FunctionKind::kSubclassConstructor; |
} |
@@ -835,10 +837,25 @@ inline bool IsDefaultConstructor(FunctionKind kind) { |
return kind & FunctionKind::kDefaultConstructor; |
} |
+ |
+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; |