Index: test/webkit/dfg-inline-early-return.js |
diff --git a/test/webkit/concat-while-having-a-bad-time.js b/test/webkit/dfg-inline-early-return.js |
similarity index 81% |
copy from test/webkit/concat-while-having-a-bad-time.js |
copy to test/webkit/dfg-inline-early-return.js |
index dfda1e08a0b36194b787a44ee12a9693acd8aeaf..986a7ec7a5087a6710b22315ca00263917a5ca05 100644 |
--- a/test/webkit/concat-while-having-a-bad-time.js |
+++ b/test/webkit/dfg-inline-early-return.js |
@@ -22,10 +22,23 @@ |
// 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 an early return in the first basic block does not crash the DFG's bytecode parser whilst inlining." |
); |
-Object.defineProperty(Array.prototype, 0, { writable: false }); |
-shouldBe("[42].concat()", "[42]"); |
+function foo(a) { |
+ { |
+ return a; |
+ } |
+} |
+function bar(a) { |
+ return foo(a); |
+} |
+for (var i = 0; i < 100; ++i) |
+ bar(i); |
+ |
+shouldBe("foo(42)", "42"); |
+shouldBe("bar(42)", "42"); |
+ |
+var successfullyParsed = true; |