| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 4ddb6c18fc46e28c706c0b229255a2e81fa2a32a..f6db0d545bb095b90c333a34fdcacf99a1be82c0 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -15,6 +15,7 @@
|
| #include "src/compiler.h"
|
| #include "src/messages.h"
|
| #include "src/preparser.h"
|
| +#include "src/rewriter.h"
|
| #include "src/runtime/runtime.h"
|
| #include "src/scanner-character-streams.h"
|
| #include "src/scopeinfo.h"
|
| @@ -924,6 +925,7 @@ Parser::Parser(ParseInfo* info)
|
| set_allow_harmony_new_target(FLAG_harmony_new_target);
|
| set_allow_strong_mode(FLAG_strong_mode);
|
| set_allow_legacy_const(FLAG_legacy_const);
|
| + set_allow_do_expression_parsing(FLAG_do_expression_parsing);
|
| for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount;
|
| ++feature) {
|
| use_counts_[feature] = 0;
|
| @@ -3581,6 +3583,14 @@ Statement* Parser::DesugarLexicalBindingsInForStatement(
|
| }
|
|
|
|
|
| +void Parser::RewriteDoExpression(Expression* expr, bool* ok) {
|
| + DCHECK(expr->IsDoExpression());
|
| + if (!Rewriter::Rewrite(this, expr->AsDoExpression(), ast_value_factory())) {
|
| + *ok = false;
|
| + }
|
| +}
|
| +
|
| +
|
| Statement* Parser::ParseForStatement(ZoneList<const AstRawString*>* labels,
|
| bool* ok) {
|
| // ForStatement ::
|
| @@ -4768,6 +4778,7 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
|
| SET_ALLOW(harmony_spread_arrays);
|
| SET_ALLOW(harmony_new_target);
|
| SET_ALLOW(strong_mode);
|
| + SET_ALLOW(do_expression_parsing);
|
| #undef SET_ALLOW
|
| }
|
| PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction(
|
|
|