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

Unified Diff: src/preparser.h

Issue 1084983002: [strong] Implement static restrictions on switch statement (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback 3 Created 5 years, 8 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
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 0e11e3d94319d23965bb42996baaa51fe76159a2..829017c98ed6caf4ff1c2499869f443eb437702a 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -1104,6 +1104,10 @@ class PreParserStatement {
return PreParserStatement(kUnknownStatement);
}
+ static PreParserStatement Jump() {
+ return PreParserStatement(kJumpStatement);
+ }
+
static PreParserStatement FunctionDeclaration() {
return PreParserStatement(kFunctionDeclaration);
}
@@ -1139,9 +1143,14 @@ class PreParserStatement {
return code_ == kFunctionDeclaration;
}
+ bool IsJumpStatement() {
+ return code_ == kJumpStatement;
+ }
+
private:
enum Type {
kUnknownStatement,
+ kJumpStatement,
kStringLiteralExpressionStatement,
kUseStrictExpressionStatement,
kUseStrongExpressionStatement,
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698