Index: src/ast.h |
diff --git a/src/ast.h b/src/ast.h |
index 7bfa02178faabb6e09af3c3f8d8f303393da88d1..42fffd570294454a8613de408b9efaba38fa6d17 100644 |
--- a/src/ast.h |
+++ b/src/ast.h |
@@ -280,6 +280,7 @@ class Statement : public AstNode { |
bool IsEmpty() { return AsEmptyStatement() != NULL; } |
virtual bool IsJump() const { return false; } |
+ virtual bool IsStrongSwitchTerminatingStatement() const { return false; } |
rossberg
2015/04/14 20:19:49
I'm tempted to get rid of this and just use IsJump
conradw
2015/04/15 11:40:03
Done.
|
}; |
@@ -514,6 +515,9 @@ class Block FINAL : public BreakableStatement { |
return !statements_.is_empty() && statements_.last()->IsJump() |
&& labels() == NULL; // Good enough as an approximation... |
} |
+ bool IsStrongSwitchTerminatingStatement() const OVERRIDE { |
+ return IsJump(); |
+ } |
Scope* scope() const { return scope_; } |
void set_scope(Scope* scope) { scope_ = scope; } |
@@ -1019,6 +1023,7 @@ class ExpressionStatement FINAL : public Statement { |
void set_expression(Expression* e) { expression_ = e; } |
Expression* expression() const { return expression_; } |
bool IsJump() const OVERRIDE { return expression_->IsThrow(); } |
+ bool IsStrongSwitchTerminatingStatement() const OVERRIDE { return IsJump(); } |
protected: |
ExpressionStatement(Zone* zone, Expression* expression, int pos) |
@@ -1032,6 +1037,7 @@ class ExpressionStatement FINAL : public Statement { |
class JumpStatement : public Statement { |
public: |
bool IsJump() const FINAL { return true; } |
+ bool IsStrongSwitchTerminatingStatement() const FINAL { return true; } |
protected: |
explicit JumpStatement(Zone* zone, int pos) : Statement(zone, pos) {} |