| 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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 private: | 725 private: |
| 726 friend class ParserTraits; | 726 friend class ParserTraits; |
| 727 friend class DiscardableZoneScope; |
| 727 | 728 |
| 728 // Runtime encoding of different completion modes. | 729 // Runtime encoding of different completion modes. |
| 729 enum CompletionKind { | 730 enum CompletionKind { |
| 730 kNormalCompletion, | 731 kNormalCompletion, |
| 731 kThrowCompletion, | 732 kThrowCompletion, |
| 732 kAbruptCompletion | 733 kAbruptCompletion |
| 733 }; | 734 }; |
| 734 | 735 |
| 735 // Limit the allowed number of local variables in a function. The hard limit | 736 // Limit the allowed number of local variables in a function. The hard limit |
| 736 // is that offsets computed by FullCodeGenerator::StackOperand and similar | 737 // is that offsets computed by FullCodeGenerator::StackOperand and similar |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 | 1323 |
| 1323 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1324 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1324 return parser_->ParseDoExpression(ok); | 1325 return parser_->ParseDoExpression(ok); |
| 1325 } | 1326 } |
| 1326 | 1327 |
| 1327 | 1328 |
| 1328 } // namespace internal | 1329 } // namespace internal |
| 1329 } // namespace v8 | 1330 } // namespace v8 |
| 1330 | 1331 |
| 1331 #endif // V8_PARSING_PARSER_H_ | 1332 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |