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