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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 Expression* ParseObjectLiteral(bool* ok); | 638 Expression* ParseObjectLiteral(bool* ok); |
639 Expression* ParseRegExpLiteral(bool seen_equal, bool* ok); | 639 Expression* ParseRegExpLiteral(bool seen_equal, bool* ok); |
640 | 640 |
641 // Initialize the components of a for-in / for-of statement. | 641 // Initialize the components of a for-in / for-of statement. |
642 void InitializeForEachStatement(ForEachStatement* stmt, | 642 void InitializeForEachStatement(ForEachStatement* stmt, |
643 Expression* each, | 643 Expression* each, |
644 Expression* subject, | 644 Expression* subject, |
645 Statement* body); | 645 Statement* body); |
646 | 646 |
647 ZoneList<Expression*>* ParseArguments(bool* ok); | 647 ZoneList<Expression*>* ParseArguments(bool* ok); |
648 FunctionLiteral* ParseFunctionLiteral( | 648 FunctionLiteral* ParseFunctionLiteral(Handle<String> var_name, |
649 Handle<String> var_name, | 649 bool name_is_reserved, |
650 Scanner::Location function_name_location, | 650 bool is_generator, |
651 bool name_is_reserved, | 651 int function_token_position, |
652 bool is_generator, | 652 FunctionLiteral::FunctionType type, |
653 int function_token_position, | 653 bool* ok); |
654 FunctionLiteral::FunctionType type, | 654 |
655 bool* ok); | |
656 | 655 |
657 // Magical syntax support. | 656 // Magical syntax support. |
658 Expression* ParseV8Intrinsic(bool* ok); | 657 Expression* ParseV8Intrinsic(bool* ok); |
659 | 658 |
660 bool is_generator() const { return current_function_state_->is_generator(); } | 659 bool is_generator() const { return current_function_state_->is_generator(); } |
661 | 660 |
662 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode); | 661 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode); |
663 | 662 |
664 Handle<String> LiteralString(PretenureFlag tenured) { | 663 Handle<String> LiteralString(PretenureFlag tenured) { |
665 if (scanner().is_literal_ascii()) { | 664 if (scanner().is_literal_ascii()) { |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 private: | 813 private: |
815 static const int kLiteralTypeSlot = 0; | 814 static const int kLiteralTypeSlot = 0; |
816 static const int kElementsSlot = 1; | 815 static const int kElementsSlot = 1; |
817 | 816 |
818 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 817 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
819 }; | 818 }; |
820 | 819 |
821 } } // namespace v8::internal | 820 } } // namespace v8::internal |
822 | 821 |
823 #endif // V8_PARSER_H_ | 822 #endif // V8_PARSER_H_ |
OLD | NEW |