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/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 // nodes) if parsing failed. | 715 // nodes) if parsing failed. |
716 static bool ParseStatic(ParseInfo* info); | 716 static bool ParseStatic(ParseInfo* info); |
717 bool Parse(ParseInfo* info); | 717 bool Parse(ParseInfo* info); |
718 void ParseOnBackground(ParseInfo* info); | 718 void ParseOnBackground(ParseInfo* info); |
719 | 719 |
720 // Handle errors detected during parsing, move statistics to Isolate, | 720 // Handle errors detected during parsing, move statistics to Isolate, |
721 // internalize strings (move them to the heap). | 721 // internalize strings (move them to the heap). |
722 void Internalize(Isolate* isolate, Handle<Script> script, bool error); | 722 void Internalize(Isolate* isolate, Handle<Script> script, bool error); |
723 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script); | 723 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script); |
724 | 724 |
| 725 void set_original_scope(Scope* original_scope) { |
| 726 original_scope_ = original_scope; |
| 727 } |
| 728 |
725 private: | 729 private: |
726 friend class ParserTraits; | 730 friend class ParserTraits; |
727 friend class DiscardableZoneScope; | 731 friend class DiscardableZoneScope; |
728 | 732 |
729 // Runtime encoding of different completion modes. | 733 // Runtime encoding of different completion modes. |
730 enum CompletionKind { | 734 enum CompletionKind { |
731 kNormalCompletion, | 735 kNormalCompletion, |
732 kThrowCompletion, | 736 kThrowCompletion, |
733 kAbruptCompletion | 737 kAbruptCompletion |
734 }; | 738 }; |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 | 1327 |
1324 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1328 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1325 return parser_->ParseDoExpression(ok); | 1329 return parser_->ParseDoExpression(ok); |
1326 } | 1330 } |
1327 | 1331 |
1328 | 1332 |
1329 } // namespace internal | 1333 } // namespace internal |
1330 } // namespace v8 | 1334 } // namespace v8 |
1331 | 1335 |
1332 #endif // V8_PARSING_PARSER_H_ | 1336 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |