| 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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |