Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 3c814f2127a7c3b61e1cdcced83c6a060f7ddf63..e22239727b7f97f93ab95cba24214a6f5e02e144 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -7200,6 +7200,17 @@ class SharedFunctionInfo: public HeapObject { |
// Indicates that this function is an arrow function. |
DECL_BOOLEAN_ACCESSORS(is_arrow) |
+ // Indicates that this function is a concise method. |
+ DECL_BOOLEAN_ACCESSORS(is_concise_method) |
+ |
+ FunctionKind kind() const { |
+ // TODO(arv): Update to handle concise generator methods. |
+ if (is_arrow()) return FunctionKind::kArrowFunction; |
+ if (is_generator()) return FunctionKind::kGeneratorFunction; |
+ if (is_concise_method()) return FunctionKind::kConciseMethod; |
+ return FunctionKind::kNormalFunction; |
+ } |
+ |
// Indicates whether or not the code in the shared function support |
// deoptimization. |
inline bool has_deoptimization_support(); |
@@ -7396,6 +7407,7 @@ class SharedFunctionInfo: public HeapObject { |
kDontFlush, |
kIsGenerator, |
kIsArrow, |
+ kIsConciseMethod, |
kCompilerHintsCount // Pseudo entry |
}; |