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

Side by Side Diff: src/parser.h

Issue 197353003: Move ParseYieldExpression to ParserBase. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 412
413 // Types used by FunctionState and BlockState. 413 // Types used by FunctionState and BlockState.
414 typedef v8::internal::Scope Scope; 414 typedef v8::internal::Scope Scope;
415 typedef AstNodeFactory<AstConstructionVisitor> Factory; 415 typedef AstNodeFactory<AstConstructionVisitor> Factory;
416 typedef Variable GeneratorVariable; 416 typedef Variable GeneratorVariable;
417 typedef v8::internal::Zone Zone; 417 typedef v8::internal::Zone Zone;
418 418
419 // Return types for traversing functions. 419 // Return types for traversing functions.
420 typedef Handle<String> Identifier; 420 typedef Handle<String> Identifier;
421 typedef v8::internal::Expression* Expression; 421 typedef v8::internal::Expression* Expression;
422 typedef Yield* YieldExpression;
422 typedef v8::internal::FunctionLiteral* FunctionLiteral; 423 typedef v8::internal::FunctionLiteral* FunctionLiteral;
423 typedef v8::internal::Literal* Literal; 424 typedef v8::internal::Literal* Literal;
424 typedef ObjectLiteral::Property* ObjectLiteralProperty; 425 typedef ObjectLiteral::Property* ObjectLiteralProperty;
425 typedef ZoneList<v8::internal::Expression*>* ExpressionList; 426 typedef ZoneList<v8::internal::Expression*>* ExpressionList;
426 typedef ZoneList<ObjectLiteral::Property*>* PropertyList; 427 typedef ZoneList<ObjectLiteral::Property*>* PropertyList;
427 }; 428 };
428 429
429 explicit ParserTraits(Parser* parser) : parser_(parser) {} 430 explicit ParserTraits(Parser* parser) : parser_(parser) {}
430 431
431 // Custom operations executed when FunctionStates are created and destructed. 432 // Custom operations executed when FunctionStates are created and destructed.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // Temporary glue; these functions will move to ParserBase. 546 // Temporary glue; these functions will move to ParserBase.
546 Expression* ParseV8Intrinsic(bool* ok); 547 Expression* ParseV8Intrinsic(bool* ok);
547 FunctionLiteral* ParseFunctionLiteral( 548 FunctionLiteral* ParseFunctionLiteral(
548 Handle<String> name, 549 Handle<String> name,
549 Scanner::Location function_name_location, 550 Scanner::Location function_name_location,
550 bool name_is_strict_reserved, 551 bool name_is_strict_reserved,
551 bool is_generator, 552 bool is_generator,
552 int function_token_position, 553 int function_token_position,
553 FunctionLiteral::FunctionType type, 554 FunctionLiteral::FunctionType type,
554 bool* ok); 555 bool* ok);
555 Expression* ParseYieldExpression(bool* ok);
556 Expression* ParseConditionalExpression(bool accept_IN, bool* ok); 556 Expression* ParseConditionalExpression(bool accept_IN, bool* ok);
557 557
558 private: 558 private:
559 Parser* parser_; 559 Parser* parser_;
560 }; 560 };
561 561
562 562
563 class Parser : public ParserBase<ParserTraits> { 563 class Parser : public ParserBase<ParserTraits> {
564 public: 564 public:
565 explicit Parser(CompilationInfo* info); 565 explicit Parser(CompilationInfo* info);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 WhileStatement* ParseWhileStatement(ZoneStringList* labels, bool* ok); 689 WhileStatement* ParseWhileStatement(ZoneStringList* labels, bool* ok);
690 Statement* ParseForStatement(ZoneStringList* labels, bool* ok); 690 Statement* ParseForStatement(ZoneStringList* labels, bool* ok);
691 Statement* ParseThrowStatement(bool* ok); 691 Statement* ParseThrowStatement(bool* ok);
692 Expression* MakeCatchContext(Handle<String> id, VariableProxy* value); 692 Expression* MakeCatchContext(Handle<String> id, VariableProxy* value);
693 TryStatement* ParseTryStatement(bool* ok); 693 TryStatement* ParseTryStatement(bool* ok);
694 DebuggerStatement* ParseDebuggerStatement(bool* ok); 694 DebuggerStatement* ParseDebuggerStatement(bool* ok);
695 695
696 // Support for hamony block scoped bindings. 696 // Support for hamony block scoped bindings.
697 Block* ParseScopedBlock(ZoneStringList* labels, bool* ok); 697 Block* ParseScopedBlock(ZoneStringList* labels, bool* ok);
698 698
699 Expression* ParseYieldExpression(bool* ok);
700 Expression* ParseConditionalExpression(bool accept_IN, bool* ok); 699 Expression* ParseConditionalExpression(bool accept_IN, bool* ok);
701 Expression* ParseBinaryExpression(int prec, bool accept_IN, bool* ok); 700 Expression* ParseBinaryExpression(int prec, bool accept_IN, bool* ok);
702 Expression* ParseUnaryExpression(bool* ok); 701 Expression* ParseUnaryExpression(bool* ok);
703 Expression* ParsePostfixExpression(bool* ok); 702 Expression* ParsePostfixExpression(bool* ok);
704 Expression* ParseLeftHandSideExpression(bool* ok); 703 Expression* ParseLeftHandSideExpression(bool* ok);
705 Expression* ParseMemberWithNewPrefixesExpression(bool* ok); 704 Expression* ParseMemberWithNewPrefixesExpression(bool* ok);
706 Expression* ParseMemberExpression(bool* ok); 705 Expression* ParseMemberExpression(bool* ok);
707 Expression* ParseMemberExpressionContinuation(Expression* expression, 706 Expression* ParseMemberExpressionContinuation(Expression* expression,
708 bool* ok); 707 bool* ok);
709 Expression* ParseObjectLiteral(bool* ok); 708 Expression* ParseObjectLiteral(bool* ok);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 private: 823 private:
825 static const int kLiteralTypeSlot = 0; 824 static const int kLiteralTypeSlot = 0;
826 static const int kElementsSlot = 1; 825 static const int kElementsSlot = 1;
827 826
828 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 827 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
829 }; 828 };
830 829
831 } } // namespace v8::internal 830 } } // namespace v8::internal
832 831
833 #endif // V8_PARSER_H_ 832 #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