Revision: 8049
Author:   [email protected]
Date:     Tue May 24 14:07:55 2011
Log:      Migrate flag from bit_field2 to bit_field3

[email protected]
BUG=none
TEST=none

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

Modified:
 /branches/bleeding_edge/src/objects-inl.h
 /branches/bleeding_edge/src/objects.cc
 /branches/bleeding_edge/src/objects.h

=======================================
--- /branches/bleeding_edge/src/objects-inl.h   Tue May 24 07:01:36 2011
+++ /branches/bleeding_edge/src/objects-inl.h   Tue May 24 14:07:55 2011
@@ -2540,14 +2540,14 @@

 void Map::set_is_shared(bool value) {
   if (value) {
-    set_bit_field2(bit_field2() | (1 << kIsShared));
+    set_bit_field3(bit_field3() | (1 << kIsShared));
   } else {
-    set_bit_field2(bit_field2() & ~(1 << kIsShared));
+    set_bit_field3(bit_field3() & ~(1 << kIsShared));
   }
 }

 bool Map::is_shared() {
-  return ((1 << kIsShared) & bit_field2()) != 0;
+  return ((1 << kIsShared) & bit_field3()) != 0;
 }


=======================================
--- /branches/bleeding_edge/src/objects.cc      Tue May 24 05:20:16 2011
+++ /branches/bleeding_edge/src/objects.cc      Tue May 24 14:07:55 2011
@@ -2535,8 +2535,8 @@
                                     fast->inobject_properties()) &&
     slow->instance_type() == fast->instance_type() &&
     slow->bit_field() == fast->bit_field() &&
-    slow->bit_field3() == fast->bit_field3() &&
-    (slow->bit_field2() & ~(1<<Map::kIsShared)) == fast->bit_field2();
+    slow->bit_field2() == fast->bit_field2() &&
+    (slow->bit_field3() & ~(1<<Map::kIsShared)) == fast->bit_field3();
 }


=======================================
--- /branches/bleeding_edge/src/objects.h       Tue May 24 05:20:16 2011
+++ /branches/bleeding_edge/src/objects.h       Tue May 24 14:07:55 2011
@@ -3989,8 +3989,10 @@
   static const int kHasFastElements = 2;
   static const int kStringWrapperSafeForDefaultValueOf = 3;
   static const int kAttachedToSharedFunctionInfo = 4;
-  static const int kIsShared = 5;
-  static const int kHasExternalArrayElements = 6;
+  static const int kHasExternalArrayElements = 5;
+
+  // Bit positions for bit field 3
+  static const int kIsShared = 1;

// Layout of the default cache. It holds alternating name and code objects.
   static const int kCodeCacheEntrySize = 2;

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

Reply via email to