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

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

Issue 2399833002: Teach Scopes whether they will end up being lazily compiled or not (Closed)
Patch Set: Created 4 years, 2 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
« src/parsing/parser-base.h ('K') | « src/parsing/parser-base.h ('k') | 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_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 10
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 UNREACHABLE(); 855 UNREACHABLE();
856 return kLazyParsingComplete; 856 return kLazyParsingComplete;
857 } 857 }
858 Expression ParseFunctionLiteral( 858 Expression ParseFunctionLiteral(
859 Identifier name, Scanner::Location function_name_location, 859 Identifier name, Scanner::Location function_name_location,
860 FunctionNameValidity function_name_validity, FunctionKind kind, 860 FunctionNameValidity function_name_validity, FunctionKind kind,
861 int function_token_pos, FunctionLiteral::FunctionType function_type, 861 int function_token_pos, FunctionLiteral::FunctionType function_type,
862 LanguageMode language_mode, bool* ok); 862 LanguageMode language_mode, bool* ok);
863 LazyParsingResult ParseLazyFunctionLiteralBody(bool may_abort, bool* ok); 863 LazyParsingResult ParseLazyFunctionLiteralBody(bool may_abort, bool* ok);
864 864
865 bool ShouldCompileLazily(PreParserExpression fun) {
866 USE(fun);
867 return true;
868 }
869
865 struct TemplateLiteralState {}; 870 struct TemplateLiteralState {};
866 871
867 V8_INLINE TemplateLiteralState OpenTemplateLiteral(int pos) { 872 V8_INLINE TemplateLiteralState OpenTemplateLiteral(int pos) {
868 return TemplateLiteralState(); 873 return TemplateLiteralState();
869 } 874 }
870 V8_INLINE void AddTemplateExpression(TemplateLiteralState* state, 875 V8_INLINE void AddTemplateExpression(TemplateLiteralState* state,
871 PreParserExpression expression) {} 876 PreParserExpression expression) {}
872 V8_INLINE void AddTemplateSpan(TemplateLiteralState* state, bool tail) {} 877 V8_INLINE void AddTemplateSpan(TemplateLiteralState* state, bool tail) {}
873 V8_INLINE PreParserExpression CloseTemplateLiteral( 878 V8_INLINE PreParserExpression CloseTemplateLiteral(
874 TemplateLiteralState* state, int start, PreParserExpression tag); 879 TemplateLiteralState* state, int start, PreParserExpression tag);
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 function_state_->NextMaterializedLiteralIndex(); 1484 function_state_->NextMaterializedLiteralIndex();
1480 function_state_->NextMaterializedLiteralIndex(); 1485 function_state_->NextMaterializedLiteralIndex();
1481 } 1486 }
1482 return EmptyExpression(); 1487 return EmptyExpression();
1483 } 1488 }
1484 1489
1485 } // namespace internal 1490 } // namespace internal
1486 } // namespace v8 1491 } // namespace v8
1487 1492
1488 #endif // V8_PARSING_PREPARSER_H 1493 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« src/parsing/parser-base.h ('K') | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698