lua AsyncEmbeddedScript don't run hscript for now

This commit is contained in:
2024-04-21 18:39:19 -06:00
parent fbf95de14b
commit 6adaee8dd6
2 changed files with 8 additions and 2 deletions

View File

@@ -244,11 +244,13 @@ class AsyncEmbeddedScript2 {
} }
runWithErrorChecking(() -> { runWithErrorChecking(() -> {
#if !lua
if (hscriptInstructions.exists(instructionPointer)) { if (hscriptInstructions.exists(instructionPointer)) {
runHscriptInstruction(instructionPointer, skipping, continuation); runHscriptInstruction(instructionPointer, skipping, continuation);
} else { return;
instructions[instructionPointer](this, skipping, continuation);
} }
#end
instructions[instructionPointer](this, skipping, continuation);
}); });
if (tryCallNextWithTailRecursion) { if (tryCallNextWithTailRecursion) {

View File

@@ -11,7 +11,9 @@ class DSLTestCase extends Test {
function testAsync() { function testAsync() {
var script = new AsyncDSLScript(); var script = new AsyncDSLScript();
script.run(); script.run();
#if !lua
Assert.isFalse(script.ranHscriptInstruction); Assert.isFalse(script.ranHscriptInstruction);
#end
Assert.isTrue(script.wholeScriptDone); Assert.isTrue(script.wholeScriptDone);
} }
@@ -21,8 +23,10 @@ class DSLTestCase extends Test {
script.run(); script.run();
var script2 = new AsyncDSLScriptThatWillCache2(); var script2 = new AsyncDSLScriptThatWillCache2();
script2.run(); script2.run();
#if !lua
Assert.isTrue(script.ranHscriptInstruction || script2.ranHscriptInstruction); Assert.isTrue(script.ranHscriptInstruction || script2.ranHscriptInstruction);
Assert.isFalse(script.ranHscriptInstruction && script2.ranHscriptInstruction); Assert.isFalse(script.ranHscriptInstruction && script2.ranHscriptInstruction);
#end
Assert.isTrue(script.wholeScriptDone); Assert.isTrue(script.wholeScriptDone);
Assert.isTrue(script2.wholeScriptDone); Assert.isTrue(script2.wholeScriptDone);
} }