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

Side by Side Diff: src/preparser.h

Issue 1425723004: Properly handle parsing a '%'-prefixed runtime call as a binding pattern (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | test/mjsunit/regress/regress-552302.js » ('j') | 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_PREPARSER_H 5 #ifndef V8_PREPARSER_H
6 #define V8_PREPARSER_H 6 #define V8_PREPARSER_H
7 7
8 #include "src/bailout-reason.h" 8 #include "src/bailout-reason.h"
9 #include "src/expression-classifier.h" 9 #include "src/expression-classifier.h"
10 #include "src/func-name-inferrer.h" 10 #include "src/func-name-inferrer.h"
(...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2397 case Token::TEMPLATE_SPAN: 2397 case Token::TEMPLATE_SPAN:
2398 case Token::TEMPLATE_TAIL: 2398 case Token::TEMPLATE_TAIL:
2399 classifier->RecordBindingPatternError( 2399 classifier->RecordBindingPatternError(
2400 scanner()->peek_location(), 2400 scanner()->peek_location(),
2401 MessageTemplate::kUnexpectedTemplateString); 2401 MessageTemplate::kUnexpectedTemplateString);
2402 return this->ParseTemplateLiteral(Traits::NoTemplateTag(), beg_pos, 2402 return this->ParseTemplateLiteral(Traits::NoTemplateTag(), beg_pos,
2403 classifier, ok); 2403 classifier, ok);
2404 2404
2405 case Token::MOD: 2405 case Token::MOD:
2406 if (allow_natives() || extension_ != NULL) { 2406 if (allow_natives() || extension_ != NULL) {
2407 BindingPatternUnexpectedToken(classifier);
2407 return this->ParseV8Intrinsic(ok); 2408 return this->ParseV8Intrinsic(ok);
2408 } 2409 }
2409 break; 2410 break;
2410 2411
2411 case Token::DO: 2412 case Token::DO:
2412 if (allow_harmony_do_expressions()) { 2413 if (allow_harmony_do_expressions()) {
2413 BindingPatternUnexpectedToken(classifier); 2414 BindingPatternUnexpectedToken(classifier);
2414 return Traits::ParseDoExpression(ok); 2415 return Traits::ParseDoExpression(ok);
2415 } 2416 }
2416 break; 2417 break;
(...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after
4198 return; 4199 return;
4199 } 4200 }
4200 has_seen_constructor_ = true; 4201 has_seen_constructor_ = true;
4201 return; 4202 return;
4202 } 4203 }
4203 } 4204 }
4204 } // namespace internal 4205 } // namespace internal
4205 } // namespace v8 4206 } // namespace v8
4206 4207
4207 #endif // V8_PREPARSER_H 4208 #endif // V8_PREPARSER_H
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-552302.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698