Fix assert on Mozilla test after String split optimization.
authorerik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 7 Sep 2011 13:17:25 +0000 (13:17 +0000)
committererik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 7 Sep 2011 13:17:25 +0000 (13:17 +0000)
Review URL: http://codereview.chromium.org/7837026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/heap.cc

index 51abec1..6ab1164 100644 (file)
@@ -2282,7 +2282,6 @@ void StringSplitCache::Enter(Heap* heap,
                              FixedArray* array) {
   if (!string->IsSymbol() || !pattern->IsSymbol()) return;
   uintptr_t hash = string->Hash();
-  array->set_map(heap->fixed_cow_array_map());
   uintptr_t index = ((hash & (kStringSplitCacheSize - 1)) &
       ~(kArrayEntriesPerCacheEntry - 1));
   if (cache->get(index + kStringOffset) == Smi::FromInt(0)) {
@@ -2315,6 +2314,7 @@ void StringSplitCache::Enter(Heap* heap,
       }
     }
   }
+  array->set_map(heap->fixed_cow_array_map());
 }