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

Unified Diff: src/ast/ast.cc

Issue 2849773002: Revert of Wrap ClassLiterals in DoExpressions instead of giving them BlockScopes. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 3 years, 8 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/compiler/ast-graph-builder.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 a2fc8997a4a07be151afd82ac4c6de0016c762e7..6fa7f53071f14286dd0442f61c74c644607e57ad 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -141,8 +141,8 @@
bool Expression::IsAnonymousFunctionDefinition() const {
return (IsFunctionLiteral() &&
AsFunctionLiteral()->IsAnonymousFunctionDefinition()) ||
- (IsDoExpression() &&
- AsDoExpression()->IsAnonymousFunctionDefinition());
+ (IsClassLiteral() &&
+ AsClassLiteral()->IsAnonymousFunctionDefinition());
}
void Expression::MarkTail() {
@@ -153,12 +153,6 @@
} else if (IsBinaryOperation()) {
AsBinaryOperation()->MarkTail();
}
-}
-
-bool DoExpression::IsAnonymousFunctionDefinition() const {
- // This is specifically to allow DoExpressions to represent ClassLiterals.
- return represented_function_ != nullptr &&
- represented_function_->raw_name()->length() == 0;
}
bool Statement::IsJump() const {
« no previous file with comments | « src/ast/ast.h ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698