Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: src/ast/ast.h

Issue 2488493003: [inspector] fix positions for single expression arrow function (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/full-codegen/full-codegen.cc » ('j') | src/full-codegen/full-codegen.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | src/full-codegen/full-codegen.cc » ('j') | src/full-codegen/full-codegen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698