Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: src/parser.h

Issue 140543003: Tests for (pre)parse errors when "eval" and "arguments" are found in inappropriate places. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: one more test (trivial change) Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(Handle<String> var_name, 648 FunctionLiteral* ParseFunctionLiteral(
649 bool name_is_reserved, 649 Handle<String> var_name,
650 bool is_generator, 650 Scanner::Location function_name_location,
651 int function_token_position, 651 bool name_is_reserved,
652 FunctionLiteral::FunctionType type, 652 bool is_generator,
653 bool* ok); 653 int function_token_position,
654 654 FunctionLiteral::FunctionType type,
655 bool* ok);
655 656
656 // Magical syntax support. 657 // Magical syntax support.
657 Expression* ParseV8Intrinsic(bool* ok); 658 Expression* ParseV8Intrinsic(bool* ok);
658 659
659 bool is_generator() const { return current_function_state_->is_generator(); } 660 bool is_generator() const { return current_function_state_->is_generator(); }
660 661
661 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode); 662 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode);
662 663
663 Handle<String> LiteralString(PretenureFlag tenured) { 664 Handle<String> LiteralString(PretenureFlag tenured) {
664 if (scanner().is_literal_ascii()) { 665 if (scanner().is_literal_ascii()) {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 private: 814 private:
814 static const int kLiteralTypeSlot = 0; 815 static const int kLiteralTypeSlot = 0;
815 static const int kElementsSlot = 1; 816 static const int kElementsSlot = 1;
816 817
817 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 818 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
818 }; 819 };
819 820
820 } } // namespace v8::internal 821 } } // namespace v8::internal
821 822
822 #endif // V8_PARSER_H_ 823 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698