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

Unified Diff: src/hydrogen-instructions.h

Issue 14253010: If the input to an HChange is of type smi, then no need to mark gvn flag changes new space promotio… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index bd1dd403a79cbd397b2a9c56a48a590c71443216..74f7da8597616ebf0f98d27cc7f674f20e09405f 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -1757,11 +1757,15 @@ class HChange: public HUnaryOperation {
ASSERT(!value->representation().IsNone() && !to.IsNone());
ASSERT(!value->representation().Equals(to));
set_representation(to);
- set_type(HType::TaggedNumber());
SetFlag(kUseGVN);
if (deoptimize_on_undefined) SetFlag(kDeoptimizeOnUndefined);
if (is_truncating) SetFlag(kTruncatingToInt32);
- if (to.IsTagged()) SetGVNFlag(kChangesNewSpacePromotion);
+ if (value->type().IsSmi()) {
+ set_type(HType::Smi());
+ } else {
+ set_type(HType::TaggedNumber());
+ if (to.IsTagged()) SetGVNFlag(kChangesNewSpacePromotion);
+ }
}
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698