Immediately use the generic stub when storing into COW arrays
authorjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 18 Jan 2012 13:15:22 +0000 (13:15 +0000)
committerjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 18 Jan 2012 13:15:22 +0000 (13:15 +0000)
Review URL: https://chromiumcodereview.appspot.com/9254005

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

src/ic.cc

index 9024605..1026f6d 100644 (file)
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1,4 +1,4 @@
-// Copyright 2011 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are
 // met:
@@ -1677,6 +1677,9 @@ MaybeObject* KeyedStoreIC::Store(State state,
       if (receiver->elements()->map() ==
           isolate()->heap()->non_strict_arguments_elements_map()) {
         stub = non_strict_arguments_stub();
+      } else if (receiver->elements()->map() ==
+          isolate()->heap()->fixed_cow_array_map()) {
+        // Do nothing, just keep the generic stub.
       } else if (!force_generic) {
         if (key->IsSmi() && (target() != *non_strict_arguments_stub())) {
           StubKind stub_kind = STORE_NO_TRANSITION;