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

Unified Diff: src/ast.h

Issue 5682010: Deoptimize to the proper target after assignment side effects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
Patch Set: Created 10 years 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/ast.cc » ('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 555c19ec987abe07365ae64e3ab7c41589269821..c33838e011823b6784c4908a273ad99855447194 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -575,11 +575,13 @@ class ForInStatement: public IterationStatement {
Expression* enumerable() const { return enumerable_; }
// Bailout support.
+ int AssignmentId() const { return assignment_id_; }
virtual int ContinueId() const { return EntryId(); }
private:
Expression* each_;
Expression* enumerable_;
+ int assignment_id_;
};
@@ -1426,7 +1428,9 @@ class IncrementOperation: public Expression {
class CountOperation: public Expression {
public:
CountOperation(bool is_prefix, IncrementOperation* increment, int pos)
- : is_prefix_(is_prefix), increment_(increment), pos_(pos) { }
+ : is_prefix_(is_prefix), increment_(increment), pos_(pos),
+ assignment_id_(GetNextId()) {
+ }
DECLARE_NODE_TYPE(CountOperation)
@@ -1446,10 +1450,14 @@ class CountOperation: public Expression {
virtual bool IsInlineable() const;
+ // Bailout support.
+ int AssignmentId() const { return assignment_id_; }
+
private:
bool is_prefix_;
IncrementOperation* increment_;
int pos_;
+ int assignment_id_;
};
@@ -1579,7 +1587,8 @@ class Assignment: public Expression {
}
// Bailout support.
- int compound_bailout_id() const { return compound_bailout_id_; }
+ int CompoundLoadId() const { return compound_load_id_; }
+ int AssignmentId() const { return assignment_id_; }
private:
Token::Value op_;
@@ -1587,7 +1596,8 @@ class Assignment: public Expression {
Expression* value_;
int pos_;
BinaryOperation* binary_operation_;
- int compound_bailout_id_;
+ int compound_load_id_;
+ int assignment_id_;
bool block_start_;
bool block_end_;
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698