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

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

Issue 2165923002: Inline Scope::Initialize into the only constructor that's always called right before (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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') | 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_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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 static Scope* DeserializeScopeChain(Isolate* isolate, Zone* zone, 100 static Scope* DeserializeScopeChain(Isolate* isolate, Zone* zone,
101 Context* context, Scope* script_scope, 101 Context* context, Scope* script_scope,
102 AstValueFactory* ast_value_factory); 102 AstValueFactory* ast_value_factory);
103 103
104 // The scope name is only used for printing/debugging. 104 // The scope name is only used for printing/debugging.
105 void SetScopeName(const AstRawString* scope_name) { 105 void SetScopeName(const AstRawString* scope_name) {
106 scope_name_ = scope_name; 106 scope_name_ = scope_name;
107 } 107 }
108 108
109 void Initialize();
110 void DeclareThis(AstValueFactory* ast_value_factory); 109 void DeclareThis(AstValueFactory* ast_value_factory);
111 void DeclareDefaultFunctionVariables(AstValueFactory* ast_value_factory); 110 void DeclareDefaultFunctionVariables(AstValueFactory* ast_value_factory);
112 111
113 // Checks if the block scope is redundant, i.e. it does not contain any 112 // Checks if the block scope is redundant, i.e. it does not contain any
114 // block scoped declarations. In that case it is removed from the scope 113 // block scoped declarations. In that case it is removed from the scope
115 // tree and its children are reparented. 114 // tree and its children are reparented.
116 Scope* FinalizeBlockScope(); 115 Scope* FinalizeBlockScope();
117 116
118 // Inserts outer_scope into this scope's scope chain (and removes this 117 // Inserts outer_scope into this scope's scope chain (and removes this
119 // from the current outer_scope_'s inner_scopes_). 118 // from the current outer_scope_'s inner_scopes_).
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 827
829 void SetDefaults(); 828 void SetDefaults();
830 829
831 PendingCompilationErrorHandler pending_error_handler_; 830 PendingCompilationErrorHandler pending_error_handler_;
832 }; 831 };
833 832
834 } // namespace internal 833 } // namespace internal
835 } // namespace v8 834 } // namespace v8
836 835
837 #endif // V8_AST_SCOPES_H_ 836 #endif // V8_AST_SCOPES_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698