| 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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 bool is_generator, | 697 bool is_generator, |
| 698 int function_token_position, | 698 int function_token_position, |
| 699 FunctionLiteral::FunctionType type, | 699 FunctionLiteral::FunctionType type, |
| 700 bool* ok); | 700 bool* ok); |
| 701 | 701 |
| 702 // Magical syntax support. | 702 // Magical syntax support. |
| 703 Expression* ParseV8Intrinsic(bool* ok); | 703 Expression* ParseV8Intrinsic(bool* ok); |
| 704 | 704 |
| 705 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode); | 705 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode); |
| 706 | 706 |
| 707 Handle<String> LiteralString(PretenureFlag tenured) { | |
| 708 if (scanner()->is_literal_ascii()) { | |
| 709 return isolate_->factory()->NewStringFromAscii( | |
| 710 scanner()->literal_ascii_string(), tenured); | |
| 711 } else { | |
| 712 return isolate_->factory()->NewStringFromTwoByte( | |
| 713 scanner()->literal_utf16_string(), tenured); | |
| 714 } | |
| 715 } | |
| 716 | |
| 717 // Get odd-ball literals. | 707 // Get odd-ball literals. |
| 718 Literal* GetLiteralUndefined(int position); | 708 Literal* GetLiteralUndefined(int position); |
| 719 | 709 |
| 720 // Determine if the expression is a variable proxy and mark it as being used | 710 // Determine if the expression is a variable proxy and mark it as being used |
| 721 // in an assignment or with a increment/decrement operator. This is currently | 711 // in an assignment or with a increment/decrement operator. This is currently |
| 722 // used on for the statically checking assignments to harmony const bindings. | 712 // used on for the statically checking assignments to harmony const bindings. |
| 723 void MarkAsLValue(Expression* expression); | 713 void MarkAsLValue(Expression* expression); |
| 724 | 714 |
| 725 // Strict mode validation of LValue expressions | 715 // Strict mode validation of LValue expressions |
| 726 void CheckStrictModeLValue(Expression* expression, | 716 void CheckStrictModeLValue(Expression* expression, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 private: | 809 private: |
| 820 static const int kLiteralTypeSlot = 0; | 810 static const int kLiteralTypeSlot = 0; |
| 821 static const int kElementsSlot = 1; | 811 static const int kElementsSlot = 1; |
| 822 | 812 |
| 823 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 813 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 824 }; | 814 }; |
| 825 | 815 |
| 826 } } // namespace v8::internal | 816 } } // namespace v8::internal |
| 827 | 817 |
| 828 #endif // V8_PARSER_H_ | 818 #endif // V8_PARSER_H_ |
| OLD | NEW |