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

Side by Side Diff: src/parsing/preparser.h

Issue 2534393002: Split parsing of functions and top-level code into two separate methods (Closed)
Patch Set: updates 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 | « src/parsing/parsing.cc ('k') | src/runtime/runtime-internal.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_PARSING_PREPARSER_H 5 #ifndef V8_PARSING_PREPARSER_H
6 #define V8_PARSING_PREPARSER_H 6 #define V8_PARSING_PREPARSER_H
7 7
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/parsing/parser-base.h" 9 #include "src/parsing/parser-base.h"
10 #include "src/parsing/preparse-data.h"
10 11
11 namespace v8 { 12 namespace v8 {
12 namespace internal { 13 namespace internal {
13 14
14 // Whereas the Parser generates AST during the recursive descent, 15 // Whereas the Parser generates AST during the recursive descent,
15 // the PreParser doesn't create a tree. Instead, it passes around minimal 16 // the PreParser doesn't create a tree. Instead, it passes around minimal
16 // data objects (PreParserExpression, PreParserIdentifier etc.) which contain 17 // data objects (PreParserExpression, PreParserIdentifier etc.) which contain
17 // just enough data for the upper layer functions. PreParserFactory is 18 // just enough data for the upper layer functions. PreParserFactory is
18 // responsible for creating these dummy objects. It provides a similar kind of 19 // responsible for creating these dummy objects. It provides a similar kind of
19 // interface as AstNodeFactory, so ParserBase doesn't need to care which one is 20 // interface as AstNodeFactory, so ParserBase doesn't need to care which one is
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 function_state_->NextMaterializedLiteralIndex(); 1563 function_state_->NextMaterializedLiteralIndex();
1563 function_state_->NextMaterializedLiteralIndex(); 1564 function_state_->NextMaterializedLiteralIndex();
1564 } 1565 }
1565 return EmptyExpression(); 1566 return EmptyExpression();
1566 } 1567 }
1567 1568
1568 } // namespace internal 1569 } // namespace internal
1569 } // namespace v8 1570 } // namespace v8
1570 1571
1571 #endif // V8_PARSING_PREPARSER_H 1572 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parsing.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698