| Index: test/webkit/dfg-inline-new-array-buffer.js
|
| diff --git a/test/webkit/concat-while-having-a-bad-time.js b/test/webkit/dfg-inline-new-array-buffer.js
|
| similarity index 79%
|
| copy from test/webkit/concat-while-having-a-bad-time.js
|
| copy to test/webkit/dfg-inline-new-array-buffer.js
|
| index dfda1e08a0b36194b787a44ee12a9693acd8aeaf..c751f0314930260d5ab9291d68c51a4378a375af 100644
|
| --- a/test/webkit/concat-while-having-a-bad-time.js
|
| +++ b/test/webkit/dfg-inline-new-array-buffer.js
|
| @@ -22,10 +22,26 @@
|
| // 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."
|
| +"This tests that inlining correctly handles constant buffers."
|
| );
|
|
|
| -Object.defineProperty(Array.prototype, 0, { writable: false });
|
| -shouldBe("[42].concat()", "[42]");
|
| +function foo() {
|
| + return [1, 2, 3, 4];
|
| +}
|
|
|
| +function bar() {
|
| + return foo();
|
| +}
|
|
|
| +for (var i = 0; i < 1000; ++i) {
|
| + bar();
|
| +}
|
| +
|
| +for (var i = 0; i < 10; ++i) {
|
| + shouldBe("bar()[0]", "1")
|
| + shouldBe("bar()[1]", "2")
|
| + shouldBe("bar()[2]", "3")
|
| + shouldBe("bar()[3]", "4")
|
| +}
|
| +
|
| +var successfullyParsed = true;
|
|
|