summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/argsx-1.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/arguments/argsx-1.js')
-rw-r--r--js/src/jit-test/tests/arguments/argsx-1.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/argsx-1.js b/js/src/jit-test/tests/arguments/argsx-1.js
new file mode 100644
index 000000000..ea9d0906e
--- /dev/null
+++ b/js/src/jit-test/tests/arguments/argsx-1.js
@@ -0,0 +1,22 @@
+actual = '';
+expected = "function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,"
+
+// args object created by interpreter
+
+function f() {
+ var a = arguments;
+
+ for (var i = 0; i < 10; ++i) {
+ appendToActual(a.callee);
+ appendToActual(a.length);
+ appendToActual(a[0]);
+ appendToActual(a[1]);
+ }
+}
+
+f(1, 2, 3);
+f({}, 'a');
+f('abc', 'def');
+
+
+assertEq(actual, expected)