OpenBirch WASM version bump

This commit is contained in:
BOTAlex 2024-07-31 00:48:48 +02:00
parent 1718b16c4d
commit 44e4559794
3 changed files with 269 additions and 258 deletions

521
static/OpenBirchWasm/OpenBirch.js Normal file → Executable file

File diff suppressed because it is too large Load Diff

BIN
static/OpenBirchWasm/OpenBirch.wasm Normal file → Executable file

Binary file not shown.

View File

@ -7,10 +7,10 @@ function str2C(s) {
return ret; return ret;
} }
window.runEval = function (inputText) { window.runEval = function (inputText, stopAssignments = false) {
console.log("input: " + inputText); console.log("input: " + inputText);
var inputPtr = str2C(inputText); var inputPtr = str2C(inputText);
var resultPointer = Module2._eval(inputPtr); var resultPointer = Module._eval(inputPtr, stopAssignments);
var resultString = ""; var resultString = "";
@ -19,7 +19,7 @@ window.runEval = function (inputText) {
if (resultPointer) { if (resultPointer) {
var i = 0; var i = 0;
while (true) { while (true) {
var charCode = Module2.getValue(resultPointer + i, 'i8'); var charCode = Module.getValue(resultPointer + i, 'i8');
if (charCode === 0) break; if (charCode === 0) break;
resultString += String.fromCharCode(charCode); resultString += String.fromCharCode(charCode);
i++; i++;