Commit 3b23719d authored by vitalyr@chromium.org's avatar vitalyr@chromium.org

Make HConstant a bit more compact.

Review URL: http://codereview.chromium.org/6850031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8aaa0c6b
......@@ -1017,10 +1017,9 @@ void HEnterInlined::PrintDataTo(StringStream* stream) {
HConstant::HConstant(Handle<Object> handle, Representation r)
: handle_(handle),
constant_type_(HType::TypeFromValue(handle)),
has_int32_value_(false),
int32_value_(0),
has_double_value_(false),
int32_value_(0),
double_value_(0) {
set_representation(r);
SetFlag(kUseGVN);
......@@ -1435,7 +1434,7 @@ HType HPhi::CalculateInferredType() {
HType HConstant::CalculateInferredType() {
return constant_type_;
return HType::TypeFromValue(handle_);
}
......
......@@ -1990,14 +1990,13 @@ class HConstant: public HTemplateInstruction<0> {
private:
Handle<Object> handle_;
HType constant_type_;
// The following two values represent the int32 and the double value of the
// given constant if there is a lossless conversion between the constant
// and the specific representation.
bool has_int32_value_;
bool has_int32_value_ : 1;
bool has_double_value_ : 1;
int32_t int32_value_;
bool has_double_value_;
double double_value_;
};
......
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