Revision: 7621
Author:   [email protected]
Date:     Thu Apr 14 23:04:50 2011
Log:      Make HConstant a bit more compact.

Review URL: http://codereview.chromium.org/6850031
http://code.google.com/p/v8/source/detail?r=7621

Modified:
 /branches/bleeding_edge/src/hydrogen-instructions.cc
 /branches/bleeding_edge/src/hydrogen-instructions.h

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Thu Apr 7 23:54:50 2011 +++ /branches/bleeding_edge/src/hydrogen-instructions.cc Thu Apr 14 23:04:50 2011
@@ -1017,10 +1017,9 @@

 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 HConstant::CalculateInferredType() {
-  return constant_type_;
+  return HType::TypeFromValue(handle_);
 }


=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Tue Apr 12 12:05:48 2011 +++ /branches/bleeding_edge/src/hydrogen-instructions.h Thu Apr 14 23:04:50 2011
@@ -1990,14 +1990,13 @@

  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_;
 };

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to