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

Side by Side Diff: src/parsing/preparser.h

Issue 2629363002: [Ignition/turbo] Add a CallWithSpread bytecode. (Closed)
Patch Set: refactor OnlyLastArgIsSpread Created 3 years, 11 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
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_PARSING_PREPARSER_H 5 #ifndef V8_PARSING_PREPARSER_H
6 #define V8_PARSING_PREPARSER_H 6 #define V8_PARSING_PREPARSER_H
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/parsing/parser-base.h" 10 #include "src/parsing/parser-base.h"
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 V8_INLINE void SetLanguageMode(Scope* scope, LanguageMode mode) { 978 V8_INLINE void SetLanguageMode(Scope* scope, LanguageMode mode) {
979 scope->SetLanguageMode(mode); 979 scope->SetLanguageMode(mode);
980 } 980 }
981 V8_INLINE void SetAsmModule() {} 981 V8_INLINE void SetAsmModule() {}
982 982
983 V8_INLINE void MarkCollectedTailCallExpressions() {} 983 V8_INLINE void MarkCollectedTailCallExpressions() {}
984 V8_INLINE void MarkTailPosition(PreParserExpression expression) {} 984 V8_INLINE void MarkTailPosition(PreParserExpression expression) {}
985 985
986 V8_INLINE PreParserExpression SpreadCall(PreParserExpression function, 986 V8_INLINE PreParserExpression SpreadCall(PreParserExpression function,
987 PreParserExpressionList args, 987 PreParserExpressionList args,
988 int pos); 988 int pos,
989 Call::PossiblyEval possibly_eval);
989 V8_INLINE PreParserExpression SpreadCallNew(PreParserExpression function, 990 V8_INLINE PreParserExpression SpreadCallNew(PreParserExpression function,
990 PreParserExpressionList args, 991 PreParserExpressionList args,
991 int pos); 992 int pos);
992 993
993 V8_INLINE void RewriteDestructuringAssignments() {} 994 V8_INLINE void RewriteDestructuringAssignments() {}
994 995
995 V8_INLINE PreParserExpression RewriteExponentiation(PreParserExpression left, 996 V8_INLINE PreParserExpression RewriteExponentiation(PreParserExpression left,
996 PreParserExpression right, 997 PreParserExpression right,
997 int pos) { 998 int pos) {
998 return left; 999 return left;
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 1593
1593 // Preparser's private field members. 1594 // Preparser's private field members.
1594 1595
1595 int* use_counts_; 1596 int* use_counts_;
1596 bool track_unresolved_variables_; 1597 bool track_unresolved_variables_;
1597 PreParserLogger log_; 1598 PreParserLogger log_;
1598 PendingCompilationErrorHandler* pending_error_handler_; 1599 PendingCompilationErrorHandler* pending_error_handler_;
1599 }; 1600 };
1600 1601
1601 PreParserExpression PreParser::SpreadCall(PreParserExpression function, 1602 PreParserExpression PreParser::SpreadCall(PreParserExpression function,
1602 PreParserExpressionList args, 1603 PreParserExpressionList args, int pos,
1603 int pos) { 1604 Call::PossiblyEval possibly_eval) {
1604 return factory()->NewCall(function, args, pos); 1605 return factory()->NewCall(function, args, pos, possibly_eval);
1605 } 1606 }
1606 1607
1607 PreParserExpression PreParser::SpreadCallNew(PreParserExpression function, 1608 PreParserExpression PreParser::SpreadCallNew(PreParserExpression function,
1608 PreParserExpressionList args, 1609 PreParserExpressionList args,
1609 int pos) { 1610 int pos) {
1610 return factory()->NewCallNew(function, args, pos); 1611 return factory()->NewCallNew(function, args, pos);
1611 } 1612 }
1612 1613
1613 PreParserStatementList PreParser::ParseEagerFunctionBody( 1614 PreParserStatementList PreParser::ParseEagerFunctionBody(
1614 PreParserIdentifier function_name, int pos, 1615 PreParserIdentifier function_name, int pos,
(...skipping 23 matching lines...) Expand all
1638 function_state_->NextMaterializedLiteralIndex(); 1639 function_state_->NextMaterializedLiteralIndex();
1639 function_state_->NextMaterializedLiteralIndex(); 1640 function_state_->NextMaterializedLiteralIndex();
1640 } 1641 }
1641 return EmptyExpression(); 1642 return EmptyExpression();
1642 } 1643 }
1643 1644
1644 } // namespace internal 1645 } // namespace internal
1645 } // namespace v8 1646 } // namespace v8
1646 1647
1647 #endif // V8_PARSING_PREPARSER_H 1648 #endif // V8_PARSING_PREPARSER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698