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

Unified Diff: src/ast.h

Issue 19482016: Revert "Implement simple effect typing for variables" and "Handle switch effects". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « no previous file | src/effects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index d0ea926f2a8c6ad9fd96daf7a05b5d11bdc579b7..f14156f93c6235582325d7894be735c43cb69290 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -259,7 +259,6 @@ class Statement: public AstNode {
Statement() : statement_pos_(RelocInfo::kNoPosition) {}
bool IsEmpty() { return AsEmptyStatement() != NULL; }
- virtual bool IsJump() const { return false; }
void set_statement_pos(int statement_pos) { statement_pos_ = statement_pos; }
int statement_pos() const { return statement_pos_; }
@@ -390,7 +389,7 @@ class Expression: public AstNode {
protected:
explicit Expression(Isolate* isolate)
- : bounds_(Bounds::Unbounded(isolate)),
+ : bounds_(Type::None(), Type::Any(), isolate),
id_(GetNextId(isolate)),
test_id_(GetNextId(isolate)) {}
void set_to_boolean_types(byte types) { to_boolean_types_ = types; }
@@ -460,11 +459,6 @@ class Block: public BreakableStatement {
ZoneList<Statement*>* statements() { return &statements_; }
bool is_initializer_block() const { return is_initializer_block_; }
- virtual bool IsJump() const {
- return !statements_.is_empty() && statements_.last()->IsJump()
- && labels() == NULL; // Good enough as an approximation...
- }
-
Scope* scope() const { return scope_; }
void set_scope(Scope* scope) { scope_ = scope; }
@@ -1015,7 +1009,6 @@ class ExpressionStatement: public Statement {
void set_expression(Expression* e) { expression_ = e; }
Expression* expression() const { return expression_; }
- virtual bool IsJump() const { return expression_->IsThrow(); }
protected:
explicit ExpressionStatement(Expression* expression)
@@ -1026,16 +1019,7 @@ class ExpressionStatement: public Statement {
};
-class JumpStatement: public Statement {
- public:
- virtual bool IsJump() const { return true; }
-
- protected:
- JumpStatement() {}
-};
-
-
-class ContinueStatement: public JumpStatement {
+class ContinueStatement: public Statement {
public:
DECLARE_NODE_TYPE(ContinueStatement)
@@ -1050,7 +1034,7 @@ class ContinueStatement: public JumpStatement {
};
-class BreakStatement: public JumpStatement {
+class BreakStatement: public Statement {
public:
DECLARE_NODE_TYPE(BreakStatement)
@@ -1065,7 +1049,7 @@ class BreakStatement: public JumpStatement {
};
-class ReturnStatement: public JumpStatement {
+class ReturnStatement: public Statement {
public:
DECLARE_NODE_TYPE(ReturnStatement)
@@ -1184,11 +1168,6 @@ class IfStatement: public Statement {
Statement* then_statement() const { return then_statement_; }
Statement* else_statement() const { return else_statement_; }
- virtual bool IsJump() const {
- return HasThenStatement() && then_statement()->IsJump()
- && HasElseStatement() && else_statement()->IsJump();
- }
-
BailoutId IfId() const { return if_id_; }
BailoutId ThenId() const { return then_id_; }
BailoutId ElseId() const { return else_id_; }
« no previous file with comments | « no previous file | src/effects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698