removed old hyper-if experiments

snap8
Jens Mönig 2022-02-16 10:26:02 +01:00
rodzic e1e72d10c4
commit 06e4662aa5
1 zmienionych plików z 0 dodań i 46 usunięć

Wyświetl plik

@ -2367,52 +2367,6 @@ Process.prototype.reportIfElse = function (block) {
}
};
/*
// Process - hyperized reporter-if, experimental, commented out for now
Process.prototype.reportIfElse = function (block) {
var inputs = this.context.inputs;
if (inputs.length < 1) {
this.evaluateNextInput(block);
} else if (inputs.length > 1) {
if (this.flashContext()) {return; }
if (inputs[0] instanceof List && this.enableHyperOps) {
if (inputs.length < 3) {
this.evaluateNextInput(block);
} else {
this.returnValueToParentContext(
this.hyperIf.apply(this, inputs)
);
this.popContext();
}
} else {
this.returnValueToParentContext(inputs.pop());
this.popContext();
}
} else {
if (inputs[0] instanceof List && this.enableHyperOps) {
this.evaluateNextInput(block);
} else {
// this.assertType(inputs[0], ['Boolean']);
if (inputs[0]) {
this.evaluateNextInput(block);
} else {
inputs.push(null);
this.evaluateNextInput(block);
}
}
}
};
Process.prototype.hyperIf = function (test, trueValue, falseValue) {
if (test instanceof List) {
return test.map(each => this.hyperIf(each, trueValue, falseValue));
}
return test ? trueValue : falseValue;
};
*/
// Process process related primitives
Process.prototype.doStop = function () {