add support for tail calls when in completion record position - fixes #1572
This commit is contained in:
@@ -2,12 +2,19 @@
|
||||
|
||||
(function () {
|
||||
var _this = this,
|
||||
_arguments = arguments;
|
||||
_arguments2 = arguments;
|
||||
|
||||
var foo = function foo() {
|
||||
_this;
|
||||
_arguments;
|
||||
foo();
|
||||
var _again = true;
|
||||
|
||||
_function: while (_again) {
|
||||
_again = false;
|
||||
|
||||
_this;
|
||||
_arguments2;
|
||||
_again = true;
|
||||
continue _function;
|
||||
}
|
||||
};
|
||||
foo();
|
||||
});
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
function skipWhile(cond) {
|
||||
if (!hasNext() || cond(current, last)) return;
|
||||
move();
|
||||
skipWhile(cond);
|
||||
}
|
||||
|
||||
var skipWhile2 = function (cond) {
|
||||
if (!hasNext() || cond(current, last)) return;
|
||||
move();
|
||||
skipWhile2(cond);
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
|
||||
function skipWhile(_x) {
|
||||
var _again = true;
|
||||
|
||||
_function: while (_again) {
|
||||
var cond = _x;
|
||||
_again = false;
|
||||
|
||||
if (!hasNext() || cond(current, last)) return;
|
||||
move();
|
||||
_x = cond;
|
||||
_again = true;
|
||||
continue _function;
|
||||
}
|
||||
}
|
||||
|
||||
var skipWhile2 = function skipWhile2(_x2) {
|
||||
var _again2 = true;
|
||||
|
||||
_function2: while (_again2) {
|
||||
var cond = _x2;
|
||||
_again2 = false;
|
||||
|
||||
if (!hasNext() || cond(current, last)) return;
|
||||
move();
|
||||
_x2 = cond;
|
||||
_again2 = true;
|
||||
continue _function2;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user