| OLD | NEW |
| 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 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 V8_INLINE void SetLanguageMode(Scope* scope, LanguageMode mode) { | 977 V8_INLINE void SetLanguageMode(Scope* scope, LanguageMode mode) { |
| 978 scope->SetLanguageMode(mode); | 978 scope->SetLanguageMode(mode); |
| 979 } | 979 } |
| 980 V8_INLINE void SetAsmModule() {} | 980 V8_INLINE void SetAsmModule() {} |
| 981 | 981 |
| 982 V8_INLINE void MarkCollectedTailCallExpressions() {} | 982 V8_INLINE void MarkCollectedTailCallExpressions() {} |
| 983 V8_INLINE void MarkTailPosition(PreParserExpression expression) {} | 983 V8_INLINE void MarkTailPosition(PreParserExpression expression) {} |
| 984 | 984 |
| 985 V8_INLINE PreParserExpression SpreadCall(PreParserExpression function, | 985 V8_INLINE PreParserExpression SpreadCall(PreParserExpression function, |
| 986 PreParserExpressionList args, | 986 PreParserExpressionList args, |
| 987 int pos); | 987 int pos, |
| 988 Call::PossiblyEval possibly_eval); |
| 988 V8_INLINE PreParserExpression SpreadCallNew(PreParserExpression function, | 989 V8_INLINE PreParserExpression SpreadCallNew(PreParserExpression function, |
| 989 PreParserExpressionList args, | 990 PreParserExpressionList args, |
| 990 int pos); | 991 int pos); |
| 991 | 992 |
| 992 V8_INLINE void RewriteDestructuringAssignments() {} | 993 V8_INLINE void RewriteDestructuringAssignments() {} |
| 993 | 994 |
| 994 V8_INLINE PreParserExpression RewriteExponentiation(PreParserExpression left, | 995 V8_INLINE PreParserExpression RewriteExponentiation(PreParserExpression left, |
| 995 PreParserExpression right, | 996 PreParserExpression right, |
| 996 int pos) { | 997 int pos) { |
| 997 return left; | 998 return left; |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 | 1629 |
| 1629 // Preparser's private field members. | 1630 // Preparser's private field members. |
| 1630 | 1631 |
| 1631 int* use_counts_; | 1632 int* use_counts_; |
| 1632 bool track_unresolved_variables_; | 1633 bool track_unresolved_variables_; |
| 1633 PreParserLogger log_; | 1634 PreParserLogger log_; |
| 1634 PendingCompilationErrorHandler* pending_error_handler_; | 1635 PendingCompilationErrorHandler* pending_error_handler_; |
| 1635 }; | 1636 }; |
| 1636 | 1637 |
| 1637 PreParserExpression PreParser::SpreadCall(PreParserExpression function, | 1638 PreParserExpression PreParser::SpreadCall(PreParserExpression function, |
| 1638 PreParserExpressionList args, | 1639 PreParserExpressionList args, int pos, |
| 1639 int pos) { | 1640 Call::PossiblyEval possibly_eval) { |
| 1640 return factory()->NewCall(function, args, pos); | 1641 return factory()->NewCall(function, args, pos, possibly_eval); |
| 1641 } | 1642 } |
| 1642 | 1643 |
| 1643 PreParserExpression PreParser::SpreadCallNew(PreParserExpression function, | 1644 PreParserExpression PreParser::SpreadCallNew(PreParserExpression function, |
| 1644 PreParserExpressionList args, | 1645 PreParserExpressionList args, |
| 1645 int pos) { | 1646 int pos) { |
| 1646 return factory()->NewCallNew(function, args, pos); | 1647 return factory()->NewCallNew(function, args, pos); |
| 1647 } | 1648 } |
| 1648 | 1649 |
| 1649 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state, | 1650 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state, |
| 1650 int start, | 1651 int start, |
| 1651 PreParserExpression tag) { | 1652 PreParserExpression tag) { |
| 1652 if (IsTaggedTemplate(tag)) { | 1653 if (IsTaggedTemplate(tag)) { |
| 1653 // Emulate generation of array literals for tag callsite | 1654 // Emulate generation of array literals for tag callsite |
| 1654 // 1st is array of cooked strings, second is array of raw strings | 1655 // 1st is array of cooked strings, second is array of raw strings |
| 1655 function_state_->NextMaterializedLiteralIndex(); | 1656 function_state_->NextMaterializedLiteralIndex(); |
| 1656 function_state_->NextMaterializedLiteralIndex(); | 1657 function_state_->NextMaterializedLiteralIndex(); |
| 1657 } | 1658 } |
| 1658 return EmptyExpression(); | 1659 return EmptyExpression(); |
| 1659 } | 1660 } |
| 1660 | 1661 |
| 1661 } // namespace internal | 1662 } // namespace internal |
| 1662 } // namespace v8 | 1663 } // namespace v8 |
| 1663 | 1664 |
| 1664 #endif // V8_PARSING_PREPARSER_H | 1665 #endif // V8_PARSING_PREPARSER_H |
| OLD | NEW |