Integer HConstants don't need to kDependsOnOsrEntries

Review URL: https://codereview.chromium.org/12299009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 732a2af9
......@@ -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);
}
}
......
......@@ -3182,6 +3182,8 @@ class HConstant: public HTemplateInstruction<0> {
}
private:
void Initialize(Representation r);
virtual bool IsDeletable() const { return true; }
// If this is a numerical constant, handle_ either points to to the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment