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

Side by Side Diff: src/parser.h

Issue 329413002: Throw syntax error when a getter/setter has the wrong number of params (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test exception Created 6 years, 6 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 | « src/ast.h ('k') | 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 // 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_PARSER_H_ 5 #ifndef V8_PARSER_H_
6 #define V8_PARSER_H_ 6 #define V8_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/compiler.h" // For CachedDataMode 10 #include "src/compiler.h" // For CachedDataMode
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 571
572 // Temporary glue; these functions will move to ParserBase. 572 // Temporary glue; these functions will move to ParserBase.
573 Expression* ParseV8Intrinsic(bool* ok); 573 Expression* ParseV8Intrinsic(bool* ok);
574 FunctionLiteral* ParseFunctionLiteral( 574 FunctionLiteral* ParseFunctionLiteral(
575 Handle<String> name, 575 Handle<String> name,
576 Scanner::Location function_name_location, 576 Scanner::Location function_name_location,
577 bool name_is_strict_reserved, 577 bool name_is_strict_reserved,
578 bool is_generator, 578 bool is_generator,
579 int function_token_position, 579 int function_token_position,
580 FunctionLiteral::FunctionType type, 580 FunctionLiteral::FunctionType type,
581 FunctionLiteral::ArityRestriction arity_restriction,
581 bool* ok); 582 bool* ok);
582 583
583 private: 584 private:
584 Parser* parser_; 585 Parser* parser_;
585 }; 586 };
586 587
587 588
588 class Parser : public ParserBase<ParserTraits> { 589 class Parser : public ParserBase<ParserTraits> {
589 public: 590 public:
590 explicit Parser(CompilationInfo* info); 591 explicit Parser(CompilationInfo* info);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 Statement* init, Expression* cond, Statement* next, Statement* body, 724 Statement* init, Expression* cond, Statement* next, Statement* body,
724 bool* ok); 725 bool* ok);
725 726
726 FunctionLiteral* ParseFunctionLiteral( 727 FunctionLiteral* ParseFunctionLiteral(
727 Handle<String> name, 728 Handle<String> name,
728 Scanner::Location function_name_location, 729 Scanner::Location function_name_location,
729 bool name_is_strict_reserved, 730 bool name_is_strict_reserved,
730 bool is_generator, 731 bool is_generator,
731 int function_token_position, 732 int function_token_position,
732 FunctionLiteral::FunctionType type, 733 FunctionLiteral::FunctionType type,
734 FunctionLiteral::ArityRestriction arity_restriction,
733 bool* ok); 735 bool* ok);
734 736
735 // Magical syntax support. 737 // Magical syntax support.
736 Expression* ParseV8Intrinsic(bool* ok); 738 Expression* ParseV8Intrinsic(bool* ok);
737 739
738 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode); 740 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode);
739 741
740 // Get odd-ball literals. 742 // Get odd-ball literals.
741 Literal* GetLiteralUndefined(int position); 743 Literal* GetLiteralUndefined(int position);
742 744
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 private: 835 private:
834 static const int kLiteralTypeSlot = 0; 836 static const int kLiteralTypeSlot = 0;
835 static const int kElementsSlot = 1; 837 static const int kElementsSlot = 1;
836 838
837 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 839 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
838 }; 840 };
839 841
840 } } // namespace v8::internal 842 } } // namespace v8::internal
841 843
842 #endif // V8_PARSER_H_ 844 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698