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

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: ready 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') | test/mjsunit/harmony/arrow-functions-lexical-arguments.js » ('J')
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 return is_arrow_scope() ? nullptr : arguments_;
adamk 2015/04/09 15:56:03 Why is this necessary? Reading the code again, I d
adamk 2015/04/09 16:18:04 Sorry, I've been spending too much time in strict
arv (Not doing code reviews) 2015/04/09 16:53:07 Changing this to a DCHECK instead.
399 }
398 400
399 // Declarations list. 401 // Declarations list.
400 ZoneList<Declaration*>* declarations() { return &decls_; } 402 ZoneList<Declaration*>* declarations() { return &decls_; }
401 403
402 // Inner scope list. 404 // Inner scope list.
403 ZoneList<Scope*>* inner_scopes() { return &inner_scopes_; } 405 ZoneList<Scope*>* inner_scopes() { return &inner_scopes_; }
404 406
405 // The scope immediately surrounding this scope, or NULL. 407 // The scope immediately surrounding this scope, or NULL.
406 Scope* outer_scope() const { return outer_scope_; } 408 Scope* outer_scope() const { return outer_scope_; }
407 409
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 729
728 AstValueFactory* ast_value_factory_; 730 AstValueFactory* ast_value_factory_;
729 Zone* zone_; 731 Zone* zone_;
730 732
731 PendingCompilationErrorHandler pending_error_handler_; 733 PendingCompilationErrorHandler pending_error_handler_;
732 }; 734 };
733 735
734 } } // namespace v8::internal 736 } } // namespace v8::internal
735 737
736 #endif // V8_SCOPES_H_ 738 #endif // V8_SCOPES_H_
OLDNEW
« no previous file with comments | « no previous file | src/scopes.cc » ('j') | test/mjsunit/harmony/arrow-functions-lexical-arguments.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698