Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index cc31be148751020bde24818b425ea3fb99097a22..912e484d2fb313236c2b5d078ed953882731698c 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -756,6 +756,29 @@ enum MinusZeroMode { |
FAIL_ON_MINUS_ZERO |
}; |
+ |
+enum FunctionKind { |
+ kNormalFunction = 0, |
+ kArrowFunction = 1, |
+ kGeneratorFunction = 2, |
+ kConciseMethod = 4 |
+}; |
+ |
+ |
+inline bool IsArrowFunction(FunctionKind kind) { |
rossberg
2014/08/25 09:39:29
Each of these functions should assert that kind is
arv (Not doing code reviews)
2014/09/09 22:24:27
Done.
|
+ return kind & FunctionKind::kArrowFunction; |
+} |
+ |
+ |
+inline bool IsGeneratorFunction(FunctionKind kind) { |
+ return kind & FunctionKind::kGeneratorFunction; |
+} |
+ |
+ |
+inline bool IsConciseMethod(FunctionKind kind) { |
+ return kind & FunctionKind::kConciseMethod; |
+} |
+ |
} } // namespace v8::internal |
namespace i = v8::internal; |