From 2489594d711aa6b5f0a567426b09133475b45fa6 Mon Sep 17 00:00:00 2001 From: "danno@chromium.org" Date: Tue, 24 May 2011 21:07:55 +0000 Subject: [PATCH] Migrate flag from bit_field2 to bit_field3 R=ager@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/7064029 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/objects-inl.h | 6 +++--- src/objects.cc | 4 ++-- src/objects.h | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/objects-inl.h b/src/objects-inl.h index fcbe4e6..c8fcd02 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -2540,14 +2540,14 @@ bool Map::attached_to_shared_function_info() { 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; } diff --git a/src/objects.cc b/src/objects.cc index d7e6e1c..b5d3643 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -2535,8 +2535,8 @@ bool NormalizedMapCache::CheckHit(Map* slow, 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<bit_field2(); + slow->bit_field2() == fast->bit_field2() && + (slow->bit_field3() & ~(1<bit_field3(); } diff --git a/src/objects.h b/src/objects.h index 0d3a206..92a854a 100644 --- a/src/objects.h +++ b/src/objects.h @@ -3989,8 +3989,10 @@ class Map: public HeapObject { 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; -- 2.7.4