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

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

Issue 1617733002: Remove unnecessary RewriteNonPatternArguments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove ValidateExpression from native calls Created 4 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
« no previous file with comments | « src/parsing/parser.cc ('k') | no next file » | 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_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/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/hashmap.h" 10 #include "src/hashmap.h"
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 inline void QueueDestructuringAssignmentForRewriting(PreParserExpression) {} 929 inline void QueueDestructuringAssignmentForRewriting(PreParserExpression) {}
930 930
931 void SetFunctionNameFromPropertyName(PreParserExpression, 931 void SetFunctionNameFromPropertyName(PreParserExpression,
932 PreParserIdentifier) {} 932 PreParserIdentifier) {}
933 void SetFunctionNameFromIdentifierRef(PreParserExpression, 933 void SetFunctionNameFromIdentifierRef(PreParserExpression,
934 PreParserExpression) {} 934 PreParserExpression) {}
935 935
936 inline PreParserExpression RewriteNonPattern( 936 inline PreParserExpression RewriteNonPattern(
937 PreParserExpression expr, const ExpressionClassifier* classifier, 937 PreParserExpression expr, const ExpressionClassifier* classifier,
938 bool* ok); 938 bool* ok);
939 inline PreParserExpression RewriteNonPatternArguments(
940 PreParserExpression args, const ExpressionClassifier* classifier,
941 bool* ok);
942 inline PreParserExpression RewriteNonPatternObjectLiteralProperty( 939 inline PreParserExpression RewriteNonPatternObjectLiteralProperty(
943 PreParserExpression property, const ExpressionClassifier* classifier, 940 PreParserExpression property, const ExpressionClassifier* classifier,
944 bool* ok); 941 bool* ok);
945 942
946 private: 943 private:
947 PreParser* pre_parser_; 944 PreParser* pre_parser_;
948 }; 945 };
949 946
950 947
951 // Preparsing checks a JavaScript program and emits preparse-data that helps 948 // Preparsing checks a JavaScript program and emits preparse-data that helps
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 1122
1126 1123
1127 PreParserExpression PreParserTraits::RewriteNonPattern( 1124 PreParserExpression PreParserTraits::RewriteNonPattern(
1128 PreParserExpression expr, const ExpressionClassifier* classifier, 1125 PreParserExpression expr, const ExpressionClassifier* classifier,
1129 bool* ok) { 1126 bool* ok) {
1130 pre_parser_->ValidateExpression(classifier, ok); 1127 pre_parser_->ValidateExpression(classifier, ok);
1131 return expr; 1128 return expr;
1132 } 1129 }
1133 1130
1134 1131
1135 PreParserExpression PreParserTraits::RewriteNonPatternArguments(
1136 PreParserExpression args, const ExpressionClassifier* classifier,
1137 bool* ok) {
1138 pre_parser_->ValidateExpression(classifier, ok);
1139 return args;
1140 }
1141
1142
1143 PreParserExpression PreParserTraits::RewriteNonPatternObjectLiteralProperty( 1132 PreParserExpression PreParserTraits::RewriteNonPatternObjectLiteralProperty(
1144 PreParserExpression property, const ExpressionClassifier* classifier, 1133 PreParserExpression property, const ExpressionClassifier* classifier,
1145 bool* ok) { 1134 bool* ok) {
1146 pre_parser_->ValidateExpression(classifier, ok); 1135 pre_parser_->ValidateExpression(classifier, ok);
1147 return property; 1136 return property;
1148 } 1137 }
1149 1138
1150 1139
1151 PreParserStatementList PreParser::ParseEagerFunctionBody( 1140 PreParserStatementList PreParser::ParseEagerFunctionBody(
1152 PreParserIdentifier function_name, int pos, 1141 PreParserIdentifier function_name, int pos,
(...skipping 14 matching lines...) Expand all
1167 const PreParserFormalParameters& parameters, FunctionKind kind, 1156 const PreParserFormalParameters& parameters, FunctionKind kind,
1168 FunctionLiteral::FunctionType function_type, bool* ok) { 1157 FunctionLiteral::FunctionType function_type, bool* ok) {
1169 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1158 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1170 kind, function_type, ok); 1159 kind, function_type, ok);
1171 } 1160 }
1172 1161
1173 } // namespace internal 1162 } // namespace internal
1174 } // namespace v8 1163 } // namespace v8
1175 1164
1176 #endif // V8_PARSING_PREPARSER_H 1165 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698