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/parser.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
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_PARSER_H_ 5 #ifndef V8_PARSING_PARSER_H_
6 #define V8_PARSING_PARSER_H_ 6 #define V8_PARSING_PARSER_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/parsing/parser-base.h" 10 #include "src/parsing/parser-base.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 // Handle errors detected during parsing, move statistics to Isolate, 199 // Handle errors detected during parsing, move statistics to Isolate,
200 // internalize strings (move them to the heap). 200 // internalize strings (move them to the heap).
201 void Internalize(Isolate* isolate, Handle<Script> script, bool error); 201 void Internalize(Isolate* isolate, Handle<Script> script, bool error);
202 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script); 202 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script);
203 203
204 private: 204 private:
205 friend class ParserBase<Parser>; 205 friend class ParserBase<Parser>;
206 friend class v8::internal::ExpressionClassifier<ParserTypes<Parser>>; 206 friend class v8::internal::ExpressionClassifier<ParserTypes<Parser>>;
207 207
208 // Determine if the given function should be lazily compiled.
209 bool ShouldCompileLazily(FunctionLiteral* fun);
210
208 // Runtime encoding of different completion modes. 211 // Runtime encoding of different completion modes.
209 enum CompletionKind { 212 enum CompletionKind {
210 kNormalCompletion, 213 kNormalCompletion,
211 kThrowCompletion, 214 kThrowCompletion,
212 kAbruptCompletion 215 kAbruptCompletion
213 }; 216 };
214 217
215 Variable* NewTemporary(const AstRawString* name) { 218 Variable* NewTemporary(const AstRawString* name) {
216 return scope()->NewTemporary(name); 219 return scope()->NewTemporary(name);
217 } 220 }
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 int total_preparse_skipped_; 1093 int total_preparse_skipped_;
1091 HistogramTimer* pre_parse_timer_; 1094 HistogramTimer* pre_parse_timer_;
1092 1095
1093 bool parsing_on_main_thread_; 1096 bool parsing_on_main_thread_;
1094 }; 1097 };
1095 1098
1096 } // namespace internal 1099 } // namespace internal
1097 } // namespace v8 1100 } // namespace v8
1098 1101
1099 #endif // V8_PARSING_PARSER_H_ 1102 #endif // V8_PARSING_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698