Revision: 20011
Author: [email protected]
Date: Mon Mar 17 17:19:39 2014 UTC
Log: Don't generate keyed store ICs for global proxies.
BUG=352983
LOG=y
[email protected]
Review URL: https://codereview.chromium.org/197873025
http://code.google.com/p/v8/source/detail?r=20011
Added:
/branches/bleeding_edge/test/mjsunit/regress/regress-keyed-store-global.js
Modified:
/branches/bleeding_edge/src/ic.cc
=======================================
--- /dev/null
+++
/branches/bleeding_edge/test/mjsunit/regress/regress-keyed-store-global.js
Mon Mar 17 17:19:39 2014 UTC
@@ -0,0 +1,12 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --verify-heap
+function f(a) {
+ for (var i = 0; i < 256; i++) a[i] = i;
+}
+
+f([]);
+f([]);
+f(this);
=======================================
--- /branches/bleeding_edge/src/ic.cc Mon Mar 17 15:43:33 2014 UTC
+++ /branches/bleeding_edge/src/ic.cc Mon Mar 17 17:19:39 2014 UTC
@@ -1687,7 +1687,9 @@
JSReceiver::MAY_BE_STORE_FROM_KEYED);
if (maybe_object->IsFailure()) return maybe_object;
} else {
- bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded() &&
+ bool use_ic = FLAG_use_ic &&
+ !object->IsAccessCheckNeeded() &&
+ !object->IsJSGlobalProxy() &&
!(object->IsJSObject() &&
JSObject::cast(*object)->map()->is_observed());
if (use_ic && !object->IsSmi()) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.