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

Unified Diff: src/ast.cc

Issue 1164073003: [es6] super.prop, eval and lazy functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Increment the preparse data version Created 5 years, 6 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.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | src/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index fbefbd46f960ce347d56b8129a0e83de5b8c3843..73d7b96a73e3f6749dab79d048bbdd8b5f6cf8a9 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -234,9 +234,11 @@ LanguageMode FunctionLiteral::language_mode() const {
}
-bool FunctionLiteral::uses_super_property() const {
- DCHECK_NOT_NULL(scope());
- return scope()->uses_super_property();
+bool FunctionLiteral::NeedsHomeObject(Expression* expr) {
+ if (expr == nullptr || !expr->IsFunctionLiteral()) return false;
+ DCHECK_NOT_NULL(expr->AsFunctionLiteral());
adamk 2015/06/04 20:02:33 This DCHECK seems a little over-anxious, the above
arv (Not doing code reviews) 2015/06/04 20:17:45 Done.
+ DCHECK_NOT_NULL(expr->AsFunctionLiteral()->scope());
+ return expr->AsFunctionLiteral()->scope()->NeedsHomeObject();
}
« no previous file with comments | « src/ast.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698