From 06e4662aa5418feb95fb1e5c3c2a954fea54873f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20M=C3=B6nig?= Date: Wed, 16 Feb 2022 10:26:02 +0100 Subject: [PATCH] removed old hyper-if experiments --- src/threads.js | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/src/threads.js b/src/threads.js index 23d35733..98b7298a 100644 --- a/src/threads.js +++ b/src/threads.js @@ -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 () {