Index: src/ast/ast.h |
diff --git a/src/ast/ast.h b/src/ast/ast.h |
index 8ff3aa7df75e01184f248ce3fc4476958989b144..c9866e4eae2d5003609d4fd9d68aab8142c3732c 100644 |
--- a/src/ast/ast.h |
+++ b/src/ast/ast.h |
@@ -2708,6 +2708,11 @@ class FunctionLiteral final : public Expression { |
IsClassFieldInitializer::update(bit_field_, is_class_field_initializer); |
} |
+ bool HasSingleReturnBody() { |
+ return body_->length() == 1 && |
Yang
2016/11/08 12:23:33
I think adding another flag to FunctionLiteral mak
kozy
2016/11/08 16:28:45
Done.
|
+ body_->at(0)->node_type() == AstNode::kReturnStatement; |
+ } |
+ |
private: |
friend class AstNodeFactory; |