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

Unified Diff: src/parsing/preparser.h

Issue 1567603005: Set up rewriting triggers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merge RewriteExpression and ValidateExpression 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 side-by-side diff with in-line comments
Download patch
« src/parsing/parser-base.h ('K') | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index a0c59310628ac5b8a2e9bab6ed882e8e910dcd76..66a55cef078c294a014785332b990ff3682b8a07 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -938,13 +938,12 @@ class PreParserTraits {
void SetFunctionNameFromPropertyName(PreParserExpression,
PreParserIdentifier) {}
- inline PreParserExpression RewriteExpression(PreParserExpression expr) {
- return expr;
- }
+ inline PreParserExpression RewriteExpression(
+ PreParserExpression expr, const ExpressionClassifier* classifier,
+ bool* ok);
inline PreParserExpression RewriteObjectLiteralProperty(
- PreParserExpression property) {
- return property;
- }
+ PreParserExpression property, const ExpressionClassifier* classifier,
+ bool* ok);
private:
PreParser* pre_parser_;
@@ -1127,6 +1126,22 @@ PreParserExpression PreParserTraits::ParseDoExpression(bool* ok) {
}
+PreParserExpression PreParserTraits::RewriteExpression(
+ PreParserExpression expr, const ExpressionClassifier* classifier,
+ bool* ok) {
+ pre_parser_->ValidateExpression(classifier, ok);
+ return expr;
+}
+
+
+PreParserExpression PreParserTraits::RewriteObjectLiteralProperty(
+ PreParserExpression property, const ExpressionClassifier* classifier,
+ bool* ok) {
+ pre_parser_->ValidateExpression(classifier, ok);
+ return property;
+}
+
+
PreParserStatementList PreParser::ParseEagerFunctionBody(
PreParserIdentifier function_name, int pos,
const PreParserFormalParameters& parameters, FunctionKind kind,
« src/parsing/parser-base.h ('K') | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698