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

Side by Side Diff: src/parser.h

Issue 477263002: ES6: Add support for method shorthand in object literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: merge Created 6 years, 3 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/objects-inl.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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 566
567 // Utility functions 567 // Utility functions
568 int DeclareArrowParametersFromExpression(Expression* expression, Scope* scope, 568 int DeclareArrowParametersFromExpression(Expression* expression, Scope* scope,
569 Scanner::Location* dupe_loc, 569 Scanner::Location* dupe_loc,
570 bool* ok); 570 bool* ok);
571 V8_INLINE AstValueFactory* ast_value_factory(); 571 V8_INLINE AstValueFactory* ast_value_factory();
572 572
573 // Temporary glue; these functions will move to ParserBase. 573 // Temporary glue; these functions will move to ParserBase.
574 Expression* ParseV8Intrinsic(bool* ok); 574 Expression* ParseV8Intrinsic(bool* ok);
575 FunctionLiteral* ParseFunctionLiteral( 575 FunctionLiteral* ParseFunctionLiteral(
576 const AstRawString* name, 576 const AstRawString* name, Scanner::Location function_name_location,
577 Scanner::Location function_name_location, 577 bool name_is_strict_reserved, FunctionKind kind,
578 bool name_is_strict_reserved, 578 int function_token_position, FunctionLiteral::FunctionType type,
579 bool is_generator, 579 FunctionLiteral::ArityRestriction arity_restriction, bool* ok);
580 int function_token_position,
581 FunctionLiteral::FunctionType type,
582 FunctionLiteral::ArityRestriction arity_restriction,
583 bool* ok);
584 V8_INLINE void SkipLazyFunctionBody(const AstRawString* name, 580 V8_INLINE void SkipLazyFunctionBody(const AstRawString* name,
585 int* materialized_literal_count, 581 int* materialized_literal_count,
586 int* expected_property_count, bool* ok); 582 int* expected_property_count, bool* ok);
587 V8_INLINE ZoneList<Statement*>* ParseEagerFunctionBody( 583 V8_INLINE ZoneList<Statement*>* ParseEagerFunctionBody(
588 const AstRawString* name, int pos, Variable* fvar, 584 const AstRawString* name, int pos, Variable* fvar,
589 Token::Value fvar_init_op, bool is_generator, bool* ok); 585 Token::Value fvar_init_op, bool is_generator, bool* ok);
590 V8_INLINE void CheckConflictingVarDeclarations(v8::internal::Scope* scope, 586 V8_INLINE void CheckConflictingVarDeclarations(v8::internal::Scope* scope,
591 bool* ok); 587 bool* ok);
592 588
593 private: 589 private:
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 void InitializeForEachStatement(ForEachStatement* stmt, 735 void InitializeForEachStatement(ForEachStatement* stmt,
740 Expression* each, 736 Expression* each,
741 Expression* subject, 737 Expression* subject,
742 Statement* body); 738 Statement* body);
743 Statement* DesugarLetBindingsInForStatement( 739 Statement* DesugarLetBindingsInForStatement(
744 Scope* inner_scope, ZoneList<const AstRawString*>* names, 740 Scope* inner_scope, ZoneList<const AstRawString*>* names,
745 ForStatement* loop, Statement* init, Expression* cond, Statement* next, 741 ForStatement* loop, Statement* init, Expression* cond, Statement* next,
746 Statement* body, bool* ok); 742 Statement* body, bool* ok);
747 743
748 FunctionLiteral* ParseFunctionLiteral( 744 FunctionLiteral* ParseFunctionLiteral(
749 const AstRawString* name, 745 const AstRawString* name, Scanner::Location function_name_location,
750 Scanner::Location function_name_location, 746 bool name_is_strict_reserved, FunctionKind kind,
751 bool name_is_strict_reserved, 747 int function_token_position, FunctionLiteral::FunctionType type,
752 bool is_generator, 748 FunctionLiteral::ArityRestriction arity_restriction, bool* ok);
753 int function_token_position,
754 FunctionLiteral::FunctionType type,
755 FunctionLiteral::ArityRestriction arity_restriction,
756 bool* ok);
757 749
758 // Magical syntax support. 750 // Magical syntax support.
759 Expression* ParseV8Intrinsic(bool* ok); 751 Expression* ParseV8Intrinsic(bool* ok);
760 752
761 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode); 753 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode);
762 754
763 // Get odd-ball literals. 755 // Get odd-ball literals.
764 Literal* GetLiteralUndefined(int position); 756 Literal* GetLiteralUndefined(int position);
765 757
766 // For harmony block scoping mode: Check if the scope has conflicting var/let 758 // For harmony block scoping mode: Check if the scope has conflicting var/let
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 private: 901 private:
910 static const int kLiteralTypeSlot = 0; 902 static const int kLiteralTypeSlot = 0;
911 static const int kElementsSlot = 1; 903 static const int kElementsSlot = 1;
912 904
913 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 905 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
914 }; 906 };
915 907
916 } } // namespace v8::internal 908 } } // namespace v8::internal
917 909
918 #endif // V8_PARSER_H_ 910 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698