Revision: 19690
Author: [email protected]
Date: Thu Mar 6 12:19:06 2014 UTC
Log: Only use the non-strict-arguments-stub if the store site is
non-strict.
BUG=349874
LOG=N
[email protected]
Review URL: https://codereview.chromium.org/176843018
http://code.google.com/p/v8/source/detail?r=19690
Added:
/branches/bleeding_edge/test/mjsunit/regress-keyed-store-non-strict-arguments.js
Modified:
/branches/bleeding_edge/src/ic.cc
=======================================
--- /dev/null
+++
/branches/bleeding_edge/test/mjsunit/regress-keyed-store-non-strict-arguments.js
Thu Mar 6 12:19:06 2014 UTC
@@ -0,0 +1,16 @@
+// 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.
+
+function args(arg) { return arguments; }
+var a = args(false);
+
+(function () {
+ "use strict";
+ a["const" + 0] = 0;
+})();
+
+(function () {
+ "use strict";
+ a[0] = 0;
+})();
=======================================
--- /branches/bleeding_edge/src/ic.cc Tue Mar 4 12:48:17 2014 UTC
+++ /branches/bleeding_edge/src/ic.cc Thu Mar 6 12:19:06 2014 UTC
@@ -1689,7 +1689,9 @@
bool key_is_smi_like = key->IsSmi() || !key->ToSmi()->IsFailure();
if (receiver->elements()->map() ==
isolate()->heap()->non_strict_arguments_elements_map()) {
- stub = non_strict_arguments_stub();
+ if (strict_mode() == kNonStrictMode) {
+ stub = non_strict_arguments_stub();
+ }
} else if (key_is_smi_like &&
!(target().is_identical_to(non_strict_arguments_stub())))
{
// We should go generic if receiver isn't a dictionary, but our
--
--
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/groups/opt_out.