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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/scopes.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_SCOPES_H_ 5 #ifndef V8_SCOPES_H_
6 #define V8_SCOPES_H_ 6 #define V8_SCOPES_H_
7 7
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/pending-compilation-error-handler.h" 9 #include "src/pending-compilation-error-handler.h"
10 #include "src/zone.h" 10 #include "src/zone.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 return rest_index_ >= 0; 387 return rest_index_ >= 0;
388 } 388 }
389 389
390 bool is_simple_parameter_list() const { 390 bool is_simple_parameter_list() const {
391 DCHECK(is_function_scope()); 391 DCHECK(is_function_scope());
392 if (rest_index_ >= 0) return false; 392 if (rest_index_ >= 0) return false;
393 return true; 393 return true;
394 } 394 }
395 395
396 // The local variable 'arguments' if we need to allocate it; NULL otherwise. 396 // The local variable 'arguments' if we need to allocate it; NULL otherwise.
397 Variable* arguments() const { return arguments_; } 397 Variable* arguments() const {
398 DCHECK(!is_arrow_scope() || arguments_ == nullptr);
399 return arguments_;
400 }
398 401
399 // Declarations list. 402 // Declarations list.
400 ZoneList<Declaration*>* declarations() { return &decls_; } 403 ZoneList<Declaration*>* declarations() { return &decls_; }
401 404
402 // Inner scope list. 405 // Inner scope list.
403 ZoneList<Scope*>* inner_scopes() { return &inner_scopes_; } 406 ZoneList<Scope*>* inner_scopes() { return &inner_scopes_; }
404 407
405 // The scope immediately surrounding this scope, or NULL. 408 // The scope immediately surrounding this scope, or NULL.
406 Scope* outer_scope() const { return outer_scope_; } 409 Scope* outer_scope() const { return outer_scope_; }
407 410
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 730
728 AstValueFactory* ast_value_factory_; 731 AstValueFactory* ast_value_factory_;
729 Zone* zone_; 732 Zone* zone_;
730 733
731 PendingCompilationErrorHandler pending_error_handler_; 734 PendingCompilationErrorHandler pending_error_handler_;
732 }; 735 };
733 736
734 } } // namespace v8::internal 737 } } // namespace v8::internal
735 738
736 #endif // V8_SCOPES_H_ 739 #endif // V8_SCOPES_H_
OLDNEW
« 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