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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 bool Parse(ParseInfo* info); | 710 bool Parse(ParseInfo* info); |
711 void ParseOnBackground(ParseInfo* info); | 711 void ParseOnBackground(ParseInfo* info); |
712 | 712 |
713 // Handle errors detected during parsing, move statistics to Isolate, | 713 // Handle errors detected during parsing, move statistics to Isolate, |
714 // internalize strings (move them to the heap). | 714 // internalize strings (move them to the heap). |
715 void Internalize(Isolate* isolate, Handle<Script> script, bool error); | 715 void Internalize(Isolate* isolate, Handle<Script> script, bool error); |
716 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script); | 716 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script); |
717 | 717 |
718 private: | 718 private: |
719 friend class ParserTraits; | 719 friend class ParserTraits; |
| 720 friend class DiscardableZoneScope; |
720 | 721 |
721 // Runtime encoding of different completion modes. | 722 // Runtime encoding of different completion modes. |
722 enum CompletionKind { | 723 enum CompletionKind { |
723 kNormalCompletion, | 724 kNormalCompletion, |
724 kThrowCompletion, | 725 kThrowCompletion, |
725 kAbruptCompletion | 726 kAbruptCompletion |
726 }; | 727 }; |
727 | 728 |
728 // Limit the allowed number of local variables in a function. The hard limit | 729 // Limit the allowed number of local variables in a function. The hard limit |
729 // is that offsets computed by FullCodeGenerator::StackOperand and similar | 730 // is that offsets computed by FullCodeGenerator::StackOperand and similar |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1311 | 1312 |
1312 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1313 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1313 return parser_->ParseDoExpression(ok); | 1314 return parser_->ParseDoExpression(ok); |
1314 } | 1315 } |
1315 | 1316 |
1316 | 1317 |
1317 } // namespace internal | 1318 } // namespace internal |
1318 } // namespace v8 | 1319 } // namespace v8 |
1319 | 1320 |
1320 #endif // V8_PARSING_PARSER_H_ | 1321 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |