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

Unified Diff: src/hydrogen-instructions.cc

Issue 12299009: Integer HConstants don't need to kDependsOnOsrEntries (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: restrict to integer constants Created 7 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-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
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 522f99a6e6ed01d1b5c9db18b6860e7d0e256f8b..aef227f60d0b98a67c59c980fcbfc9947550a598 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -1812,7 +1812,6 @@ HConstant::HConstant(Handle<Object> handle, Representation r)
has_double_value_(false) {
// Dereferencing here is safe: the value of a number object does not change.
AllowHandleDereference allow_handle_deref(Isolate::Current());
- SetFlag(kUseGVN);
if (handle_->IsNumber()) {
double n = handle_->Number();
has_int32_value_ = IsInteger32(n);
@@ -1829,7 +1828,7 @@ HConstant::HConstant(Handle<Object> handle, Representation r)
r = Representation::Tagged();
}
}
- set_representation(r);
+ Initialize(r);
}
@@ -1838,8 +1837,7 @@ HConstant::HConstant(int32_t integer_value, Representation r)
has_double_value_(true),
int32_value_(integer_value),
double_value_(FastI2D(integer_value)) {
- set_representation(r);
- SetFlag(kUseGVN);
+ Initialize(r);
}
@@ -1848,8 +1846,16 @@ HConstant::HConstant(double double_value, Representation r)
has_double_value_(true),
int32_value_(DoubleToInt32(double_value)),
double_value_(double_value) {
+ Initialize(r);
+}
+
+
+void HConstant::Initialize(Representation r) {
set_representation(r);
SetFlag(kUseGVN);
+ if (representation().IsInteger32()) {
+ ClearGVNFlag(kDependsOnOsrEntries);
+ }
}
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698