OLD | NEW |
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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 DCHECK(scope_info_.is_null()); | 619 DCHECK(scope_info_.is_null()); |
620 scope_info_ = scope_info; | 620 scope_info_ = scope_info; |
621 } | 621 } |
622 | 622 |
623 bool asm_module() const { return asm_module_; } | 623 bool asm_module() const { return asm_module_; } |
624 void set_asm_module(); | 624 void set_asm_module(); |
625 bool asm_function() const { return asm_function_; } | 625 bool asm_function() const { return asm_function_; } |
626 void set_asm_function() { asm_module_ = true; } | 626 void set_asm_function() { asm_module_ = true; } |
627 | 627 |
628 void DeclareThis(AstValueFactory* ast_value_factory); | 628 void DeclareThis(AstValueFactory* ast_value_factory); |
| 629 void DeclareArguments(AstValueFactory* ast_value_factory); |
629 void DeclareDefaultFunctionVariables(AstValueFactory* ast_value_factory); | 630 void DeclareDefaultFunctionVariables(AstValueFactory* ast_value_factory); |
630 | 631 |
631 // This lookup corresponds to a lookup in the "intermediate" scope sitting | 632 // This lookup corresponds to a lookup in the "intermediate" scope sitting |
632 // between this scope and the outer scope. (ECMA-262, 3rd., requires that | 633 // between this scope and the outer scope. (ECMA-262, 3rd., requires that |
633 // the name of named function literal is kept in an intermediate scope | 634 // the name of named function literal is kept in an intermediate scope |
634 // in between this scope and the next outer scope.) | 635 // in between this scope and the next outer scope.) |
635 Variable* LookupFunctionVar(const AstRawString* name); | 636 Variable* LookupFunctionVar(const AstRawString* name); |
636 | 637 |
637 // Declare the function variable for a function literal. This variable | 638 // Declare the function variable for a function literal. This variable |
638 // is in an intermediate scope between this function scope and the the | 639 // is in an intermediate scope between this function scope and the the |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 void AllocateModuleVariables(); | 853 void AllocateModuleVariables(); |
853 | 854 |
854 private: | 855 private: |
855 ModuleDescriptor* module_descriptor_; | 856 ModuleDescriptor* module_descriptor_; |
856 }; | 857 }; |
857 | 858 |
858 } // namespace internal | 859 } // namespace internal |
859 } // namespace v8 | 860 } // namespace v8 |
860 | 861 |
861 #endif // V8_AST_SCOPES_H_ | 862 #endif // V8_AST_SCOPES_H_ |
OLD | NEW |