OLD | NEW |
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 Loading... |
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 bool AllowsLazyParsingWithoutUnresolvedVariables() const { |
| 209 return scope()->AllowsLazyParsingWithoutUnresolvedVariables( |
| 210 original_scope_); |
| 211 } |
| 212 |
208 // Runtime encoding of different completion modes. | 213 // Runtime encoding of different completion modes. |
209 enum CompletionKind { | 214 enum CompletionKind { |
210 kNormalCompletion, | 215 kNormalCompletion, |
211 kThrowCompletion, | 216 kThrowCompletion, |
212 kAbruptCompletion | 217 kAbruptCompletion |
213 }; | 218 }; |
214 | 219 |
215 Variable* NewTemporary(const AstRawString* name) { | 220 Variable* NewTemporary(const AstRawString* name) { |
216 return scope()->NewTemporary(name); | 221 return scope()->NewTemporary(name); |
217 } | 222 } |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 int total_preparse_skipped_; | 1097 int total_preparse_skipped_; |
1093 HistogramTimer* pre_parse_timer_; | 1098 HistogramTimer* pre_parse_timer_; |
1094 | 1099 |
1095 bool parsing_on_main_thread_; | 1100 bool parsing_on_main_thread_; |
1096 }; | 1101 }; |
1097 | 1102 |
1098 } // namespace internal | 1103 } // namespace internal |
1099 } // namespace v8 | 1104 } // namespace v8 |
1100 | 1105 |
1101 #endif // V8_PARSING_PARSER_H_ | 1106 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |