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

Unified Diff: src/hydrogen-instructions.cc

Issue 7634022: Insert representation changes before doing range analysis. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 4 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
« src/hydrogen.cc ('K') | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
===================================================================
--- src/hydrogen-instructions.cc (revision 8984)
+++ src/hydrogen-instructions.cc (working copy)
@@ -641,6 +641,7 @@
length()->PrintNameTo(stream);
}
+
void HCallConstantFunction::PrintDataTo(StringStream* stream) {
if (IsApplyFunction()) {
stream->Add("optimized apply ");
@@ -875,6 +876,17 @@
}
+Range* HChange::InferRange() {
+ Range* input_range = value()->range();
+ if (from().IsInteger32() &&
+ to().IsTagged() &&
+ input_range != NULL && input_range->IsInSmiRange()) {
+ set_type(HType::Smi());
+ }
+ return input_range != NULL ? input_range->Copy() : HValue::InferRange();
Vyacheslav Egorov (Chromium) 2011/08/22 12:53:31 It seems that if we are converting to integer type
fschneider 2011/08/23 07:36:10 Done.
+}
+
+
Range* HConstant::InferRange() {
if (has_int32_value_) {
Range* result = new Range(int32_value_, int32_value_);
@@ -1220,6 +1232,7 @@
? left()->range()->Copy()
: new Range();
result->Sar(c->Integer32Value());
+ result->set_can_be_minus_zero(false);
return result;
}
}
@@ -1243,6 +1256,7 @@
? left()->range()->Copy()
: new Range();
result->Sar(c->Integer32Value());
+ result->set_can_be_minus_zero(false);
return result;
}
}
@@ -1259,6 +1273,7 @@
? left()->range()->Copy()
: new Range();
result->Shl(c->Integer32Value());
+ result->set_can_be_minus_zero(false);
return result;
}
}
« src/hydrogen.cc ('K') | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698