Provide placeholders for proper function length.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
(function f() {
|
||||
(function f(n) {
|
||||
var _arguments = arguments,
|
||||
_this = this,
|
||||
_shouldContinue,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
(function f() {
|
||||
(function f(n) {
|
||||
var _arguments = arguments,
|
||||
_this = this,
|
||||
_shouldContinue,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
(function f(n, /* should be undefined after first pass */ m) {
|
||||
(function f(n = getDefaultValue(), /* should be undefined after first pass */ m) {
|
||||
if (n <= 0) {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
9
test/fixtures/transformation/es6-tail-call/recursion/exec.js
vendored
Normal file
9
test/fixtures/transformation/es6-tail-call/recursion/exec.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
var timeLimit = Date.now() + 1000;
|
||||
|
||||
assert.equal((function f(n) {
|
||||
assert.operator(Date.now(), '<', timeLimit, "Timeout");
|
||||
if (n <= 0) {
|
||||
return "foo";
|
||||
}
|
||||
return f(n - 1);
|
||||
})(1e6), "foo");
|
||||
@@ -1,13 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
(function f() {
|
||||
(function f(_x, /* should be undefined after first pass */m) {
|
||||
var _arguments = arguments,
|
||||
_this = this,
|
||||
_shouldContinue,
|
||||
_result;
|
||||
do {
|
||||
_shouldContinue = false;
|
||||
_result = (function (n, /* should be undefined after first pass */m) {
|
||||
_result = (function (_x, m) {
|
||||
var n = arguments[0] === undefined ? getDefaultValue() : arguments[0];
|
||||
if (n <= 0) {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
} catch (e) {}
|
||||
})(1000000) === "foo";
|
||||
|
||||
(function f() {
|
||||
(function f(n) {
|
||||
var _arguments = arguments,
|
||||
_this = this,
|
||||
_shouldContinue,
|
||||
@@ -43,7 +43,7 @@
|
||||
} finally {}
|
||||
})(1000000) === "foo";
|
||||
|
||||
(function f() {
|
||||
(function f(n) {
|
||||
var _arguments = arguments,
|
||||
_this = this,
|
||||
_shouldContinue,
|
||||
|
||||
Reference in New Issue
Block a user