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

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

Issue 2522223002: Fix zone in which temp-zone parsed data is allocated for the function scope on the boundary. (Closed)
Patch Set: Also free map_ Created 4 years 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/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/base/hashmap.h" 9 #include "src/base/hashmap.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 MaybeHandle<ScopeInfo> outer_scope); 548 MaybeHandle<ScopeInfo> outer_scope);
549 549
550 // Construct a scope based on the scope info. 550 // Construct a scope based on the scope info.
551 Scope(Zone* zone, ScopeType type, Handle<ScopeInfo> scope_info); 551 Scope(Zone* zone, ScopeType type, Handle<ScopeInfo> scope_info);
552 552
553 // Construct a catch scope with a binding for the name. 553 // Construct a catch scope with a binding for the name.
554 Scope(Zone* zone, const AstRawString* catch_variable_name, 554 Scope(Zone* zone, const AstRawString* catch_variable_name,
555 Handle<ScopeInfo> scope_info); 555 Handle<ScopeInfo> scope_info);
556 556
557 void AddInnerScope(Scope* inner_scope) { 557 void AddInnerScope(Scope* inner_scope) {
558 DCHECK_EQ(!needs_migration_, inner_scope->zone() == zone());
559 inner_scope->sibling_ = inner_scope_; 558 inner_scope->sibling_ = inner_scope_;
560 inner_scope_ = inner_scope; 559 inner_scope_ = inner_scope;
561 inner_scope->outer_scope_ = this; 560 inner_scope->outer_scope_ = this;
562 } 561 }
563 562
564 void RemoveInnerScope(Scope* inner_scope) { 563 void RemoveInnerScope(Scope* inner_scope) {
565 DCHECK_NOT_NULL(inner_scope); 564 DCHECK_NOT_NULL(inner_scope);
566 if (inner_scope == inner_scope_) { 565 if (inner_scope == inner_scope_) {
567 inner_scope_ = inner_scope_->sibling_; 566 inner_scope_ = inner_scope_->sibling_;
568 return; 567 return;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 void AllocateModuleVariables(); 857 void AllocateModuleVariables();
859 858
860 private: 859 private:
861 ModuleDescriptor* module_descriptor_; 860 ModuleDescriptor* module_descriptor_;
862 }; 861 };
863 862
864 } // namespace internal 863 } // namespace internal
865 } // namespace v8 864 } // namespace v8
866 865
867 #endif // V8_AST_SCOPES_H_ 866 #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