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

Side by Side Diff: src/ast/scopes.h

Issue 2290753003: Allow lexically declared "arguments" in function scope in sloppy mode. (Closed)
Patch Set: update Created 4 years, 3 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/ast/scopes.cc » ('j') | src/ast/scopes.cc » ('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_AST_SCOPES_H_ 5 #ifndef V8_AST_SCOPES_H_
6 #define V8_AST_SCOPES_H_ 6 #define V8_AST_SCOPES_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/base/hashmap.h" 9 #include "src/base/hashmap.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 DCHECK(scope_info_.is_null()); 616 DCHECK(scope_info_.is_null());
617 scope_info_ = scope_info; 617 scope_info_ = scope_info;
618 } 618 }
619 619
620 bool asm_module() const { return asm_module_; } 620 bool asm_module() const { return asm_module_; }
621 void set_asm_module() { asm_module_ = true; } 621 void set_asm_module() { asm_module_ = true; }
622 bool asm_function() const { return asm_function_; } 622 bool asm_function() const { return asm_function_; }
623 void set_asm_function() { asm_module_ = true; } 623 void set_asm_function() { asm_module_ = true; }
624 624
625 void DeclareThis(AstValueFactory* ast_value_factory); 625 void DeclareThis(AstValueFactory* ast_value_factory);
626 void DeclareArguments(AstValueFactory* ast_value_factory);
626 void DeclareDefaultFunctionVariables(AstValueFactory* ast_value_factory); 627 void DeclareDefaultFunctionVariables(AstValueFactory* ast_value_factory);
627 628
628 // This lookup corresponds to a lookup in the "intermediate" scope sitting 629 // This lookup corresponds to a lookup in the "intermediate" scope sitting
629 // between this scope and the outer scope. (ECMA-262, 3rd., requires that 630 // between this scope and the outer scope. (ECMA-262, 3rd., requires that
630 // the name of named function literal is kept in an intermediate scope 631 // the name of named function literal is kept in an intermediate scope
631 // in between this scope and the next outer scope.) 632 // in between this scope and the next outer scope.)
632 Variable* LookupFunctionVar(const AstRawString* name); 633 Variable* LookupFunctionVar(const AstRawString* name);
633 634
634 // Declare the function variable for a function literal. This variable 635 // Declare the function variable for a function literal. This variable
635 // is in an intermediate scope between this function scope and the the 636 // is in an intermediate scope between this function scope and the the
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 void AllocateModuleVariables(); 843 void AllocateModuleVariables();
843 844
844 private: 845 private:
845 ModuleDescriptor* module_descriptor_; 846 ModuleDescriptor* module_descriptor_;
846 }; 847 };
847 848
848 } // namespace internal 849 } // namespace internal
849 } // namespace v8 850 } // namespace v8
850 851
851 #endif // V8_AST_SCOPES_H_ 852 #endif // V8_AST_SCOPES_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | src/ast/scopes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698