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

Unified Diff: src/hydrogen-instructions.h

Issue 6615012: Mark HChange that convert to int32 with truncation with the appropiate flag.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 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/hydrogen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
===================================================================
--- src/hydrogen-instructions.h (revision 7039)
+++ src/hydrogen-instructions.h (working copy)
@@ -940,13 +940,14 @@
public:
HChange(HValue* value,
Representation from,
- Representation to)
+ Representation to,
+ bool is_truncating)
: HUnaryOperation(value), from_(from), to_(to) {
ASSERT(!from.IsNone() && !to.IsNone());
ASSERT(!from.Equals(to));
set_representation(to);
SetFlag(kUseGVN);
-
+ if (is_truncating) SetFlag(kTruncatingToInt32);
if (from.IsInteger32() && to.IsTagged() && value->range() != NULL &&
value->range()->IsInSmiRange()) {
set_type(HType::Smi());
@@ -961,12 +962,7 @@
return from_;
}
- bool CanTruncateToInt32() const {
- for (int i = 0; i < uses()->length(); ++i) {
- if (!uses()->at(i)->CheckFlag(HValue::kTruncatingToInt32)) return false;
- }
- return true;
- }
+ bool CanTruncateToInt32() const { return CheckFlag(kTruncatingToInt32); }
virtual void PrintDataTo(StringStream* stream);
@@ -978,8 +974,7 @@
if (!other->IsChange()) return false;
HChange* change = HChange::cast(other);
return value() == change->value()
- && to().Equals(change->to())
- && CanTruncateToInt32() == change->CanTruncateToInt32();
+ && to().Equals(change->to());
}
private:
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698