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

Unified Diff: src/ast.h

Issue 805005: Revert changes 4088 and 4087 to fix build. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 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/arm/virtual-frame-arm.h ('k') | src/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
===================================================================
--- src/ast.h (revision 4088)
+++ src/ast.h (working copy)
@@ -137,7 +137,6 @@
virtual BreakableStatement* AsBreakableStatement() { return NULL; }
virtual IterationStatement* AsIterationStatement() { return NULL; }
virtual UnaryOperation* AsUnaryOperation() { return NULL; }
- virtual CountOperation* AsCountOperation() { return NULL; }
virtual BinaryOperation* AsBinaryOperation() { return NULL; }
virtual Assignment* AsAssignment() { return NULL; }
virtual FunctionLiteral* AsFunctionLiteral() { return NULL; }
@@ -162,9 +161,6 @@
virtual Statement* AsStatement() { return this; }
virtual ReturnStatement* AsReturnStatement() { return NULL; }
- virtual Assignment* StatementAsSimpleAssignment() { return NULL; }
- virtual CountOperation* StatementAsCountOperation() { return NULL; }
-
bool IsEmpty() { return AsEmptyStatement() != NULL; }
void set_statement_pos(int statement_pos) { statement_pos_ = statement_pos; }
@@ -325,16 +321,6 @@
virtual void Accept(AstVisitor* v);
- virtual Assignment* StatementAsSimpleAssignment() {
- if (statements_.length() != 1) return NULL;
- return statements_[0]->StatementAsSimpleAssignment();
- }
-
- virtual CountOperation* StatementAsCountOperation() {
- if (statements_.length() != 1) return NULL;
- return statements_[0]->StatementAsCountOperation();
- }
-
void AddStatement(Statement* statement) { statements_.Add(statement); }
ZoneList<Statement*>* statements() { return &statements_; }
@@ -456,8 +442,8 @@
init_(NULL),
cond_(NULL),
next_(NULL),
- may_have_function_literal_(true),
- loop_variable_(NULL) {}
+ may_have_function_literal_(true) {
+ }
void Initialize(Statement* init,
Expression* cond,
@@ -478,17 +464,12 @@
return may_have_function_literal_;
}
- bool is_fast_smi_loop() { return loop_variable_ != NULL; }
- Variable* loop_variable() { return loop_variable_; }
- void set_loop_variable(Variable* var) { loop_variable_ = var; }
-
private:
Statement* init_;
Expression* cond_;
Statement* next_;
// True if there is a function literal subexpression in the condition.
bool may_have_function_literal_;
- Variable* loop_variable_;
friend class AstOptimizer;
};
@@ -526,9 +507,6 @@
// Type testing & conversion.
virtual ExpressionStatement* AsExpressionStatement() { return this; }
- virtual Assignment* StatementAsSimpleAssignment();
- virtual CountOperation* StatementAsCountOperation();
-
void set_expression(Expression* e) { expression_ = e; }
Expression* expression() { return expression_; }
@@ -986,7 +964,7 @@
// Reading from a mutable variable is a side effect, but 'this' is
// immutable.
- virtual bool IsTrivial() { return is_trivial_; }
+ virtual bool IsTrivial() { return is_this(); }
bool IsVariable(Handle<String> n) {
return !is_this() && name().is_identical_to(n);
@@ -1001,8 +979,6 @@
Variable* var() const { return var_; }
bool is_this() const { return is_this_; }
bool inside_with() const { return inside_with_; }
- bool is_trivial() { return is_trivial_; }
- void set_is_trivial(bool b) { is_trivial_ = b; }
// Bind this proxy to the variable var.
void BindTo(Variable* var);
@@ -1012,7 +988,6 @@
Variable* var_; // resolved variable, or NULL
bool is_this_;
bool inside_with_;
- bool is_trivial_;
VariableProxy(Handle<String> name, bool is_this, bool inside_with);
explicit VariableProxy(bool is_this);
@@ -1271,8 +1246,6 @@
virtual void Accept(AstVisitor* v);
- virtual CountOperation* AsCountOperation() { return this; }
-
bool is_prefix() const { return is_prefix_; }
bool is_postfix() const { return !is_prefix_; }
Token::Value op() const { return op_; }
@@ -1351,8 +1324,6 @@
virtual void Accept(AstVisitor* v);
virtual Assignment* AsAssignment() { return this; }
- Assignment* AsSimpleAssignment() { return !is_compound() ? this : NULL; }
-
Token::Value binary_op() const;
Token::Value op() const { return op_; }
« no previous file with comments | « src/arm/virtual-frame-arm.h ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698