| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 ZoneList<ObjectLiteral::Property*>* NewPropertyList(int size, Zone* zone) { | 580 ZoneList<ObjectLiteral::Property*>* NewPropertyList(int size, Zone* zone) { |
| 581 return new(zone) ZoneList<ObjectLiteral::Property*>(size, zone); | 581 return new(zone) ZoneList<ObjectLiteral::Property*>(size, zone); |
| 582 } | 582 } |
| 583 | 583 |
| 584 // Temporary glue; these functions will move to ParserBase. | 584 // Temporary glue; these functions will move to ParserBase. |
| 585 Expression* ParseV8Intrinsic(bool* ok); | 585 Expression* ParseV8Intrinsic(bool* ok); |
| 586 FunctionLiteral* ParseFunctionLiteral( | 586 FunctionLiteral* ParseFunctionLiteral( |
| 587 Handle<String> name, | 587 Handle<String> name, |
| 588 Scanner::Location function_name_location, | 588 Scanner::Location function_name_location, |
| 589 bool name_is_strict_reserved, | 589 bool name_is_strict_reserved, |
| 590 bool is_generator, | 590 FunctionParsingMode parsing_mode, |
| 591 Expression* params_ast, |
| 591 int function_token_position, | 592 int function_token_position, |
| 592 FunctionLiteral::FunctionType type, | 593 FunctionLiteral::FunctionType type, |
| 593 bool* ok); | 594 bool* ok); |
| 594 | 595 |
| 595 private: | 596 private: |
| 596 Parser* parser_; | 597 Parser* parser_; |
| 597 }; | 598 }; |
| 598 | 599 |
| 599 | 600 |
| 600 class Parser : public ParserBase<ParserTraits> { | 601 class Parser : public ParserBase<ParserTraits> { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 | 726 |
| 726 // Support for hamony block scoped bindings. | 727 // Support for hamony block scoped bindings. |
| 727 Block* ParseScopedBlock(ZoneStringList* labels, bool* ok); | 728 Block* ParseScopedBlock(ZoneStringList* labels, bool* ok); |
| 728 | 729 |
| 729 // Initialize the components of a for-in / for-of statement. | 730 // Initialize the components of a for-in / for-of statement. |
| 730 void InitializeForEachStatement(ForEachStatement* stmt, | 731 void InitializeForEachStatement(ForEachStatement* stmt, |
| 731 Expression* each, | 732 Expression* each, |
| 732 Expression* subject, | 733 Expression* subject, |
| 733 Statement* body); | 734 Statement* body); |
| 734 | 735 |
| 736 Vector<VariableProxy*> ParameterListFromExpression(Expression* expression, |
| 737 bool* ok); |
| 738 |
| 735 FunctionLiteral* ParseFunctionLiteral( | 739 FunctionLiteral* ParseFunctionLiteral( |
| 736 Handle<String> name, | 740 Handle<String> name, |
| 737 Scanner::Location function_name_location, | 741 Scanner::Location function_name_location, |
| 738 bool name_is_strict_reserved, | 742 bool name_is_strict_reserved, |
| 739 bool is_generator, | 743 FunctionParsingMode parsing_mode, |
| 744 Expression* params_ast, |
| 740 int function_token_position, | 745 int function_token_position, |
| 741 FunctionLiteral::FunctionType type, | 746 FunctionLiteral::FunctionType type, |
| 742 bool* ok); | 747 bool* ok); |
| 743 | 748 |
| 744 // Magical syntax support. | 749 // Magical syntax support. |
| 745 Expression* ParseV8Intrinsic(bool* ok); | 750 Expression* ParseV8Intrinsic(bool* ok); |
| 746 | 751 |
| 747 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode); | 752 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode); |
| 748 | 753 |
| 749 // Get odd-ball literals. | 754 // Get odd-ball literals. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 private: | 844 private: |
| 840 static const int kLiteralTypeSlot = 0; | 845 static const int kLiteralTypeSlot = 0; |
| 841 static const int kElementsSlot = 1; | 846 static const int kElementsSlot = 1; |
| 842 | 847 |
| 843 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 848 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 844 }; | 849 }; |
| 845 | 850 |
| 846 } } // namespace v8::internal | 851 } } // namespace v8::internal |
| 847 | 852 |
| 848 #endif // V8_PARSER_H_ | 853 #endif // V8_PARSER_H_ |
| OLD | NEW |