Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index 8cccefe50b073fac85f98dc3c85478088231edca..9547ea2323a77064f3e2e13a4e43f2821530b832 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -840,8 +840,13 @@ enum FunctionKind { |
kDefaultConstructor = 1 << 4, |
kSubclassConstructor = 1 << 5, |
kBaseConstructor = 1 << 6, |
+ kInObjectLiteral = 1 << 7, |
kDefaultBaseConstructor = kDefaultConstructor | kBaseConstructor, |
- kDefaultSubclassConstructor = kDefaultConstructor | kSubclassConstructor |
+ kDefaultSubclassConstructor = kDefaultConstructor | kSubclassConstructor, |
+ kConciseMethodInObjectLiteral = kConciseMethod | kInObjectLiteral, |
+ kConciseGeneratorMethodInObjectLiteral = |
+ kConciseGeneratorMethod | kInObjectLiteral, |
+ kAccessorFunctionInObjectLiteral = kAccessorFunction | kInObjectLiteral, |
}; |
@@ -855,7 +860,10 @@ inline bool IsValidFunctionKind(FunctionKind kind) { |
kind == FunctionKind::kDefaultBaseConstructor || |
kind == FunctionKind::kDefaultSubclassConstructor || |
kind == FunctionKind::kBaseConstructor || |
- kind == FunctionKind::kSubclassConstructor; |
+ kind == FunctionKind::kSubclassConstructor || |
+ kind == FunctionKind::kConciseMethodInObjectLiteral || |
+ kind == FunctionKind::kConciseGeneratorMethodInObjectLiteral || |
+ kind == FunctionKind::kAccessorFunctionInObjectLiteral; |
} |
@@ -907,6 +915,19 @@ inline bool IsConstructor(FunctionKind kind) { |
(FunctionKind::kBaseConstructor | FunctionKind::kSubclassConstructor | |
FunctionKind::kDefaultConstructor); |
} |
+ |
+ |
+inline bool IsInObjectLiteral(FunctionKind kind) { |
+ DCHECK(IsValidFunctionKind(kind)); |
+ return kind & FunctionKind::kInObjectLiteral; |
+} |
+ |
+ |
+inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { |
+ kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); |
+ DCHECK(IsValidFunctionKind(kind)); |
+ return kind; |
+} |
} } // namespace v8::internal |
namespace i = v8::internal; |