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

Unified Diff: src/ast/ast.cc

Issue 1712833002: Don't reflect ES2015 Function name inference in Function.prototype.toString (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move bits around to make STATIC_ASSERT happy Created 4 years, 10 months 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 | « src/ast/ast.h ('k') | src/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.cc
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index 6eddb55c2428e56ac20e461f5ce9d73b40523a23..9b2c6388c1626c4bbe975dde7a01794acfc716e4 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -275,6 +275,12 @@ ObjectLiteralProperty::ObjectLiteralProperty(AstValueFactory* ast_value_factory,
}
}
+bool ObjectLiteralProperty::NeedsSetFunctionName() const {
+ return is_computed_name_ &&
+ (value_->IsAnonymousFunctionDefinition() ||
+ (value_->IsFunctionLiteral() &&
+ IsConciseMethod(value_->AsFunctionLiteral()->kind())));
+}
void ClassLiteral::AssignFeedbackVectorSlots(Isolate* isolate,
FeedbackVectorSpec* spec,
« no previous file with comments | « src/ast/ast.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698