Commit 44e4c275 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Avoid the use of set_type() in instruction constructors.

R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8823e8e8
......@@ -2640,7 +2640,8 @@ static bool IsInteger32(double value) {
HConstant::HConstant(Handle<Object> handle, Representation r)
: handle_(handle),
: HTemplateInstruction<0>(HType::TypeFromValue(handle)),
handle_(handle),
unique_id_(),
has_smi_value_(false),
has_int32_value_(false),
......@@ -2650,8 +2651,6 @@ HConstant::HConstant(Handle<Object> handle, Representation r)
is_not_in_new_space_(true),
is_cell_(false),
boolean_value_(handle->BooleanValue()) {
set_type(HType::TypeFromValue(handle));
if (handle_->IsHeapObject()) {
Heap* heap = Handle<HeapObject>::cast(handle)->GetHeap();
is_not_in_new_space_ = !heap->InNewSpace(*handle);
......@@ -2681,7 +2680,8 @@ HConstant::HConstant(Handle<Object> handle,
bool is_not_in_new_space,
bool is_cell,
bool boolean_value)
: handle_(handle),
: HTemplateInstruction<0>(type),
handle_(handle),
unique_id_(unique_id),
has_smi_value_(false),
has_int32_value_(false),
......@@ -2693,7 +2693,6 @@ HConstant::HConstant(Handle<Object> handle,
boolean_value_(boolean_value) {
ASSERT(!handle.is_null());
ASSERT(!type.IsTaggedNumber());
set_type(type);
Initialize(r);
}
......
This diff is collapsed.
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