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

Unified Diff: src/ast.h

Issue 23597037: Unify handling of position info in AST, part 2 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplify SetExpressionPosition Created 7 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
« no previous file with comments | « no previous file | src/full-codegen.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 44332dc7691a35d15e63b5224dc877060e354c74..b3168d4e326ee9f9432c947e978bcb5379a4dc86 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -765,12 +765,6 @@ class DoWhileStatement V8_FINAL : public IterationStatement {
Expression* cond() const { return cond_; }
- // TODO(rossberg): get rid of this.
- // Position where condition expression starts. We need it to make
- // the loop's condition a breakable location.
- int condition_position() { return condition_position_; }
- void set_condition_position(int pos) { condition_position_ = pos; }
-
virtual BailoutId ContinueId() const V8_OVERRIDE { return continue_id_; }
virtual BailoutId StackCheckId() const V8_OVERRIDE { return back_edge_id_; }
BailoutId BackEdgeId() const { return back_edge_id_; }
@@ -779,7 +773,6 @@ class DoWhileStatement V8_FINAL : public IterationStatement {
DoWhileStatement(Isolate* isolate, ZoneStringList* labels, int pos)
: IterationStatement(isolate, labels, pos),
cond_(NULL),
- condition_position_(-1),
continue_id_(GetNextId(isolate)),
back_edge_id_(GetNextId(isolate)) {
}
@@ -787,8 +780,6 @@ class DoWhileStatement V8_FINAL : public IterationStatement {
private:
Expression* cond_;
- int condition_position_;
-
const BailoutId continue_id_;
const BailoutId back_edge_id_;
};
@@ -2061,10 +2052,6 @@ class Conditional V8_FINAL : public Expression {
Expression* then_expression() const { return then_expression_; }
Expression* else_expression() const { return else_expression_; }
- // TODO(rossberg): get rid of this.
- int then_expression_position() const { return then_expression_position_; }
- int else_expression_position() const { return else_expression_position_; }
-
BailoutId ThenId() const { return then_id_; }
BailoutId ElseId() const { return else_id_; }
@@ -2073,15 +2060,11 @@ class Conditional V8_FINAL : public Expression {
Expression* condition,
Expression* then_expression,
Expression* else_expression,
- int then_expression_position,
- int else_expression_position,
int position)
: Expression(isolate, position),
condition_(condition),
then_expression_(then_expression),
else_expression_(else_expression),
- then_expression_position_(then_expression_position),
- else_expression_position_(else_expression_position),
then_id_(GetNextId(isolate)),
else_id_(GetNextId(isolate)) { }
@@ -2089,8 +2072,6 @@ class Conditional V8_FINAL : public Expression {
Expression* condition_;
Expression* then_expression_;
Expression* else_expression_;
- int then_expression_position_;
- int else_expression_position_;
const BailoutId then_id_;
const BailoutId else_id_;
};
@@ -3198,12 +3179,9 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
Conditional* NewConditional(Expression* condition,
Expression* then_expression,
Expression* else_expression,
- int then_expression_position,
- int else_expression_position,
int position) {
Conditional* cond = new(zone_) Conditional(
- isolate_, condition, then_expression, else_expression,
- then_expression_position, else_expression_position, position);
+ isolate_, condition, then_expression, else_expression, position);
VISIT_AND_RETURN(Conditional, cond)
}
« no previous file with comments | « no previous file | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698