Index: test/webkit/dfg-holy-put-by-val-interferes-with-get-array-length.js |
diff --git a/test/webkit/concat-while-having-a-bad-time.js b/test/webkit/dfg-holy-put-by-val-interferes-with-get-array-length.js |
similarity index 84% |
copy from test/webkit/concat-while-having-a-bad-time.js |
copy to test/webkit/dfg-holy-put-by-val-interferes-with-get-array-length.js |
index dfda1e08a0b36194b787a44ee12a9693acd8aeaf..684ebe81947c7f06b1f10b275bebe87f9b58c0e3 100644 |
--- a/test/webkit/concat-while-having-a-bad-time.js |
+++ b/test/webkit/dfg-holy-put-by-val-interferes-with-get-array-length.js |
@@ -22,10 +22,16 @@ |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
description( |
-"Tests the behavior of Array.prototype.concat while the array is having a bad time due to one of the elements we are concatenating." |
+"Tests that the DFG's interference analysis knows that a holy PutByVal interferes with a GetArrayLength." |
); |
-Object.defineProperty(Array.prototype, 0, { writable: false }); |
-shouldBe("[42].concat()", "[42]"); |
+function foo(array) { |
+ var x = array.length; |
+ array[1] = 42; |
+ return [x, array.length]; |
+} |
+ |
+for (var i = 0; i < 100; ++i) |
+ shouldBe("foo([75])", "[1,2]"); |