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

Unified Diff: src/hydrogen.cc

Issue 6810015: Remove unnecessary AST node for ++ and -- operations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 8 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/full-codegen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
===================================================================
--- src/hydrogen.cc (revision 7507)
+++ src/hydrogen.cc (working copy)
@@ -4612,13 +4612,6 @@
}
-void HGraphBuilder::VisitIncrementOperation(IncrementOperation* expr) {
- // IncrementOperation is never visited by the visitor. It only
- // occurs as a subexpression of CountOperation.
- UNREACHABLE();
-}
-
-
HInstruction* HGraphBuilder::BuildIncrement(HValue* value, bool increment) {
HConstant* delta = increment
? graph_->GetConstant1()
@@ -4630,8 +4623,7 @@
void HGraphBuilder::VisitCountOperation(CountOperation* expr) {
- IncrementOperation* increment = expr->increment();
- Expression* target = increment->expression();
+ Expression* target = expr->expression();
VariableProxy* proxy = target->AsVariableProxy();
Variable* var = proxy->AsVariable();
Property* prop = target->AsProperty();
@@ -4692,7 +4684,7 @@
load = BuildLoadNamedGeneric(obj, prop);
}
PushAndAdd(load);
- if (load->HasSideEffects()) AddSimulate(increment->id());
+ if (load->HasSideEffects()) AddSimulate(expr->CountId());
HValue* before = Pop();
// There is no deoptimization to after the increment, so we don't need
@@ -4733,7 +4725,7 @@
? BuildLoadKeyedFastElement(obj, key, prop)
: BuildLoadKeyedGeneric(obj, key);
PushAndAdd(load);
- if (load->HasSideEffects()) AddSimulate(increment->id());
+ if (load->HasSideEffects()) AddSimulate(expr->CountId());
HValue* before = Pop();
// There is no deoptimization to after the increment, so we don't need
« no previous file with comments | « src/full-codegen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698