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

Unified Diff: src/scopes.h

Issue 1078483002: [es6]: Lexical arguments for arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make arguments() DCHECK instead Created 5 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 | « no previous file | src/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index cce8c3c9eaa057558ac38bc953fe9b328719f40f..7b372d9643fe4c1c07892139c6ecf1937ed1257e 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -394,7 +394,10 @@ class Scope: public ZoneObject {
}
// The local variable 'arguments' if we need to allocate it; NULL otherwise.
- Variable* arguments() const { return arguments_; }
+ Variable* arguments() const {
+ DCHECK(!is_arrow_scope() || arguments_ == nullptr);
+ return arguments_;
+ }
// Declarations list.
ZoneList<Declaration*>* declarations() { return &decls_; }
« no previous file with comments | « no previous file | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698