Revision: 10572
Author:   [email protected]
Date:     Tue Jan 31 09:19:19 2012
Log:      Save zone memory in LEnvironment by using a bit vector.

We don't need to store the full representation for each value. Instead
a bit to indicate tagged/untagged is enough.
Review URL: http://codereview.chromium.org/9104042
http://code.google.com/p/v8/source/detail?r=10572

Modified:
 /branches/bleeding_edge/src/lithium.h

=======================================
--- /branches/bleeding_edge/src/lithium.h       Mon Jan 30 07:40:50 2012
+++ /branches/bleeding_edge/src/lithium.h       Tue Jan 31 09:19:19 2012
@@ -453,7 +453,7 @@
         parameter_count_(parameter_count),
         pc_offset_(-1),
         values_(value_count),
-        representations_(value_count),
+        is_tagged_(value_count),
         spilled_registers_(NULL),
         spilled_double_registers_(NULL),
         outer_(outer) {
@@ -475,11 +475,13 @@

   void AddValue(LOperand* operand, Representation representation) {
     values_.Add(operand);
-    representations_.Add(representation);
+    if (representation.IsTagged()) {
+      is_tagged_.Add(values_.length() - 1);
+    }
   }

   bool HasTaggedValueAt(int index) const {
-    return representations_[index].IsTagged();
+    return is_tagged_.Contains(index);
   }

   void Register(int deoptimization_index,
@@ -514,7 +516,7 @@
   int parameter_count_;
   int pc_offset_;
   ZoneList<LOperand*> values_;
-  ZoneList<Representation> representations_;
+  BitVector is_tagged_;

   // Allocation index indexed arrays of spill slot operands for registers
   // that are also in spill slots at an OSR entry.  NULL for environments

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

Reply via email to