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

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

Issue 1564923007: Fix sloppy block-scoped function hoisting with nested zones (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 | no next file » | 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_AST_H_ 5 #ifndef V8_AST_AST_H_
6 #define V8_AST_AST_H_ 6 #define V8_AST_AST_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/ast/ast-value-factory.h" 9 #include "src/ast/ast-value-factory.h"
10 #include "src/ast/modules.h" 10 #include "src/ast/modules.h"
(...skipping 3437 matching lines...) Expand 10 before | Expand all | Expand 10 after
3448 DebuggerStatement* NewDebuggerStatement(int pos) { 3448 DebuggerStatement* NewDebuggerStatement(int pos) {
3449 return new (local_zone_) DebuggerStatement(local_zone_, pos); 3449 return new (local_zone_) DebuggerStatement(local_zone_, pos);
3450 } 3450 }
3451 3451
3452 EmptyStatement* NewEmptyStatement(int pos) { 3452 EmptyStatement* NewEmptyStatement(int pos) {
3453 return new (local_zone_) EmptyStatement(local_zone_, pos); 3453 return new (local_zone_) EmptyStatement(local_zone_, pos);
3454 } 3454 }
3455 3455
3456 SloppyBlockFunctionStatement* NewSloppyBlockFunctionStatement( 3456 SloppyBlockFunctionStatement* NewSloppyBlockFunctionStatement(
3457 Statement* statement, Scope* scope) { 3457 Statement* statement, Scope* scope) {
3458 return new (local_zone_) 3458 return new (local_zone_)
adamk 2016/01/07 23:14:31 Don't you need to allocate the statement itself in
Dan Ehrenberg 2016/01/07 23:18:21 Oops, done, looks like I really need to figure out
3459 SloppyBlockFunctionStatement(local_zone_, statement, scope); 3459 SloppyBlockFunctionStatement(parser_zone_, statement, scope);
3460 } 3460 }
3461 3461
3462 CaseClause* NewCaseClause( 3462 CaseClause* NewCaseClause(
3463 Expression* label, ZoneList<Statement*>* statements, int pos) { 3463 Expression* label, ZoneList<Statement*>* statements, int pos) {
3464 return new (local_zone_) CaseClause(local_zone_, label, statements, pos); 3464 return new (local_zone_) CaseClause(local_zone_, label, statements, pos);
3465 } 3465 }
3466 3466
3467 Literal* NewStringLiteral(const AstRawString* string, int pos) { 3467 Literal* NewStringLiteral(const AstRawString* string, int pos) {
3468 return new (local_zone_) 3468 return new (local_zone_)
3469 Literal(local_zone_, ast_value_factory_->NewString(string), pos); 3469 Literal(local_zone_, ast_value_factory_->NewString(string), pos);
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
3769 // the parser-level zone. 3769 // the parser-level zone.
3770 Zone* parser_zone_; 3770 Zone* parser_zone_;
3771 AstValueFactory* ast_value_factory_; 3771 AstValueFactory* ast_value_factory_;
3772 }; 3772 };
3773 3773
3774 3774
3775 } // namespace internal 3775 } // namespace internal
3776 } // namespace v8 3776 } // namespace v8
3777 3777
3778 #endif // V8_AST_AST_H_ 3778 #endif // V8_AST_AST_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698