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

Side by Side Diff: src/parser.h

Issue 387633003: Avoid temporary Vectors for arrow function parameter lists (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 // 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 } 543 }
544 ZoneList<ObjectLiteral::Property*>* NewPropertyList(int size, Zone* zone) { 544 ZoneList<ObjectLiteral::Property*>* NewPropertyList(int size, Zone* zone) {
545 return new(zone) ZoneList<ObjectLiteral::Property*>(size, zone); 545 return new(zone) ZoneList<ObjectLiteral::Property*>(size, zone);
546 } 546 }
547 ZoneList<v8::internal::Statement*>* NewStatementList(int size, Zone* zone) { 547 ZoneList<v8::internal::Statement*>* NewStatementList(int size, Zone* zone) {
548 return new(zone) ZoneList<v8::internal::Statement*>(size, zone); 548 return new(zone) ZoneList<v8::internal::Statement*>(size, zone);
549 } 549 }
550 V8_INLINE Scope* NewScope(Scope* parent_scope, ScopeType scope_type); 550 V8_INLINE Scope* NewScope(Scope* parent_scope, ScopeType scope_type);
551 551
552 // Utility functions 552 // Utility functions
553 Vector<VariableProxy*> ParameterListFromExpression(Expression* expression, 553 unsigned DeclareArrowParametersFromExpression(Expression* expression,
554 bool* ok); 554 Scope* scope,
555 Scanner::Location* dupe_loc,
556 bool* ok);
555 V8_INLINE AstValueFactory* ast_value_factory(); 557 V8_INLINE AstValueFactory* ast_value_factory();
556 558
557 // Temporary glue; these functions will move to ParserBase. 559 // Temporary glue; these functions will move to ParserBase.
558 Expression* ParseV8Intrinsic(bool* ok); 560 Expression* ParseV8Intrinsic(bool* ok);
559 FunctionLiteral* ParseFunctionLiteral( 561 FunctionLiteral* ParseFunctionLiteral(
560 const AstRawString* name, 562 const AstRawString* name,
561 Scanner::Location function_name_location, 563 Scanner::Location function_name_location,
562 bool name_is_strict_reserved, 564 bool name_is_strict_reserved,
563 bool is_generator, 565 bool is_generator,
564 int function_token_position, 566 int function_token_position,
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 private: 876 private:
875 static const int kLiteralTypeSlot = 0; 877 static const int kLiteralTypeSlot = 0;
876 static const int kElementsSlot = 1; 878 static const int kElementsSlot = 1;
877 879
878 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 880 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
879 }; 881 };
880 882
881 } } // namespace v8::internal 883 } } // namespace v8::internal
882 884
883 #endif // V8_PARSER_H_ 885 #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