Reviewers: Yang,
Message:
PTAL
Description:
Support concatenating with zero-size arrays with DICTIONARY_ELEMENTS in
Runtime_ArrayConcat.
BUG=chromium:450895
LOG=y
Please review this at https://codereview.chromium.org/849693003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+5, -5 lines):
M src/runtime/runtime-array.cc
A + test/mjsunit/regress/regress-450895.js
Index: src/runtime/runtime-array.cc
diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
index
a69d8c87f8b0d47e97be162b66b7fcb971e3de56..0ba1fa6cce0e977d961e7dbcad6daeec0bdf7bca
100644
--- a/src/runtime/runtime-array.cc
+++ b/src/runtime/runtime-array.cc
@@ -850,6 +850,7 @@ RUNTIME_FUNCTION(Runtime_ArrayConcat) {
}
case FAST_HOLEY_ELEMENTS:
case FAST_ELEMENTS:
+ case DICTIONARY_ELEMENTS:
DCHECK_EQ(0, length);
break;
default:
Index: test/mjsunit/regress/regress-450895.js
diff --git a/test/mjsunit/regress/regress-449070.js
b/test/mjsunit/regress/regress-450895.js
similarity index 77%
copy from test/mjsunit/regress/regress-449070.js
copy to test/mjsunit/regress/regress-450895.js
index
7a0f0a838cdd25817ab6a2d8f63c1ef9fbe6e526..48aa00d956c6f84fdcfe2e02cfc286c0f07180ba
100644
--- a/test/mjsunit/regress/regress-449070.js
+++ b/test/mjsunit/regress/regress-450895.js
@@ -1,10 +1,9 @@
// Copyright 2015 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
-try {
- %NormalizeElements(this);
-} catch(e) {
-}
+var v = new Array();
+Object.freeze(v);
+v = v.concat(0.5);
--
--
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.