Index: test/webkit/dfg-inline-arguments-use-from-all-the-places-broken.js |
diff --git a/test/webkit/concat-while-having-a-bad-time.js b/test/webkit/dfg-inline-arguments-use-from-all-the-places-broken.js |
similarity index 57% |
copy from test/webkit/concat-while-having-a-bad-time.js |
copy to test/webkit/dfg-inline-arguments-use-from-all-the-places-broken.js |
index dfda1e08a0b36194b787a44ee12a9693acd8aeaf..b4fa6c18839b291959439a759f132c940477e5dc 100644 |
--- a/test/webkit/concat-while-having-a-bad-time.js |
+++ b/test/webkit/dfg-inline-arguments-use-from-all-the-places-broken.js |
@@ -22,10 +22,40 @@ |
// 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 attempts to test that inlining preserves basic function.arguments functionality when said functionality is used from inside and outside getters and from inlined code, all at once; but it fails at this and instead finds other bugs particularly in the DFG stack layout machinery." |
); |
-Object.defineProperty(Array.prototype, 0, { writable: false }); |
-shouldBe("[42].concat()", "[42]"); |
+function foo(o,b,c) { |
+ return [foo.arguments, bar.arguments].concat(o.f); |
+} |
+function fuzz(a, b) { |
+ return [foo.arguments, bar.arguments, getter.arguments, fuzz.arguments]; |
+} |
+ |
+function getter() { |
+ return [foo.arguments, bar.arguments, getter.arguments].concat(fuzz(42, 56)); |
+} |
+ |
+o = {} |
+o.__defineGetter__("f", getter); |
+ |
+function bar(o,b,c) { |
+ return [bar.arguments].concat(foo(o,b,c)); |
+} |
+ |
+function argsToStr(args) { |
+ if (args.length === void 0 || args.charAt !== void 0) |
+ return "" + args |
+ var str = "[" + args + ": "; |
+ for (var i = 0; i < args.length; ++i) { |
+ if (i) |
+ str += ", "; |
+ str += argsToStr(args[i]); |
+ } |
+ return str + "]"; |
+} |
+ |
+for (var __i = 0; __i < 200; ++__i) |
+ shouldThrow("argsToStr(bar(\"a\" + __i, \"b\" + __i, \"c\" + __i))"); |