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

Unified Diff: src/parsing/preparser.h

Issue 2339453002: [parser] Refactor of Parse*Statement*, part 7 (Closed)
Patch Set: The real patch Created 4 years, 3 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
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index ddc74c53180867f6fb679e7aeaffe5ce90ca0673..d8c04fe8daccd41d0d0695f604a58eab74aff1de 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -825,7 +825,6 @@ class PreParser : public ParserBase<PreParser> {
Statement ParseClassDeclaration(ZoneList<const AstRawString*>* names,
bool default_export, bool* ok);
Statement ParseForStatement(ZoneList<const AstRawString*>* labels, bool* ok);
- Statement ParseTryStatement(bool* ok);
Expression ParseConditionalExpression(bool accept_IN, bool* ok);
Expression ParseObjectLiteral(bool* ok);
@@ -946,6 +945,22 @@ class PreParser : public ParserBase<PreParser> {
PreParserStatementList cases, Scope* scope) {
return PreParserStatement::Default();
}
+ V8_INLINE void RewriteCatchPattern(CatchInfo* catch_info, bool* ok) {}
+ V8_INLINE void ValidateCatchBlock(const CatchInfo& catch_info, bool* ok) {}
+ V8_INLINE PreParserStatement RewriteTryStatement(
+ PreParserStatement try_block, PreParserStatement catch_block,
+ PreParserStatement finally_block, const CatchInfo& catch_info, int pos,
+ bool* ok) {
marja 2016/09/14 10:06:59 Now this code is in both Parser and PreParser; wha
nickie 2016/09/14 10:19:09 Well, for some weird reason, in the two implementa
marja 2016/09/14 11:00:27 I think that should get figured out before landing
nickie 2016/09/14 11:43:08 Done. (As discussed offline.)
+ if (FLAG_harmony_explicit_tailcalls && !catch_block.IsNullStatement() &&
+ catch_info.tail_call_expressions.has_explicit_tail_calls()) {
+ // TODO(ishell): update chapter number.
+ // ES8 XX.YY.ZZ
+ ReportMessageAt(catch_info.tail_call_expressions.location(),
+ MessageTemplate::kUnexpectedTailCallInCatchBlock);
+ *ok = false;
+ }
+ return PreParserStatement::Default();
+ }
V8_INLINE PreParserExpression RewriteDoExpression(PreParserStatement body,
int pos, bool* ok) {
@@ -1180,7 +1195,7 @@ class PreParser : public ParserBase<PreParser> {
}
V8_INLINE static PreParserStatement NullStatement() {
- return PreParserStatement::Default();
+ return PreParserStatement::Null();
}
V8_INLINE bool IsNullStatement(PreParserStatement stmt) {
@@ -1192,7 +1207,7 @@ class PreParser : public ParserBase<PreParser> {
}
V8_INLINE static PreParserStatement NullBlock() {
- return PreParserStatement::Default();
+ return PreParserStatement::Null();
}
V8_INLINE PreParserIdentifier EmptyIdentifierString() const {
« src/parsing/parser.cc ('K') | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698