diff --git a/Dockerfile b/Dockerfile index d267d7b..17fffad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ RUN git clone --depth 1 -b $JERRY_BRANCH $JERRY_REPO $JERRY_HOME --recurse-submo WORKDIR $JERRY_HOME RUN source $EMSDK/emsdk_env.sh && \ - make -C emscripten-snapshot-compiler JERRY_PROFILE=minimal + make -C emscripten-snapshot-compiler # Installing WebAssembly Toolkit RUN cd / && \ @@ -48,4 +48,4 @@ RUN cd / && \ ENV PATH=$PATH:/wabt/bin ENTRYPOINT source $EMSDK/emsdk_env.sh && /bin/bash -CMD ["node","$JERRY_HOME/emscripten-snapshot-compiler/build/bin/jsc.js"] +CMD ["node","$JERRY_HOME/emscripten-snapshot-compiler/build/bin/minimal/jsc.js"] diff --git a/JerryScriptUpdate.rst b/JerryScriptUpdate.rst index 02e53d5..e1fa79f 100644 --- a/JerryScriptUpdate.rst +++ b/JerryScriptUpdate.rst @@ -26,13 +26,13 @@ The snapshot compiler can be rebuilt manually as follows: 2. run ``make`` from the ``emscripten-snapshot-compiler`` directory. -The following three files are generated in ``emscripten-snapshot-compiler/build/bin``: +The following three files are generated in ``emscripten-snapshot-compiler/build/bin/{PROFILE}``: - jsc.js - jsc.wasm - jsc.wasm.map -These should be deployed in the applications as demonstrated in the ``Advanced_Jsvm`` sample. +Copy these to the ``jsc`` sub-directory for application use as demonstrated in the ``Advanced_Jsvm`` sample. Dockerfile @@ -46,7 +46,7 @@ It can be built and run with the following commands:: Inside the container a new jerryscript snapshot compiler can be built by calling:: - node /jerryscript/build/bin/jsc.js -o /tmp/test.js.snap /tmp/test.js + node /jerryscript/build/bin/minimal/jsc.js -o /tmp/test.js.snap /tmp/test.js Where ``test.js.snap`` is the output file and ``/tmp/test.js`` is an existing JavaScript file. @@ -56,9 +56,9 @@ To update the ``jsc.*`` files you run the following from the application directo And run the following commands inside the container:: - cp -r /jerryscript/build/bin/jsc.* /web + cp -r /jerryscript/build/bin/minimal/jsc.* /web The build system handles compilation of the ``main.js`` file, but if you prefer to use pre-compiled snaps this can also be done inside the container:: - node /jerryscript/build/bin/jsc.js -o /web/main.js.snap /web/main.js + node /jerryscript/build/bin/minimal/jsc.js -o /web/main.js.snap /web/main.js diff --git a/component.mk b/component.mk index dced335..4695993 100644 --- a/component.mk +++ b/component.mk @@ -18,11 +18,12 @@ COMPONENT_DOCFILES := jerryscript/docs/img/engines_high_level_design.png COMPONENT_VARS := JERRY_GLOBAL_HEAP_SIZE JERRY_GLOBAL_HEAP_SIZE ?= 1 -# Compact compilation profile makes the JerryScript library smaller -COMPONENT_VARS += JERRY_COMPACT_PROFILE +# Compact (minimal profile) compilation profile makes the JerryScript library smaller +COMPONENT_VARS += JERRY_COMPACT_PROFILE JERRY_COMPACT_PROFILE ?= 1 ifeq ($(JERRY_COMPACT_PROFILE),1) +JERRY_PROFILE := minimal # Apply these flags to library and tool(s) JERRY_COMPILER_FLAGS := \ JERRY_BUILTINS=0 \ @@ -31,8 +32,12 @@ JERRY_COMPILER_FLAGS := \ # Just for library COMPONENT_CFLAGS += \ -DJERRY_NUMBER_TYPE_FLOAT64=0 +else +JERRY_PROFILE := es.next endif +JERRY_WEB_COMPILER := $(COMPONENT_PATH)/jsc/$(JERRY_PROFILE) + COMPONENT_CFLAGS += \ -DJERRY_GLOBAL_HEAP_SIZE=$(JERRY_GLOBAL_HEAP_SIZE) \ -DJERRY_LCACHE=0 \ diff --git a/emscripten-snapshot-compiler/CMakeLists.txt b/emscripten-snapshot-compiler/CMakeLists.txt index 7e103bd..01891d4 100644 --- a/emscripten-snapshot-compiler/CMakeLists.txt +++ b/emscripten-snapshot-compiler/CMakeLists.txt @@ -18,7 +18,7 @@ cmake_minimum_required (VERSION 2.8.12) # jsc stands for Jerryscript Snapshot Compiler set(EMSCRIPTEN_SNAPSHOT_COMPILER jsc) set(CMAKE_TOOLCHAIN_FILE $ENV{EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/") +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/${JERRY_PROFILE}") project (${EMSCRIPTEN_SNAPSHOT_COMPILER} C) file(GLOB PRE_JS pre.js) diff --git a/emscripten-snapshot-compiler/Makefile b/emscripten-snapshot-compiler/Makefile index 884b01b..c64b1f4 100644 --- a/emscripten-snapshot-compiler/Makefile +++ b/emscripten-snapshot-compiler/Makefile @@ -13,7 +13,7 @@ export EMSCRIPTEN ?= $(EMSDK)/upstream/emscripten endif ifndef EMSCRIPTEN - $(error 'EMSCRIPTEN' undefined - please configure emsdk) +$(error 'EMSCRIPTEN' undefined - please configure emsdk) endif EMSCRIPTEN_TOOLCHAIN := $(EMSCRIPTEN)/cmake/Modules/Platform/Emscripten.cmake @@ -22,7 +22,13 @@ EMSCRIPTEN_TOOLCHAIN := $(EMSCRIPTEN)/cmake/Modules/Platform/Emscripten.cmake JERRY_PROFILE ?= minimal # Build targets -all: build +.PHONY: all +all: build-default + +.PHONY: build-default +build-default: + $(MAKE) build JERRY_PROFILE=minimal + $(MAKE) build JERRY_PROFILE=es.next # Build compiler .PHONY: build @@ -36,7 +42,7 @@ build: --profile $(JERRY_PROFILE) \ --builddir $(BUILD_DIR)/jerryscript mkdir -p $(BUILD_DIR) - cmake --verbose -DCMAKE_BUILD_TYPE=MinSizeRel -S . -B $(BUILD_DIR) + cmake --verbose -DCMAKE_BUILD_TYPE=MinSizeRel -DJERRY_PROFILE=$(JERRY_PROFILE) -S . -B $(BUILD_DIR) $(MAKE) -C $(BUILD_DIR) # Clean build directory diff --git a/jsc/es.next/jsc.js b/jsc/es.next/jsc.js new file mode 100644 index 0000000..12b94ae --- /dev/null +++ b/jsc/es.next/jsc.js @@ -0,0 +1,4318 @@ +var Module = typeof Module !== "undefined" ? Module : {}; + +var JSC = { + isArrayOrNodeBuffer: function(b) { + if (typeof b !== "object") { + return false; + } + if (b instanceof Array) { + return true; + } + if (typeof Buffer !== "function") { + return false; + } + return b instanceof Buffer; + }, + writeToFile: function(outputPath, outputArray) { + if (!outputPath) { + return; + } + if (!ENVIRONMENT_IS_NODE) { + throw new Error("Writing to file is only available when running with Node.js"); + } + var fs = require("fs"); + fs.writeFileSync(outputPath, outputArray); + }, + compileBuffer: function(inBuffer, inBufferSize, isForGlobal, isStrict, outputPath) { + isForGlobal = isForGlobal === undefined ? true : Boolean(isForGlobal); + isStrict = Boolean(isStrict); + var snapshotOutputBufferSize = 512 * 1024; + var snapshotOutputBuffer = Module._malloc(snapshotOutputBufferSize); + var inBufferType; + if (typeof inBuffer === "number") { + inBufferType = "number"; + } else if (this.isArrayOrNodeBuffer(inBuffer)) { + inBufferType = "array"; + } else { + throw new Error("Unexpected inBuffer type: " + inBuffer); + } + var emscripten_snapshot_compiler_compile = Module.cwrap("emscripten_snapshot_compiler_compile", "number", [ inBufferType, "number", "number", "number", "number", "number" ]); + var bytesWritten = emscripten_snapshot_compiler_compile(inBuffer, inBufferSize, isForGlobal, isStrict, snapshotOutputBuffer, snapshotOutputBufferSize); + if (0 === bytesWritten) { + throw new Error("No snapshot bytes written"); + } + var rv = Module.HEAPU8.subarray(snapshotOutputBuffer, snapshotOutputBuffer + bytesWritten); + Module._free(snapshotOutputBuffer); + this.writeToFile(outputPath, rv); + return rv; + }, + compileString: function(sourceString, isForGlobal, isStrict, outputPath) { + var sourceBufferSize = lengthBytesUTF8(sourceString) + 1; + var sourceUTF8Buffer = Module._malloc(sourceBufferSize); + var writtenUTF8Size = stringToUTF8(sourceString, sourceUTF8Buffer, sourceBufferSize); + if (sourceBufferSize < writtenUTF8Size) { + throw new Error("Error decoding sourceString"); + } + var rv = this.compileBuffer(sourceUTF8Buffer, sourceBufferSize - 1, isForGlobal, isStrict, outputPath); + Module._free(sourceUTF8Buffer); + return rv; + }, + compileFile: function(inputPath, isForGlobal, isStrict, outputPath) { + if (!ENVIRONMENT_IS_NODE) { + throw new Error("compileFile() is only available when running with Node.js"); + } + var fs = require("fs"); + var sourceInputBuffer = fs.readFileSync(inputPath); + return this.compileBuffer(sourceInputBuffer, sourceInputBuffer.length, isForGlobal, isStrict, outputPath); + } +}; + +var moduleOverrides = {}; + +var key; + +for (key in Module) { + if (Module.hasOwnProperty(key)) { + moduleOverrides[key] = Module[key]; + } +} + +var arguments_ = []; + +var thisProgram = "./this.program"; + +var quit_ = function(status, toThrow) { + throw toThrow; +}; + +var ENVIRONMENT_IS_WEB = typeof window === "object"; + +var ENVIRONMENT_IS_WORKER = typeof importScripts === "function"; + +var ENVIRONMENT_IS_NODE = typeof process === "object" && typeof process.versions === "object" && typeof process.versions.node === "string"; + +var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; + +var scriptDirectory = ""; + +function locateFile(path) { + if (Module["locateFile"]) { + return Module["locateFile"](path, scriptDirectory); + } + return scriptDirectory + path; +} + +var read_, readAsync, readBinary, setWindowTitle; + +function logExceptionOnExit(e) { + if (e instanceof ExitStatus) return; + var toLog = e; + err("exiting due to exception: " + toLog); +} + +var nodeFS; + +var nodePath; + +if (ENVIRONMENT_IS_NODE) { + if (ENVIRONMENT_IS_WORKER) { + scriptDirectory = require("path").dirname(scriptDirectory) + "/"; + } else { + scriptDirectory = __dirname + "/"; + } + read_ = function shell_read(filename, binary) { + if (!nodeFS) nodeFS = require("fs"); + if (!nodePath) nodePath = require("path"); + filename = nodePath["normalize"](filename); + return nodeFS["readFileSync"](filename, binary ? null : "utf8"); + }; + readBinary = function readBinary(filename) { + var ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; + readAsync = function readAsync(filename, onload, onerror) { + if (!nodeFS) nodeFS = require("fs"); + if (!nodePath) nodePath = require("path"); + filename = nodePath["normalize"](filename); + nodeFS["readFile"](filename, function(err, data) { + if (err) onerror(err); else onload(data.buffer); + }); + }; + if (process["argv"].length > 1) { + thisProgram = process["argv"][1].replace(/\\/g, "/"); + } + arguments_ = process["argv"].slice(2); + if (typeof module !== "undefined") { + module["exports"] = Module; + } + process["on"]("uncaughtException", function(ex) { + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + process["on"]("unhandledRejection", function(reason) { + throw reason; + }); + quit_ = function(status, toThrow) { + if (keepRuntimeAlive()) { + process["exitCode"] = status; + throw toThrow; + } + logExceptionOnExit(toThrow); + process["exit"](status); + }; + Module["inspect"] = function() { + return "[Emscripten Module object]"; + }; +} else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { + scriptDirectory = self.location.href; + } else if (typeof document !== "undefined" && document.currentScript) { + scriptDirectory = document.currentScript.src; + } + if (scriptDirectory.indexOf("blob:") !== 0) { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf("/") + 1); + } else { + scriptDirectory = ""; + } + { + read_ = function(url) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + xhr.send(null); + return xhr.responseText; + }; + if (ENVIRONMENT_IS_WORKER) { + readBinary = function(url) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + xhr.responseType = "arraybuffer"; + xhr.send(null); + return new Uint8Array(xhr.response); + }; + } + readAsync = function(url, onload, onerror) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, true); + xhr.responseType = "arraybuffer"; + xhr.onload = function() { + if (xhr.status == 200 || xhr.status == 0 && xhr.response) { + onload(xhr.response); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + } + setWindowTitle = function(title) { + document.title = title; + }; +} else {} + +var out = Module["print"] || console.log.bind(console); + +var err = Module["printErr"] || console.warn.bind(console); + +for (key in moduleOverrides) { + if (moduleOverrides.hasOwnProperty(key)) { + Module[key] = moduleOverrides[key]; + } +} + +moduleOverrides = null; + +if (Module["arguments"]) arguments_ = Module["arguments"]; + +if (Module["thisProgram"]) thisProgram = Module["thisProgram"]; + +if (Module["quit"]) quit_ = Module["quit"]; + +var STACK_ALIGN = 16; + +var POINTER_SIZE = 4; + +function getNativeTypeSize(type) { + switch (type) { + case "i1": + case "i8": + return 1; + + case "i16": + return 2; + + case "i32": + return 4; + + case "i64": + return 8; + + case "float": + return 4; + + case "double": + return 8; + + default: + { + if (type[type.length - 1] === "*") { + return POINTER_SIZE; + } else if (type[0] === "i") { + var bits = Number(type.substr(1)); + assert(bits % 8 === 0, "getNativeTypeSize invalid bits " + bits + ", type " + type); + return bits / 8; + } else { + return 0; + } + } + } +} + +function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + err(text); + } +} + +function convertJsFunctionToWasm(func, sig) { + if (typeof WebAssembly.Function === "function") { + var typeNames = { + "i": "i32", + "j": "i64", + "f": "f32", + "d": "f64" + }; + var type = { + parameters: [], + results: sig[0] == "v" ? [] : [ typeNames[sig[0]] ] + }; + for (var i = 1; i < sig.length; ++i) { + type.parameters.push(typeNames[sig[i]]); + } + return new WebAssembly.Function(type, func); + } + var typeSection = [ 1, 0, 1, 96 ]; + var sigRet = sig.slice(0, 1); + var sigParam = sig.slice(1); + var typeCodes = { + "i": 127, + "j": 126, + "f": 125, + "d": 124 + }; + typeSection.push(sigParam.length); + for (var i = 0; i < sigParam.length; ++i) { + typeSection.push(typeCodes[sigParam[i]]); + } + if (sigRet == "v") { + typeSection.push(0); + } else { + typeSection = typeSection.concat([ 1, typeCodes[sigRet] ]); + } + typeSection[1] = typeSection.length - 2; + var bytes = new Uint8Array([ 0, 97, 115, 109, 1, 0, 0, 0 ].concat(typeSection, [ 2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0 ])); + var module = new WebAssembly.Module(bytes); + var instance = new WebAssembly.Instance(module, { + "e": { + "f": func + } + }); + var wrappedFunc = instance.exports["f"]; + return wrappedFunc; +} + +var freeTableIndexes = []; + +var functionsInTableMap; + +function getEmptyTableSlot() { + if (freeTableIndexes.length) { + return freeTableIndexes.pop(); + } + try { + wasmTable.grow(1); + } catch (err) { + if (!(err instanceof RangeError)) { + throw err; + } + throw "Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."; + } + return wasmTable.length - 1; +} + +function updateTableMap(offset, count) { + for (var i = offset; i < offset + count; i++) { + var item = getWasmTableEntry(i); + if (item) { + functionsInTableMap.set(item, i); + } + } +} + +function addFunction(func, sig) { + if (!functionsInTableMap) { + functionsInTableMap = new WeakMap(); + updateTableMap(0, wasmTable.length); + } + if (functionsInTableMap.has(func)) { + return functionsInTableMap.get(func); + } + var ret = getEmptyTableSlot(); + try { + setWasmTableEntry(ret, func); + } catch (err) { + if (!(err instanceof TypeError)) { + throw err; + } + var wrapped = convertJsFunctionToWasm(func, sig); + setWasmTableEntry(ret, wrapped); + } + functionsInTableMap.set(func, ret); + return ret; +} + +function removeFunction(index) { + functionsInTableMap.delete(getWasmTableEntry(index)); + freeTableIndexes.push(index); +} + +var tempRet0 = 0; + +var setTempRet0 = function(value) { + tempRet0 = value; +}; + +var getTempRet0 = function() { + return tempRet0; +}; + +var wasmBinary; + +if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; + +var noExitRuntime = Module["noExitRuntime"] || true; + +if (typeof WebAssembly !== "object") { + abort("no native wasm support detected"); +} + +function setValue(ptr, value, type, noSafe) { + type = type || "i8"; + if (type.charAt(type.length - 1) === "*") type = "i32"; + if (noSafe) { + switch (type) { + case "i1": + HEAP8[ptr >> 0] = value; + break; + + case "i8": + HEAP8[ptr >> 0] = value; + break; + + case "i16": + HEAP16[ptr >> 1] = value; + break; + + case "i32": + HEAP32[ptr >> 2] = value; + break; + + case "i64": + tempI64 = [ value >>> 0, (tempDouble = value, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ], + HEAP32[ptr >> 2] = tempI64[0], HEAP32[ptr + 4 >> 2] = tempI64[1]; + break; + + case "float": + HEAPF32[ptr >> 2] = value; + break; + + case "double": + HEAPF64[ptr >> 3] = value; + break; + + default: + abort("invalid type for setValue: " + type); + } + } else { + switch (type) { + case "i1": + SAFE_HEAP_STORE(ptr | 0, value | 0, 1); + break; + + case "i8": + SAFE_HEAP_STORE(ptr | 0, value | 0, 1); + break; + + case "i16": + SAFE_HEAP_STORE(ptr | 0, value | 0, 2); + break; + + case "i32": + SAFE_HEAP_STORE(ptr | 0, value | 0, 4); + break; + + case "i64": + tempI64 = [ value >>> 0, (tempDouble = value, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ], + SAFE_HEAP_STORE(ptr | 0, tempI64[0] | 0, 4), SAFE_HEAP_STORE(ptr + 4 | 0, tempI64[1] | 0, 4); + break; + + case "float": + SAFE_HEAP_STORE_D(ptr | 0, Math.fround(value), 4); + break; + + case "double": + SAFE_HEAP_STORE_D(ptr | 0, +value, 8); + break; + + default: + abort("invalid type for setValue: " + type); + } + } +} + +function getValue(ptr, type, noSafe) { + type = type || "i8"; + if (type.charAt(type.length - 1) === "*") type = "i32"; + if (noSafe) { + switch (type) { + case "i1": + return HEAP8[ptr >> 0]; + + case "i8": + return HEAP8[ptr >> 0]; + + case "i16": + return HEAP16[ptr >> 1]; + + case "i32": + return HEAP32[ptr >> 2]; + + case "i64": + return HEAP32[ptr >> 2]; + + case "float": + return HEAPF32[ptr >> 2]; + + case "double": + return Number(HEAPF64[ptr >> 3]); + + default: + abort("invalid type for getValue: " + type); + } + } else { + switch (type) { + case "i1": + return SAFE_HEAP_LOAD(ptr | 0, 1, 0) | 0; + + case "i8": + return SAFE_HEAP_LOAD(ptr | 0, 1, 0) | 0; + + case "i16": + return SAFE_HEAP_LOAD(ptr | 0, 2, 0) | 0; + + case "i32": + return SAFE_HEAP_LOAD(ptr | 0, 4, 0) | 0; + + case "i64": + return SAFE_HEAP_LOAD(ptr | 0, 8, 0) | 0; + + case "float": + return Math.fround(SAFE_HEAP_LOAD_D(ptr | 0, 4, 0)); + + case "double": + return +SAFE_HEAP_LOAD_D(ptr | 0, 8, 0); + + default: + abort("invalid type for getValue: " + type); + } + } + return null; +} + +function getSafeHeapType(bytes, isFloat) { + switch (bytes) { + case 1: + return "i8"; + + case 2: + return "i16"; + + case 4: + return isFloat ? "float" : "i32"; + + case 8: + return isFloat ? "double" : "i64"; + + default: + assert(0); + } +} + +function SAFE_HEAP_STORE(dest, value, bytes, isFloat) { + if (dest <= 0) abort("segmentation fault storing " + bytes + " bytes to address " + dest); + if (dest % bytes !== 0) abort("alignment error storing to address " + dest + ", which was expected to be aligned to a multiple of " + bytes); + if (runtimeInitialized) { + var brk = _sbrk() >>> 0; + if (dest + bytes > brk) abort("segmentation fault, exceeded the top of the available dynamic heap when storing " + bytes + " bytes to address " + dest + ". DYNAMICTOP=" + brk); + assert(brk >= _emscripten_stack_get_base()); + assert(brk <= HEAP8.length); + } + setValue(dest, value, getSafeHeapType(bytes, isFloat), 1); + return value; +} + +function SAFE_HEAP_STORE_D(dest, value, bytes) { + return SAFE_HEAP_STORE(dest, value, bytes, true); +} + +function SAFE_HEAP_LOAD(dest, bytes, unsigned, isFloat) { + if (dest <= 0) abort("segmentation fault loading " + bytes + " bytes from address " + dest); + if (dest % bytes !== 0) abort("alignment error loading from address " + dest + ", which was expected to be aligned to a multiple of " + bytes); + if (runtimeInitialized) { + var brk = _sbrk() >>> 0; + if (dest + bytes > brk) abort("segmentation fault, exceeded the top of the available dynamic heap when loading " + bytes + " bytes from address " + dest + ". DYNAMICTOP=" + brk); + assert(brk >= _emscripten_stack_get_base()); + assert(brk <= HEAP8.length); + } + var type = getSafeHeapType(bytes, isFloat); + var ret = getValue(dest, type, 1); + if (unsigned) ret = unSign(ret, parseInt(type.substr(1), 10)); + return ret; +} + +function SAFE_HEAP_LOAD_D(dest, bytes, unsigned) { + return SAFE_HEAP_LOAD(dest, bytes, unsigned, true); +} + +function SAFE_FT_MASK(value, mask) { + var ret = value & mask; + if (ret !== value) { + abort("Function table mask error: function pointer is " + value + " which is masked by " + mask + ", the likely cause of this is that the function pointer is being called by the wrong type."); + } + return ret; +} + +function segfault() { + abort("segmentation fault"); +} + +function alignfault() { + abort("alignment fault"); +} + +var wasmMemory; + +var ABORT = false; + +var EXITSTATUS; + +function assert(condition, text) { + if (!condition) { + abort("Assertion failed: " + text); + } +} + +function getCFunc(ident) { + var func = Module["_" + ident]; + assert(func, "Cannot call unknown function " + ident + ", make sure it is exported"); + return func; +} + +function ccall(ident, returnType, argTypes, args, opts) { + var toC = { + "string": function(str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { + var len = (str.length << 2) + 1; + ret = stackAlloc(len); + stringToUTF8(str, ret, len); + } + return ret; + }, + "array": function(arr) { + var ret = stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + } + }; + function convertReturnValue(ret) { + if (returnType === "string") return UTF8ToString(ret); + if (returnType === "boolean") return Boolean(ret); + return ret; + } + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(null, cArgs); + function onDone(ret) { + if (stack !== 0) stackRestore(stack); + return convertReturnValue(ret); + } + ret = onDone(ret); + return ret; +} + +function cwrap(ident, returnType, argTypes, opts) { + argTypes = argTypes || []; + var numericArgs = argTypes.every(function(type) { + return type === "number"; + }); + var numericRet = returnType !== "string"; + if (numericRet && numericArgs && !opts) { + return getCFunc(ident); + } + return function() { + return ccall(ident, returnType, argTypes, arguments, opts); + }; +} + +var ALLOC_NORMAL = 0; + +var ALLOC_STACK = 1; + +function allocate(slab, allocator) { + var ret; + if (allocator == ALLOC_STACK) { + ret = stackAlloc(slab.length); + } else { + ret = _malloc(slab.length); + } + if (slab.subarray || slab.slice) { + HEAPU8.set(slab, ret); + } else { + HEAPU8.set(new Uint8Array(slab), ret); + } + return ret; +} + +var UTF8Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf8") : undefined; + +function UTF8ArrayToString(heap, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + var endPtr = idx; + while (heap[endPtr] && !(endPtr >= endIdx)) ++endPtr; + if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) { + return UTF8Decoder.decode(heap.subarray(idx, endPtr)); + } else { + var str = ""; + while (idx < endPtr) { + var u0 = heap[idx++]; + if (!(u0 & 128)) { + str += String.fromCharCode(u0); + continue; + } + var u1 = heap[idx++] & 63; + if ((u0 & 224) == 192) { + str += String.fromCharCode((u0 & 31) << 6 | u1); + continue; + } + var u2 = heap[idx++] & 63; + if ((u0 & 240) == 224) { + u0 = (u0 & 15) << 12 | u1 << 6 | u2; + } else { + u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heap[idx++] & 63; + } + if (u0 < 65536) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 65536; + str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); + } + } + } + return str; +} + +function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ""; +} + +function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) return 0; + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; + for (var i = 0; i < str.length; ++i) { + var u = str.charCodeAt(i); + if (u >= 55296 && u <= 57343) { + var u1 = str.charCodeAt(++i); + u = 65536 + ((u & 1023) << 10) | u1 & 1023; + } + if (u <= 127) { + if (outIdx >= endIdx) break; + heap[outIdx++] = u; + } else if (u <= 2047) { + if (outIdx + 1 >= endIdx) break; + heap[outIdx++] = 192 | u >> 6; + heap[outIdx++] = 128 | u & 63; + } else if (u <= 65535) { + if (outIdx + 2 >= endIdx) break; + heap[outIdx++] = 224 | u >> 12; + heap[outIdx++] = 128 | u >> 6 & 63; + heap[outIdx++] = 128 | u & 63; + } else { + if (outIdx + 3 >= endIdx) break; + heap[outIdx++] = 240 | u >> 18; + heap[outIdx++] = 128 | u >> 12 & 63; + heap[outIdx++] = 128 | u >> 6 & 63; + heap[outIdx++] = 128 | u & 63; + } + } + heap[outIdx] = 0; + return outIdx - startIdx; +} + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite); +} + +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + var u = str.charCodeAt(i); + if (u >= 55296 && u <= 57343) u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023; + if (u <= 127) ++len; else if (u <= 2047) len += 2; else if (u <= 65535) len += 3; else len += 4; + } + return len; +} + +function AsciiToString(ptr) { + var str = ""; + while (1) { + var ch = SAFE_HEAP_LOAD(ptr++ | 0, 1, 1) >>> 0; + if (!ch) return str; + str += String.fromCharCode(ch); + } +} + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} + +var UTF16Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-16le") : undefined; + +function UTF16ToString(ptr, maxBytesToRead) { + var endPtr = ptr; + var idx = endPtr >> 1; + var maxIdx = idx + maxBytesToRead / 2; + while (!(idx >= maxIdx) && SAFE_HEAP_LOAD(idx * 2, 2, 1)) ++idx; + endPtr = idx << 1; + if (endPtr - ptr > 32 && UTF16Decoder) { + return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); + } else { + var str = ""; + for (var i = 0; !(i >= maxBytesToRead / 2); ++i) { + var codeUnit = SAFE_HEAP_LOAD(ptr + i * 2 | 0, 2, 0) | 0; + if (codeUnit == 0) break; + str += String.fromCharCode(codeUnit); + } + return str; + } +} + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 2147483647; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; + var startPtr = outPtr; + var numCharsToWrite = maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { + var codeUnit = str.charCodeAt(i); + SAFE_HEAP_STORE(outPtr | 0, codeUnit | 0, 2); + outPtr += 2; + } + SAFE_HEAP_STORE(outPtr | 0, 0 | 0, 2); + return outPtr - startPtr; +} + +function lengthBytesUTF16(str) { + return str.length * 2; +} + +function UTF32ToString(ptr, maxBytesToRead) { + var i = 0; + var str = ""; + while (!(i >= maxBytesToRead / 4)) { + var utf32 = SAFE_HEAP_LOAD(ptr + i * 4 | 0, 4, 0) | 0; + if (utf32 == 0) break; + ++i; + if (utf32 >= 65536) { + var ch = utf32 - 65536; + str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); + } else { + str += String.fromCharCode(utf32); + } + } + return str; +} + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 2147483647; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 55296 && codeUnit <= 57343) { + var trailSurrogate = str.charCodeAt(++i); + codeUnit = 65536 + ((codeUnit & 1023) << 10) | trailSurrogate & 1023; + } + SAFE_HEAP_STORE(outPtr | 0, codeUnit | 0, 4); + outPtr += 4; + if (outPtr + 4 > endPtr) break; + } + SAFE_HEAP_STORE(outPtr | 0, 0 | 0, 4); + return outPtr - startPtr; +} + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 55296 && codeUnit <= 57343) ++i; + len += 4; + } + return len; +} + +function allocateUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +function allocateUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +function writeStringToMemory(string, buffer, dontAddNull) { + warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!"); + var lastChar, end; + if (dontAddNull) { + end = buffer + lengthBytesUTF8(string); + lastChar = SAFE_HEAP_LOAD(end, 1, 0); + } + stringToUTF8(string, buffer, Infinity); + if (dontAddNull) SAFE_HEAP_STORE(end, lastChar, 1); +} + +function writeArrayToMemory(array, buffer) { + HEAP8.set(array, buffer); +} + +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; ++i) { + SAFE_HEAP_STORE(buffer++ | 0, str.charCodeAt(i) | 0, 1); + } + if (!dontAddNull) SAFE_HEAP_STORE(buffer | 0, 0 | 0, 1); +} + +function alignUp(x, multiple) { + if (x % multiple > 0) { + x += multiple - x % multiple; + } + return x; +} + +var HEAP, buffer, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; + +function updateGlobalBufferAndViews(buf) { + buffer = buf; + Module["HEAP8"] = HEAP8 = new Int8Array(buf); + Module["HEAP16"] = HEAP16 = new Int16Array(buf); + Module["HEAP32"] = HEAP32 = new Int32Array(buf); + Module["HEAPU8"] = HEAPU8 = new Uint8Array(buf); + Module["HEAPU16"] = HEAPU16 = new Uint16Array(buf); + Module["HEAPU32"] = HEAPU32 = new Uint32Array(buf); + Module["HEAPF32"] = HEAPF32 = new Float32Array(buf); + Module["HEAPF64"] = HEAPF64 = new Float64Array(buf); +} + +var TOTAL_STACK = 5242880; + +var INITIAL_MEMORY = Module["INITIAL_MEMORY"] || 16777216; + +var wasmTable; + +var __ATPRERUN__ = []; + +var __ATINIT__ = []; + +var __ATMAIN__ = []; + +var __ATEXIT__ = []; + +var __ATPOSTRUN__ = []; + +var runtimeInitialized = false; + +var runtimeExited = false; + +var runtimeKeepaliveCounter = 0; + +function keepRuntimeAlive() { + return noExitRuntime || runtimeKeepaliveCounter > 0; +} + +function preRun() { + if (Module["preRun"]) { + if (typeof Module["preRun"] == "function") Module["preRun"] = [ Module["preRun"] ]; + while (Module["preRun"].length) { + addOnPreRun(Module["preRun"].shift()); + } + } + callRuntimeCallbacks(__ATPRERUN__); +} + +function initRuntime() { + runtimeInitialized = true; + if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); + FS.ignorePermissions = false; + TTY.init(); + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + callRuntimeCallbacks(__ATMAIN__); +} + +function exitRuntime() { + runtimeExited = true; +} + +function postRun() { + if (Module["postRun"]) { + if (typeof Module["postRun"] == "function") Module["postRun"] = [ Module["postRun"] ]; + while (Module["postRun"].length) { + addOnPostRun(Module["postRun"].shift()); + } + } + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) {} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +var runDependencies = 0; + +var runDependencyWatcher = null; + +var dependenciesFulfilled = null; + +function getUniqueRunDependency(id) { + return id; +} + +function addRunDependency(id) { + runDependencies++; + if (Module["monitorRunDependencies"]) { + Module["monitorRunDependencies"](runDependencies); + } +} + +function removeRunDependency(id) { + runDependencies--; + if (Module["monitorRunDependencies"]) { + Module["monitorRunDependencies"](runDependencies); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); + } + } +} + +Module["preloadedImages"] = {}; + +Module["preloadedAudios"] = {}; + +function abort(what) { + { + if (Module["onAbort"]) { + Module["onAbort"](what); + } + } + what = "Aborted(" + what + ")"; + err(what); + ABORT = true; + EXITSTATUS = 1; + what += ". Build with -s ASSERTIONS=1 for more info."; + var e = new WebAssembly.RuntimeError(what); + throw e; +} + +var dataURIPrefix = "data:application/octet-stream;base64,"; + +function isDataURI(filename) { + return filename.startsWith(dataURIPrefix); +} + +function isFileURI(filename) { + return filename.startsWith("file://"); +} + +var wasmBinaryFile; + +wasmBinaryFile = "jsc.wasm"; + +if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); +} + +function getBinary(file) { + try { + if (file == wasmBinaryFile && wasmBinary) { + return new Uint8Array(wasmBinary); + } + if (readBinary) { + return readBinary(file); + } else { + throw "both async and sync fetching of the wasm failed"; + } + } catch (err) { + abort(err); + } +} + +function getBinaryPromise() { + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { + if (typeof fetch === "function" && !isFileURI(wasmBinaryFile)) { + return fetch(wasmBinaryFile, { + credentials: "same-origin" + }).then(function(response) { + if (!response["ok"]) { + throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; + } + return response["arrayBuffer"](); + }).catch(function() { + return getBinary(wasmBinaryFile); + }); + } else { + if (readAsync) { + return new Promise(function(resolve, reject) { + readAsync(wasmBinaryFile, function(response) { + resolve(new Uint8Array(response)); + }, reject); + }); + } + } + } + return Promise.resolve().then(function() { + return getBinary(wasmBinaryFile); + }); +} + +function createWasm() { + var info = { + "env": asmLibraryArg, + "wasi_snapshot_preview1": asmLibraryArg + }; + function receiveInstance(instance, module) { + var exports = instance.exports; + Module["asm"] = exports; + wasmMemory = Module["asm"]["memory"]; + updateGlobalBufferAndViews(wasmMemory.buffer); + wasmTable = Module["asm"]["__indirect_function_table"]; + removeRunDependency("wasm-instantiate"); + } + addRunDependency("wasm-instantiate"); + function receiveInstantiationResult(result) { + receiveInstance(result["instance"]); + } + function instantiateArrayBuffer(receiver) { + return getBinaryPromise().then(function(binary) { + return WebAssembly.instantiate(binary, info); + }).then(function(instance) { + return instance; + }).then(receiver, function(reason) { + err("failed to asynchronously prepare wasm: " + reason); + abort(reason); + }); + } + function instantiateAsync() { + if (!wasmBinary && typeof WebAssembly.instantiateStreaming === "function" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && typeof fetch === "function") { + return fetch(wasmBinaryFile, { + credentials: "same-origin" + }).then(function(response) { + var result = WebAssembly.instantiateStreaming(response, info); + return result.then(receiveInstantiationResult, function(reason) { + err("wasm streaming compile failed: " + reason); + err("falling back to ArrayBuffer instantiation"); + return instantiateArrayBuffer(receiveInstantiationResult); + }); + }); + } else { + return instantiateArrayBuffer(receiveInstantiationResult); + } + } + if (Module["instantiateWasm"]) { + try { + var exports = Module["instantiateWasm"](info, receiveInstance); + return exports; + } catch (e) { + err("Module.instantiateWasm callback failed with error: " + e); + return false; + } + } + instantiateAsync(); + return {}; +} + +var tempDouble; + +var tempI64; + +var ASM_CONSTS = { + 54360: function() { + throw new Error("Input must be valid UTF-8"); + }, + 54411: function($0) { + throw new Error(UTF8ToString($0)); + } +}; + +function callRuntimeCallbacks(callbacks) { + while (callbacks.length > 0) { + var callback = callbacks.shift(); + if (typeof callback == "function") { + callback(Module); + continue; + } + var func = callback.func; + if (typeof func === "number") { + if (callback.arg === undefined) { + getWasmTableEntry(func)(); + } else { + getWasmTableEntry(func)(callback.arg); + } + } else { + func(callback.arg === undefined ? null : callback.arg); + } + } +} + +function withStackSave(f) { + var stack = stackSave(); + var ret = f(); + stackRestore(stack); + return ret; +} + +function demangle(func) { + return func; +} + +function demangleAll(text) { + var regex = /\b_Z[\w\d_]+/g; + return text.replace(regex, function(x) { + var y = demangle(x); + return x === y ? x : y + " [" + x + "]"; + }); +} + +function getWasmTableEntry(funcPtr) { + return wasmTable.get(funcPtr); +} + +function handleException(e) { + if (e instanceof ExitStatus || e == "unwind") { + return EXITSTATUS; + } + quit_(1, e); +} + +function jsStackTrace() { + var error = new Error(); + if (!error.stack) { + try { + throw new Error(); + } catch (e) { + error = e; + } + if (!error.stack) { + return "(no stack trace available)"; + } + } + return error.stack.toString(); +} + +function setWasmTableEntry(idx, func) { + wasmTable.set(idx, func); +} + +function stackTrace() { + var js = jsStackTrace(); + if (Module["extraStackTrace"]) js += "\n" + Module["extraStackTrace"](); + return demangleAll(js); +} + +function unSign(value, bits) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2 * Math.abs(1 << bits - 1) + value : Math.pow(2, bits) + value; +} + +var PATH = { + splitPath: function(filename) { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + }, + normalizeArray: function(parts, allowAboveRoot) { + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === ".") { + parts.splice(i, 1); + } else if (last === "..") { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + if (allowAboveRoot) { + for (;up; up--) { + parts.unshift(".."); + } + } + return parts; + }, + normalize: function(path) { + var isAbsolute = path.charAt(0) === "/", trailingSlash = path.substr(-1) === "/"; + path = PATH.normalizeArray(path.split("/").filter(function(p) { + return !!p; + }), !isAbsolute).join("/"); + if (!path && !isAbsolute) { + path = "."; + } + if (path && trailingSlash) { + path += "/"; + } + return (isAbsolute ? "/" : "") + path; + }, + dirname: function(path) { + var result = PATH.splitPath(path), root = result[0], dir = result[1]; + if (!root && !dir) { + return "."; + } + if (dir) { + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + }, + basename: function(path) { + if (path === "/") return "/"; + path = PATH.normalize(path); + path = path.replace(/\/$/, ""); + var lastSlash = path.lastIndexOf("/"); + if (lastSlash === -1) return path; + return path.substr(lastSlash + 1); + }, + extname: function(path) { + return PATH.splitPath(path)[3]; + }, + join: function() { + var paths = Array.prototype.slice.call(arguments, 0); + return PATH.normalize(paths.join("/")); + }, + join2: function(l, r) { + return PATH.normalize(l + "/" + r); + } +}; + +function getRandomDevice() { + if (typeof crypto === "object" && typeof crypto["getRandomValues"] === "function") { + var randomBuffer = new Uint8Array(1); + return function() { + crypto.getRandomValues(randomBuffer); + return randomBuffer[0]; + }; + } else if (ENVIRONMENT_IS_NODE) { + try { + var crypto_module = require("crypto"); + return function() { + return crypto_module["randomBytes"](1)[0]; + }; + } catch (e) {} + } + return function() { + abort("randomDevice"); + }; +} + +var PATH_FS = { + resolve: function() { + var resolvedPath = "", resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = i >= 0 ? arguments[i] : FS.cwd(); + if (typeof path !== "string") { + throw new TypeError("Arguments to path.resolve must be strings"); + } else if (!path) { + return ""; + } + resolvedPath = path + "/" + resolvedPath; + resolvedAbsolute = path.charAt(0) === "/"; + } + resolvedPath = PATH.normalizeArray(resolvedPath.split("/").filter(function(p) { + return !!p; + }), !resolvedAbsolute).join("/"); + return (resolvedAbsolute ? "/" : "") + resolvedPath || "."; + }, + relative: function(from, to) { + from = PATH_FS.resolve(from).substr(1); + to = PATH_FS.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (;start < arr.length; start++) { + if (arr[start] !== "") break; + } + var end = arr.length - 1; + for (;end >= 0; end--) { + if (arr[end] !== "") break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + var fromParts = trim(from.split("/")); + var toParts = trim(to.split("/")); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push(".."); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join("/"); + } +}; + +var TTY = { + ttys: [], + init: function() {}, + shutdown: function() {}, + register: function(dev, ops) { + TTY.ttys[dev] = { + input: [], + output: [], + ops: ops + }; + FS.registerDevice(dev, TTY.stream_ops); + }, + stream_ops: { + open: function(stream) { + var tty = TTY.ttys[stream.node.rdev]; + if (!tty) { + throw new FS.ErrnoError(43); + } + stream.tty = tty; + stream.seekable = false; + }, + close: function(stream) { + stream.tty.ops.flush(stream.tty); + }, + flush: function(stream) { + stream.tty.ops.flush(stream.tty); + }, + read: function(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.get_char) { + throw new FS.ErrnoError(60); + } + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = stream.tty.ops.get_char(stream.tty); + } catch (e) { + throw new FS.ErrnoError(29); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset + i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write: function(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.put_char) { + throw new FS.ErrnoError(60); + } + try { + for (var i = 0; i < length; i++) { + stream.tty.ops.put_char(stream.tty, buffer[offset + i]); + } + } catch (e) { + throw new FS.ErrnoError(29); + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + } + }, + default_tty_ops: { + get_char: function(tty) { + if (!tty.input.length) { + var result = null; + if (ENVIRONMENT_IS_NODE) { + var BUFSIZE = 256; + var buf = Buffer.alloc(BUFSIZE); + var bytesRead = 0; + try { + bytesRead = nodeFS.readSync(process.stdin.fd, buf, 0, BUFSIZE, null); + } catch (e) { + if (e.toString().includes("EOF")) bytesRead = 0; else throw e; + } + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString("utf-8"); + } else { + result = null; + } + } else if (typeof window != "undefined" && typeof window.prompt == "function") { + result = window.prompt("Input: "); + if (result !== null) { + result += "\n"; + } + } else if (typeof readline == "function") { + result = readline(); + if (result !== null) { + result += "\n"; + } + } + if (!result) { + return null; + } + tty.input = intArrayFromString(result, true); + } + return tty.input.shift(); + }, + put_char: function(tty, val) { + if (val === null || val === 10) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + }, + flush: function(tty) { + if (tty.output && tty.output.length > 0) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + } + }, + default_tty1_ops: { + put_char: function(tty, val) { + if (val === null || val === 10) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + }, + flush: function(tty) { + if (tty.output && tty.output.length > 0) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + } + } +}; + +function zeroMemory(address, size) { + HEAPU8.fill(0, address, address + size); +} + +function alignMemory(size, alignment) { + return Math.ceil(size / alignment) * alignment; +} + +function mmapAlloc(size) { + abort(); +} + +var MEMFS = { + ops_table: null, + mount: function(mount) { + return MEMFS.createNode(null, "/", 16384 | 511, 0); + }, + createNode: function(parent, name, mode, dev) { + if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { + throw new FS.ErrnoError(63); + } + if (!MEMFS.ops_table) { + MEMFS.ops_table = { + dir: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + lookup: MEMFS.node_ops.lookup, + mknod: MEMFS.node_ops.mknod, + rename: MEMFS.node_ops.rename, + unlink: MEMFS.node_ops.unlink, + rmdir: MEMFS.node_ops.rmdir, + readdir: MEMFS.node_ops.readdir, + symlink: MEMFS.node_ops.symlink + }, + stream: { + llseek: MEMFS.stream_ops.llseek + } + }, + file: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: { + llseek: MEMFS.stream_ops.llseek, + read: MEMFS.stream_ops.read, + write: MEMFS.stream_ops.write, + allocate: MEMFS.stream_ops.allocate, + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync + } + }, + link: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + readlink: MEMFS.node_ops.readlink + }, + stream: {} + }, + chrdev: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: FS.chrdev_stream_ops + } + }; + } + var node = FS.createNode(parent, name, mode, dev); + if (FS.isDir(node.mode)) { + node.node_ops = MEMFS.ops_table.dir.node; + node.stream_ops = MEMFS.ops_table.dir.stream; + node.contents = {}; + } else if (FS.isFile(node.mode)) { + node.node_ops = MEMFS.ops_table.file.node; + node.stream_ops = MEMFS.ops_table.file.stream; + node.usedBytes = 0; + node.contents = null; + } else if (FS.isLink(node.mode)) { + node.node_ops = MEMFS.ops_table.link.node; + node.stream_ops = MEMFS.ops_table.link.stream; + } else if (FS.isChrdev(node.mode)) { + node.node_ops = MEMFS.ops_table.chrdev.node; + node.stream_ops = MEMFS.ops_table.chrdev.stream; + } + node.timestamp = Date.now(); + if (parent) { + parent.contents[name] = node; + parent.timestamp = node.timestamp; + } + return node; + }, + getFileDataAsTypedArray: function(node) { + if (!node.contents) return new Uint8Array(0); + if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); + return new Uint8Array(node.contents); + }, + expandFileStorage: function(node, newCapacity) { + var prevCapacity = node.contents ? node.contents.length : 0; + if (prevCapacity >= newCapacity) return; + var CAPACITY_DOUBLING_MAX = 1024 * 1024; + newCapacity = Math.max(newCapacity, prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125) >>> 0); + if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); + var oldContents = node.contents; + node.contents = new Uint8Array(newCapacity); + if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); + }, + resizeFileStorage: function(node, newSize) { + if (node.usedBytes == newSize) return; + if (newSize == 0) { + node.contents = null; + node.usedBytes = 0; + } else { + var oldContents = node.contents; + node.contents = new Uint8Array(newSize); + if (oldContents) { + node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); + } + node.usedBytes = newSize; + } + }, + node_ops: { + getattr: function(node) { + var attr = {}; + attr.dev = FS.isChrdev(node.mode) ? node.id : 1; + attr.ino = node.id; + attr.mode = node.mode; + attr.nlink = 1; + attr.uid = 0; + attr.gid = 0; + attr.rdev = node.rdev; + if (FS.isDir(node.mode)) { + attr.size = 4096; + } else if (FS.isFile(node.mode)) { + attr.size = node.usedBytes; + } else if (FS.isLink(node.mode)) { + attr.size = node.link.length; + } else { + attr.size = 0; + } + attr.atime = new Date(node.timestamp); + attr.mtime = new Date(node.timestamp); + attr.ctime = new Date(node.timestamp); + attr.blksize = 4096; + attr.blocks = Math.ceil(attr.size / attr.blksize); + return attr; + }, + setattr: function(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + if (attr.size !== undefined) { + MEMFS.resizeFileStorage(node, attr.size); + } + }, + lookup: function(parent, name) { + throw FS.genericErrors[44]; + }, + mknod: function(parent, name, mode, dev) { + return MEMFS.createNode(parent, name, mode, dev); + }, + rename: function(old_node, new_dir, new_name) { + if (FS.isDir(old_node.mode)) { + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) {} + if (new_node) { + for (var i in new_node.contents) { + throw new FS.ErrnoError(55); + } + } + } + delete old_node.parent.contents[old_node.name]; + old_node.parent.timestamp = Date.now(); + old_node.name = new_name; + new_dir.contents[new_name] = old_node; + new_dir.timestamp = old_node.parent.timestamp; + old_node.parent = new_dir; + }, + unlink: function(parent, name) { + delete parent.contents[name]; + parent.timestamp = Date.now(); + }, + rmdir: function(parent, name) { + var node = FS.lookupNode(parent, name); + for (var i in node.contents) { + throw new FS.ErrnoError(55); + } + delete parent.contents[name]; + parent.timestamp = Date.now(); + }, + readdir: function(node) { + var entries = [ ".", ".." ]; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + }, + symlink: function(parent, newname, oldpath) { + var node = MEMFS.createNode(parent, newname, 511 | 40960, 0); + node.link = oldpath; + return node; + }, + readlink: function(node) { + if (!FS.isLink(node.mode)) { + throw new FS.ErrnoError(28); + } + return node.link; + } + }, + stream_ops: { + read: function(stream, buffer, offset, length, position) { + var contents = stream.node.contents; + if (position >= stream.node.usedBytes) return 0; + var size = Math.min(stream.node.usedBytes - position, length); + if (size > 8 && contents.subarray) { + buffer.set(contents.subarray(position, position + size), offset); + } else { + for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; + } + return size; + }, + write: function(stream, buffer, offset, length, position, canOwn) { + if (!length) return 0; + var node = stream.node; + node.timestamp = Date.now(); + if (buffer.subarray && (!node.contents || node.contents.subarray)) { + if (canOwn) { + node.contents = buffer.subarray(offset, offset + length); + node.usedBytes = length; + return length; + } else if (node.usedBytes === 0 && position === 0) { + node.contents = buffer.slice(offset, offset + length); + node.usedBytes = length; + return length; + } else if (position + length <= node.usedBytes) { + node.contents.set(buffer.subarray(offset, offset + length), position); + return length; + } + } + MEMFS.expandFileStorage(node, position + length); + if (node.contents.subarray && buffer.subarray) { + node.contents.set(buffer.subarray(offset, offset + length), position); + } else { + for (var i = 0; i < length; i++) { + node.contents[position + i] = buffer[offset + i]; + } + } + node.usedBytes = Math.max(node.usedBytes, position + length); + return length; + }, + llseek: function(stream, offset, whence) { + var position = offset; + if (whence === 1) { + position += stream.position; + } else if (whence === 2) { + if (FS.isFile(stream.node.mode)) { + position += stream.node.usedBytes; + } + } + if (position < 0) { + throw new FS.ErrnoError(28); + } + return position; + }, + allocate: function(stream, offset, length) { + MEMFS.expandFileStorage(stream.node, offset + length); + stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); + }, + mmap: function(stream, address, length, position, prot, flags) { + if (address !== 0) { + throw new FS.ErrnoError(28); + } + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + var ptr; + var allocated; + var contents = stream.node.contents; + if (!(flags & 2) && contents.buffer === buffer) { + allocated = false; + ptr = contents.byteOffset; + } else { + if (position > 0 || position + length < contents.length) { + if (contents.subarray) { + contents = contents.subarray(position, position + length); + } else { + contents = Array.prototype.slice.call(contents, position, position + length); + } + } + allocated = true; + ptr = mmapAlloc(length); + if (!ptr) { + throw new FS.ErrnoError(48); + } + HEAP8.set(contents, ptr); + } + return { + ptr: ptr, + allocated: allocated + }; + }, + msync: function(stream, buffer, offset, length, mmapFlags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + if (mmapFlags & 2) { + return 0; + } + var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + return 0; + } + } +}; + +function asyncLoad(url, onload, onerror, noRunDep) { + var dep = !noRunDep ? getUniqueRunDependency("al " + url) : ""; + readAsync(url, function(arrayBuffer) { + assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); + onload(new Uint8Array(arrayBuffer)); + if (dep) removeRunDependency(dep); + }, function(event) { + if (onerror) { + onerror(); + } else { + throw 'Loading data file "' + url + '" failed.'; + } + }); + if (dep) addRunDependency(dep); +} + +var FS = { + root: null, + mounts: [], + devices: {}, + streams: [], + nextInode: 1, + nameTable: null, + currentPath: "/", + initialized: false, + ignorePermissions: true, + ErrnoError: null, + genericErrors: {}, + filesystems: null, + syncFSRequests: 0, + lookupPath: function(path, opts) { + path = PATH_FS.resolve(FS.cwd(), path); + opts = opts || {}; + if (!path) return { + path: "", + node: null + }; + var defaults = { + follow_mount: true, + recurse_count: 0 + }; + for (var key in defaults) { + if (opts[key] === undefined) { + opts[key] = defaults[key]; + } + } + if (opts.recurse_count > 8) { + throw new FS.ErrnoError(32); + } + var parts = PATH.normalizeArray(path.split("/").filter(function(p) { + return !!p; + }), false); + var current = FS.root; + var current_path = "/"; + for (var i = 0; i < parts.length; i++) { + var islast = i === parts.length - 1; + if (islast && opts.parent) { + break; + } + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); + if (FS.isMountpoint(current)) { + if (!islast || islast && opts.follow_mount) { + current = current.mounted.root; + } + } + if (!islast || opts.follow) { + var count = 0; + while (FS.isLink(current.mode)) { + var link = FS.readlink(current_path); + current_path = PATH_FS.resolve(PATH.dirname(current_path), link); + var lookup = FS.lookupPath(current_path, { + recurse_count: opts.recurse_count + }); + current = lookup.node; + if (count++ > 40) { + throw new FS.ErrnoError(32); + } + } + } + } + return { + path: current_path, + node: current + }; + }, + getPath: function(node) { + var path; + while (true) { + if (FS.isRoot(node)) { + var mount = node.mount.mountpoint; + if (!path) return mount; + return mount[mount.length - 1] !== "/" ? mount + "/" + path : mount + path; + } + path = path ? node.name + "/" + path : node.name; + node = node.parent; + } + }, + hashName: function(parentid, name) { + var hash = 0; + for (var i = 0; i < name.length; i++) { + hash = (hash << 5) - hash + name.charCodeAt(i) | 0; + } + return (parentid + hash >>> 0) % FS.nameTable.length; + }, + hashAddNode: function(node) { + var hash = FS.hashName(node.parent.id, node.name); + node.name_next = FS.nameTable[hash]; + FS.nameTable[hash] = node; + }, + hashRemoveNode: function(node) { + var hash = FS.hashName(node.parent.id, node.name); + if (FS.nameTable[hash] === node) { + FS.nameTable[hash] = node.name_next; + } else { + var current = FS.nameTable[hash]; + while (current) { + if (current.name_next === node) { + current.name_next = node.name_next; + break; + } + current = current.name_next; + } + } + }, + lookupNode: function(parent, name) { + var errCode = FS.mayLookup(parent); + if (errCode) { + throw new FS.ErrnoError(errCode, parent); + } + var hash = FS.hashName(parent.id, name); + for (var node = FS.nameTable[hash]; node; node = node.name_next) { + var nodeName = node.name; + if (node.parent.id === parent.id && nodeName === name) { + return node; + } + } + return FS.lookup(parent, name); + }, + createNode: function(parent, name, mode, rdev) { + var node = new FS.FSNode(parent, name, mode, rdev); + FS.hashAddNode(node); + return node; + }, + destroyNode: function(node) { + FS.hashRemoveNode(node); + }, + isRoot: function(node) { + return node === node.parent; + }, + isMountpoint: function(node) { + return !!node.mounted; + }, + isFile: function(mode) { + return (mode & 61440) === 32768; + }, + isDir: function(mode) { + return (mode & 61440) === 16384; + }, + isLink: function(mode) { + return (mode & 61440) === 40960; + }, + isChrdev: function(mode) { + return (mode & 61440) === 8192; + }, + isBlkdev: function(mode) { + return (mode & 61440) === 24576; + }, + isFIFO: function(mode) { + return (mode & 61440) === 4096; + }, + isSocket: function(mode) { + return (mode & 49152) === 49152; + }, + flagModes: { + "r": 0, + "r+": 2, + "w": 577, + "w+": 578, + "a": 1089, + "a+": 1090 + }, + modeStringToFlags: function(str) { + var flags = FS.flagModes[str]; + if (typeof flags === "undefined") { + throw new Error("Unknown file open mode: " + str); + } + return flags; + }, + flagsToPermissionString: function(flag) { + var perms = [ "r", "w", "rw" ][flag & 3]; + if (flag & 512) { + perms += "w"; + } + return perms; + }, + nodePermissions: function(node, perms) { + if (FS.ignorePermissions) { + return 0; + } + if (perms.includes("r") && !(node.mode & 292)) { + return 2; + } else if (perms.includes("w") && !(node.mode & 146)) { + return 2; + } else if (perms.includes("x") && !(node.mode & 73)) { + return 2; + } + return 0; + }, + mayLookup: function(dir) { + var errCode = FS.nodePermissions(dir, "x"); + if (errCode) return errCode; + if (!dir.node_ops.lookup) return 2; + return 0; + }, + mayCreate: function(dir, name) { + try { + var node = FS.lookupNode(dir, name); + return 20; + } catch (e) {} + return FS.nodePermissions(dir, "wx"); + }, + mayDelete: function(dir, name, isdir) { + var node; + try { + node = FS.lookupNode(dir, name); + } catch (e) { + return e.errno; + } + var errCode = FS.nodePermissions(dir, "wx"); + if (errCode) { + return errCode; + } + if (isdir) { + if (!FS.isDir(node.mode)) { + return 54; + } + if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { + return 10; + } + } else { + if (FS.isDir(node.mode)) { + return 31; + } + } + return 0; + }, + mayOpen: function(node, flags) { + if (!node) { + return 44; + } + if (FS.isLink(node.mode)) { + return 32; + } else if (FS.isDir(node.mode)) { + if (FS.flagsToPermissionString(flags) !== "r" || flags & 512) { + return 31; + } + } + return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); + }, + MAX_OPEN_FDS: 4096, + nextfd: function(fd_start, fd_end) { + fd_start = fd_start || 0; + fd_end = fd_end || FS.MAX_OPEN_FDS; + for (var fd = fd_start; fd <= fd_end; fd++) { + if (!FS.streams[fd]) { + return fd; + } + } + throw new FS.ErrnoError(33); + }, + getStream: function(fd) { + return FS.streams[fd]; + }, + createStream: function(stream, fd_start, fd_end) { + if (!FS.FSStream) { + FS.FSStream = function() {}; + FS.FSStream.prototype = { + object: { + get: function() { + return this.node; + }, + set: function(val) { + this.node = val; + } + }, + isRead: { + get: function() { + return (this.flags & 2097155) !== 1; + } + }, + isWrite: { + get: function() { + return (this.flags & 2097155) !== 0; + } + }, + isAppend: { + get: function() { + return this.flags & 1024; + } + } + }; + } + var newStream = new FS.FSStream(); + for (var p in stream) { + newStream[p] = stream[p]; + } + stream = newStream; + var fd = FS.nextfd(fd_start, fd_end); + stream.fd = fd; + FS.streams[fd] = stream; + return stream; + }, + closeStream: function(fd) { + FS.streams[fd] = null; + }, + chrdev_stream_ops: { + open: function(stream) { + var device = FS.getDevice(stream.node.rdev); + stream.stream_ops = device.stream_ops; + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + }, + llseek: function() { + throw new FS.ErrnoError(70); + } + }, + major: function(dev) { + return dev >> 8; + }, + minor: function(dev) { + return dev & 255; + }, + makedev: function(ma, mi) { + return ma << 8 | mi; + }, + registerDevice: function(dev, ops) { + FS.devices[dev] = { + stream_ops: ops + }; + }, + getDevice: function(dev) { + return FS.devices[dev]; + }, + getMounts: function(mount) { + var mounts = []; + var check = [ mount ]; + while (check.length) { + var m = check.pop(); + mounts.push(m); + check.push.apply(check, m.mounts); + } + return mounts; + }, + syncfs: function(populate, callback) { + if (typeof populate === "function") { + callback = populate; + populate = false; + } + FS.syncFSRequests++; + if (FS.syncFSRequests > 1) { + err("warning: " + FS.syncFSRequests + " FS.syncfs operations in flight at once, probably just doing extra work"); + } + var mounts = FS.getMounts(FS.root.mount); + var completed = 0; + function doCallback(errCode) { + FS.syncFSRequests--; + return callback(errCode); + } + function done(errCode) { + if (errCode) { + if (!done.errored) { + done.errored = true; + return doCallback(errCode); + } + return; + } + if (++completed >= mounts.length) { + doCallback(null); + } + } + mounts.forEach(function(mount) { + if (!mount.type.syncfs) { + return done(null); + } + mount.type.syncfs(mount, populate, done); + }); + }, + mount: function(type, opts, mountpoint) { + var root = mountpoint === "/"; + var pseudo = !mountpoint; + var node; + if (root && FS.root) { + throw new FS.ErrnoError(10); + } else if (!root && !pseudo) { + var lookup = FS.lookupPath(mountpoint, { + follow_mount: false + }); + mountpoint = lookup.path; + node = lookup.node; + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + if (!FS.isDir(node.mode)) { + throw new FS.ErrnoError(54); + } + } + var mount = { + type: type, + opts: opts, + mountpoint: mountpoint, + mounts: [] + }; + var mountRoot = type.mount(mount); + mountRoot.mount = mount; + mount.root = mountRoot; + if (root) { + FS.root = mountRoot; + } else if (node) { + node.mounted = mount; + if (node.mount) { + node.mount.mounts.push(mount); + } + } + return mountRoot; + }, + unmount: function(mountpoint) { + var lookup = FS.lookupPath(mountpoint, { + follow_mount: false + }); + if (!FS.isMountpoint(lookup.node)) { + throw new FS.ErrnoError(28); + } + var node = lookup.node; + var mount = node.mounted; + var mounts = FS.getMounts(mount); + Object.keys(FS.nameTable).forEach(function(hash) { + var current = FS.nameTable[hash]; + while (current) { + var next = current.name_next; + if (mounts.includes(current.mount)) { + FS.destroyNode(current); + } + current = next; + } + }); + node.mounted = null; + var idx = node.mount.mounts.indexOf(mount); + node.mount.mounts.splice(idx, 1); + }, + lookup: function(parent, name) { + return parent.node_ops.lookup(parent, name); + }, + mknod: function(path, mode, dev) { + var lookup = FS.lookupPath(path, { + parent: true + }); + var parent = lookup.node; + var name = PATH.basename(path); + if (!name || name === "." || name === "..") { + throw new FS.ErrnoError(28); + } + var errCode = FS.mayCreate(parent, name); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.mknod) { + throw new FS.ErrnoError(63); + } + return parent.node_ops.mknod(parent, name, mode, dev); + }, + create: function(path, mode) { + mode = mode !== undefined ? mode : 438; + mode &= 4095; + mode |= 32768; + return FS.mknod(path, mode, 0); + }, + mkdir: function(path, mode) { + mode = mode !== undefined ? mode : 511; + mode &= 511 | 512; + mode |= 16384; + return FS.mknod(path, mode, 0); + }, + mkdirTree: function(path, mode) { + var dirs = path.split("/"); + var d = ""; + for (var i = 0; i < dirs.length; ++i) { + if (!dirs[i]) continue; + d += "/" + dirs[i]; + try { + FS.mkdir(d, mode); + } catch (e) { + if (e.errno != 20) throw e; + } + } + }, + mkdev: function(path, mode, dev) { + if (typeof dev === "undefined") { + dev = mode; + mode = 438; + } + mode |= 8192; + return FS.mknod(path, mode, dev); + }, + symlink: function(oldpath, newpath) { + if (!PATH_FS.resolve(oldpath)) { + throw new FS.ErrnoError(44); + } + var lookup = FS.lookupPath(newpath, { + parent: true + }); + var parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(44); + } + var newname = PATH.basename(newpath); + var errCode = FS.mayCreate(parent, newname); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.symlink) { + throw new FS.ErrnoError(63); + } + return parent.node_ops.symlink(parent, newname, oldpath); + }, + rename: function(old_path, new_path) { + var old_dirname = PATH.dirname(old_path); + var new_dirname = PATH.dirname(new_path); + var old_name = PATH.basename(old_path); + var new_name = PATH.basename(new_path); + var lookup, old_dir, new_dir; + lookup = FS.lookupPath(old_path, { + parent: true + }); + old_dir = lookup.node; + lookup = FS.lookupPath(new_path, { + parent: true + }); + new_dir = lookup.node; + if (!old_dir || !new_dir) throw new FS.ErrnoError(44); + if (old_dir.mount !== new_dir.mount) { + throw new FS.ErrnoError(75); + } + var old_node = FS.lookupNode(old_dir, old_name); + var relative = PATH_FS.relative(old_path, new_dirname); + if (relative.charAt(0) !== ".") { + throw new FS.ErrnoError(28); + } + relative = PATH_FS.relative(new_path, old_dirname); + if (relative.charAt(0) !== ".") { + throw new FS.ErrnoError(55); + } + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) {} + if (old_node === new_node) { + return; + } + var isdir = FS.isDir(old_node.mode); + var errCode = FS.mayDelete(old_dir, old_name, isdir); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + errCode = new_node ? FS.mayDelete(new_dir, new_name, isdir) : FS.mayCreate(new_dir, new_name); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!old_dir.node_ops.rename) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(old_node) || new_node && FS.isMountpoint(new_node)) { + throw new FS.ErrnoError(10); + } + if (new_dir !== old_dir) { + errCode = FS.nodePermissions(old_dir, "w"); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + } + FS.hashRemoveNode(old_node); + try { + old_dir.node_ops.rename(old_node, new_dir, new_name); + } catch (e) { + throw e; + } finally { + FS.hashAddNode(old_node); + } + }, + rmdir: function(path) { + var lookup = FS.lookupPath(path, { + parent: true + }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var errCode = FS.mayDelete(parent, name, true); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.rmdir) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + parent.node_ops.rmdir(parent, name); + FS.destroyNode(node); + }, + readdir: function(path) { + var lookup = FS.lookupPath(path, { + follow: true + }); + var node = lookup.node; + if (!node.node_ops.readdir) { + throw new FS.ErrnoError(54); + } + return node.node_ops.readdir(node); + }, + unlink: function(path) { + var lookup = FS.lookupPath(path, { + parent: true + }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var errCode = FS.mayDelete(parent, name, false); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.unlink) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + parent.node_ops.unlink(parent, name); + FS.destroyNode(node); + }, + readlink: function(path) { + var lookup = FS.lookupPath(path); + var link = lookup.node; + if (!link) { + throw new FS.ErrnoError(44); + } + if (!link.node_ops.readlink) { + throw new FS.ErrnoError(28); + } + return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); + }, + stat: function(path, dontFollow) { + var lookup = FS.lookupPath(path, { + follow: !dontFollow + }); + var node = lookup.node; + if (!node) { + throw new FS.ErrnoError(44); + } + if (!node.node_ops.getattr) { + throw new FS.ErrnoError(63); + } + return node.node_ops.getattr(node); + }, + lstat: function(path) { + return FS.stat(path, true); + }, + chmod: function(path, mode, dontFollow) { + var node; + if (typeof path === "string") { + var lookup = FS.lookupPath(path, { + follow: !dontFollow + }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + node.node_ops.setattr(node, { + mode: mode & 4095 | node.mode & ~4095, + timestamp: Date.now() + }); + }, + lchmod: function(path, mode) { + FS.chmod(path, mode, true); + }, + fchmod: function(fd, mode) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + FS.chmod(stream.node, mode); + }, + chown: function(path, uid, gid, dontFollow) { + var node; + if (typeof path === "string") { + var lookup = FS.lookupPath(path, { + follow: !dontFollow + }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + node.node_ops.setattr(node, { + timestamp: Date.now() + }); + }, + lchown: function(path, uid, gid) { + FS.chown(path, uid, gid, true); + }, + fchown: function(fd, uid, gid) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + FS.chown(stream.node, uid, gid); + }, + truncate: function(path, len) { + if (len < 0) { + throw new FS.ErrnoError(28); + } + var node; + if (typeof path === "string") { + var lookup = FS.lookupPath(path, { + follow: true + }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + if (FS.isDir(node.mode)) { + throw new FS.ErrnoError(31); + } + if (!FS.isFile(node.mode)) { + throw new FS.ErrnoError(28); + } + var errCode = FS.nodePermissions(node, "w"); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + node.node_ops.setattr(node, { + size: len, + timestamp: Date.now() + }); + }, + ftruncate: function(fd, len) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(28); + } + FS.truncate(stream.node, len); + }, + utime: function(path, atime, mtime) { + var lookup = FS.lookupPath(path, { + follow: true + }); + var node = lookup.node; + node.node_ops.setattr(node, { + timestamp: Math.max(atime, mtime) + }); + }, + open: function(path, flags, mode, fd_start, fd_end) { + if (path === "") { + throw new FS.ErrnoError(44); + } + flags = typeof flags === "string" ? FS.modeStringToFlags(flags) : flags; + mode = typeof mode === "undefined" ? 438 : mode; + if (flags & 64) { + mode = mode & 4095 | 32768; + } else { + mode = 0; + } + var node; + if (typeof path === "object") { + node = path; + } else { + path = PATH.normalize(path); + try { + var lookup = FS.lookupPath(path, { + follow: !(flags & 131072) + }); + node = lookup.node; + } catch (e) {} + } + var created = false; + if (flags & 64) { + if (node) { + if (flags & 128) { + throw new FS.ErrnoError(20); + } + } else { + node = FS.mknod(path, mode, 0); + created = true; + } + } + if (!node) { + throw new FS.ErrnoError(44); + } + if (FS.isChrdev(node.mode)) { + flags &= ~512; + } + if (flags & 65536 && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(54); + } + if (!created) { + var errCode = FS.mayOpen(node, flags); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + } + if (flags & 512) { + FS.truncate(node, 0); + } + flags &= ~(128 | 512 | 131072); + var stream = FS.createStream({ + node: node, + path: FS.getPath(node), + id: node.id, + flags: flags, + mode: node.mode, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + node_ops: node.node_ops, + ungotten: [], + error: false + }, fd_start, fd_end); + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + if (Module["logReadFiles"] && !(flags & 1)) { + if (!FS.readFiles) FS.readFiles = {}; + if (!(path in FS.readFiles)) { + FS.readFiles[path] = 1; + } + } + return stream; + }, + close: function(stream) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (stream.getdents) stream.getdents = null; + try { + if (stream.stream_ops.close) { + stream.stream_ops.close(stream); + } + } catch (e) { + throw e; + } finally { + FS.closeStream(stream.fd); + } + stream.fd = null; + }, + isClosed: function(stream) { + return stream.fd === null; + }, + llseek: function(stream, offset, whence) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (!stream.seekable || !stream.stream_ops.llseek) { + throw new FS.ErrnoError(70); + } + if (whence != 0 && whence != 1 && whence != 2) { + throw new FS.ErrnoError(28); + } + stream.position = stream.stream_ops.llseek(stream, offset, whence); + stream.ungotten = []; + return stream.position; + }, + read: function(stream, buffer, offset, length, position) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(8); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31); + } + if (!stream.stream_ops.read) { + throw new FS.ErrnoError(28); + } + var seeking = typeof position !== "undefined"; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(70); + } + var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); + if (!seeking) stream.position += bytesRead; + return bytesRead; + }, + write: function(stream, buffer, offset, length, position, canOwn) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31); + } + if (!stream.stream_ops.write) { + throw new FS.ErrnoError(28); + } + if (stream.seekable && stream.flags & 1024) { + FS.llseek(stream, 0, 2); + } + var seeking = typeof position !== "undefined"; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(70); + } + var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); + if (!seeking) stream.position += bytesWritten; + return bytesWritten; + }, + allocate: function(stream, offset, length) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (offset < 0 || length <= 0) { + throw new FS.ErrnoError(28); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8); + } + if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + if (!stream.stream_ops.allocate) { + throw new FS.ErrnoError(138); + } + stream.stream_ops.allocate(stream, offset, length); + }, + mmap: function(stream, address, length, position, prot, flags) { + if ((prot & 2) !== 0 && (flags & 2) === 0 && (stream.flags & 2097155) !== 2) { + throw new FS.ErrnoError(2); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(2); + } + if (!stream.stream_ops.mmap) { + throw new FS.ErrnoError(43); + } + return stream.stream_ops.mmap(stream, address, length, position, prot, flags); + }, + msync: function(stream, buffer, offset, length, mmapFlags) { + if (!stream || !stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + }, + munmap: function(stream) { + return 0; + }, + ioctl: function(stream, cmd, arg) { + if (!stream.stream_ops.ioctl) { + throw new FS.ErrnoError(59); + } + return stream.stream_ops.ioctl(stream, cmd, arg); + }, + readFile: function(path, opts) { + opts = opts || {}; + opts.flags = opts.flags || 0; + opts.encoding = opts.encoding || "binary"; + if (opts.encoding !== "utf8" && opts.encoding !== "binary") { + throw new Error('Invalid encoding type "' + opts.encoding + '"'); + } + var ret; + var stream = FS.open(path, opts.flags); + var stat = FS.stat(path); + var length = stat.size; + var buf = new Uint8Array(length); + FS.read(stream, buf, 0, length, 0); + if (opts.encoding === "utf8") { + ret = UTF8ArrayToString(buf, 0); + } else if (opts.encoding === "binary") { + ret = buf; + } + FS.close(stream); + return ret; + }, + writeFile: function(path, data, opts) { + opts = opts || {}; + opts.flags = opts.flags || 577; + var stream = FS.open(path, opts.flags, opts.mode); + if (typeof data === "string") { + var buf = new Uint8Array(lengthBytesUTF8(data) + 1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); + } else if (ArrayBuffer.isView(data)) { + FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); + } else { + throw new Error("Unsupported data type"); + } + FS.close(stream); + }, + cwd: function() { + return FS.currentPath; + }, + chdir: function(path) { + var lookup = FS.lookupPath(path, { + follow: true + }); + if (lookup.node === null) { + throw new FS.ErrnoError(44); + } + if (!FS.isDir(lookup.node.mode)) { + throw new FS.ErrnoError(54); + } + var errCode = FS.nodePermissions(lookup.node, "x"); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + FS.currentPath = lookup.path; + }, + createDefaultDirectories: function() { + FS.mkdir("/tmp"); + FS.mkdir("/home"); + FS.mkdir("/home/web_user"); + }, + createDefaultDevices: function() { + FS.mkdir("/dev"); + FS.registerDevice(FS.makedev(1, 3), { + read: function() { + return 0; + }, + write: function(stream, buffer, offset, length, pos) { + return length; + } + }); + FS.mkdev("/dev/null", FS.makedev(1, 3)); + TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); + TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); + FS.mkdev("/dev/tty", FS.makedev(5, 0)); + FS.mkdev("/dev/tty1", FS.makedev(6, 0)); + var random_device = getRandomDevice(); + FS.createDevice("/dev", "random", random_device); + FS.createDevice("/dev", "urandom", random_device); + FS.mkdir("/dev/shm"); + FS.mkdir("/dev/shm/tmp"); + }, + createSpecialDirectories: function() { + FS.mkdir("/proc"); + var proc_self = FS.mkdir("/proc/self"); + FS.mkdir("/proc/self/fd"); + FS.mount({ + mount: function() { + var node = FS.createNode(proc_self, "fd", 16384 | 511, 73); + node.node_ops = { + lookup: function(parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(8); + var ret = { + parent: null, + mount: { + mountpoint: "fake" + }, + node_ops: { + readlink: function() { + return stream.path; + } + } + }; + ret.parent = ret; + return ret; + } + }; + return node; + } + }, {}, "/proc/self/fd"); + }, + createStandardStreams: function() { + if (Module["stdin"]) { + FS.createDevice("/dev", "stdin", Module["stdin"]); + } else { + FS.symlink("/dev/tty", "/dev/stdin"); + } + if (Module["stdout"]) { + FS.createDevice("/dev", "stdout", null, Module["stdout"]); + } else { + FS.symlink("/dev/tty", "/dev/stdout"); + } + if (Module["stderr"]) { + FS.createDevice("/dev", "stderr", null, Module["stderr"]); + } else { + FS.symlink("/dev/tty1", "/dev/stderr"); + } + var stdin = FS.open("/dev/stdin", 0); + var stdout = FS.open("/dev/stdout", 1); + var stderr = FS.open("/dev/stderr", 1); + }, + ensureErrnoError: function() { + if (FS.ErrnoError) return; + FS.ErrnoError = function ErrnoError(errno, node) { + this.node = node; + this.setErrno = function(errno) { + this.errno = errno; + }; + this.setErrno(errno); + this.message = "FS error"; + }; + FS.ErrnoError.prototype = new Error(); + FS.ErrnoError.prototype.constructor = FS.ErrnoError; + [ 44 ].forEach(function(code) { + FS.genericErrors[code] = new FS.ErrnoError(code); + FS.genericErrors[code].stack = ""; + }); + }, + staticInit: function() { + FS.ensureErrnoError(); + FS.nameTable = new Array(4096); + FS.mount(MEMFS, {}, "/"); + FS.createDefaultDirectories(); + FS.createDefaultDevices(); + FS.createSpecialDirectories(); + FS.filesystems = { + "MEMFS": MEMFS + }; + }, + init: function(input, output, error) { + FS.init.initialized = true; + FS.ensureErrnoError(); + Module["stdin"] = input || Module["stdin"]; + Module["stdout"] = output || Module["stdout"]; + Module["stderr"] = error || Module["stderr"]; + FS.createStandardStreams(); + }, + quit: function() { + FS.init.initialized = false; + var fflush = Module["_fflush"]; + if (fflush) fflush(0); + for (var i = 0; i < FS.streams.length; i++) { + var stream = FS.streams[i]; + if (!stream) { + continue; + } + FS.close(stream); + } + }, + getMode: function(canRead, canWrite) { + var mode = 0; + if (canRead) mode |= 292 | 73; + if (canWrite) mode |= 146; + return mode; + }, + findObject: function(path, dontResolveLastLink) { + var ret = FS.analyzePath(path, dontResolveLastLink); + if (ret.exists) { + return ret.object; + } else { + return null; + } + }, + analyzePath: function(path, dontResolveLastLink) { + try { + var lookup = FS.lookupPath(path, { + follow: !dontResolveLastLink + }); + path = lookup.path; + } catch (e) {} + var ret = { + isRoot: false, + exists: false, + error: 0, + name: null, + path: null, + object: null, + parentExists: false, + parentPath: null, + parentObject: null + }; + try { + var lookup = FS.lookupPath(path, { + parent: true + }); + ret.parentExists = true; + ret.parentPath = lookup.path; + ret.parentObject = lookup.node; + ret.name = PATH.basename(path); + lookup = FS.lookupPath(path, { + follow: !dontResolveLastLink + }); + ret.exists = true; + ret.path = lookup.path; + ret.object = lookup.node; + ret.name = lookup.node.name; + ret.isRoot = lookup.path === "/"; + } catch (e) { + ret.error = e.errno; + } + return ret; + }, + createPath: function(parent, path, canRead, canWrite) { + parent = typeof parent === "string" ? parent : FS.getPath(parent); + var parts = path.split("/").reverse(); + while (parts.length) { + var part = parts.pop(); + if (!part) continue; + var current = PATH.join2(parent, part); + try { + FS.mkdir(current); + } catch (e) {} + parent = current; + } + return current; + }, + createFile: function(parent, name, properties, canRead, canWrite) { + var path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.create(path, mode); + }, + createDataFile: function(parent, name, data, canRead, canWrite, canOwn) { + var path = name ? PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name) : parent; + var mode = FS.getMode(canRead, canWrite); + var node = FS.create(path, mode); + if (data) { + if (typeof data === "string") { + var arr = new Array(data.length); + for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); + data = arr; + } + FS.chmod(node, mode | 146); + var stream = FS.open(node, 577); + FS.write(stream, data, 0, data.length, 0, canOwn); + FS.close(stream); + FS.chmod(node, mode); + } + return node; + }, + createDevice: function(parent, name, input, output) { + var path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name); + var mode = FS.getMode(!!input, !!output); + if (!FS.createDevice.major) FS.createDevice.major = 64; + var dev = FS.makedev(FS.createDevice.major++, 0); + FS.registerDevice(dev, { + open: function(stream) { + stream.seekable = false; + }, + close: function(stream) { + if (output && output.buffer && output.buffer.length) { + output(10); + } + }, + read: function(stream, buffer, offset, length, pos) { + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = input(); + } catch (e) { + throw new FS.ErrnoError(29); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset + i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write: function(stream, buffer, offset, length, pos) { + for (var i = 0; i < length; i++) { + try { + output(buffer[offset + i]); + } catch (e) { + throw new FS.ErrnoError(29); + } + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + } + }); + return FS.mkdev(path, mode, dev); + }, + forceLoadFile: function(obj) { + if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; + if (typeof XMLHttpRequest !== "undefined") { + throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); + } else if (read_) { + try { + obj.contents = intArrayFromString(read_(obj.url), true); + obj.usedBytes = obj.contents.length; + } catch (e) { + throw new FS.ErrnoError(29); + } + } else { + throw new Error("Cannot load without read() or XMLHttpRequest."); + } + }, + createLazyFile: function(parent, name, url, canRead, canWrite) { + function LazyUint8Array() { + this.lengthKnown = false; + this.chunks = []; + } + LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { + if (idx > this.length - 1 || idx < 0) { + return undefined; + } + var chunkOffset = idx % this.chunkSize; + var chunkNum = idx / this.chunkSize | 0; + return this.getter(chunkNum)[chunkOffset]; + }; + LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { + this.getter = getter; + }; + LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { + var xhr = new XMLHttpRequest(); + xhr.open("HEAD", url, false); + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + var datalength = Number(xhr.getResponseHeader("Content-length")); + var header; + var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; + var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; + var chunkSize = 1024 * 1024; + if (!hasByteServing) chunkSize = datalength; + var doXHR = function(from, to) { + if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); + if (to > datalength - 1) throw new Error("only " + datalength + " bytes available! programmer error!"); + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); + if (typeof Uint8Array != "undefined") xhr.responseType = "arraybuffer"; + if (xhr.overrideMimeType) { + xhr.overrideMimeType("text/plain; charset=x-user-defined"); + } + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + if (xhr.response !== undefined) { + return new Uint8Array(xhr.response || []); + } else { + return intArrayFromString(xhr.responseText || "", true); + } + }; + var lazyArray = this; + lazyArray.setDataGetter(function(chunkNum) { + var start = chunkNum * chunkSize; + var end = (chunkNum + 1) * chunkSize - 1; + end = Math.min(end, datalength - 1); + if (typeof lazyArray.chunks[chunkNum] === "undefined") { + lazyArray.chunks[chunkNum] = doXHR(start, end); + } + if (typeof lazyArray.chunks[chunkNum] === "undefined") throw new Error("doXHR failed!"); + return lazyArray.chunks[chunkNum]; + }); + if (usesGzip || !datalength) { + chunkSize = datalength = 1; + datalength = this.getter(0).length; + chunkSize = datalength; + out("LazyFiles on gzip forces download of the whole file when length is accessed"); + } + this._length = datalength; + this._chunkSize = chunkSize; + this.lengthKnown = true; + }; + if (typeof XMLHttpRequest !== "undefined") { + if (!ENVIRONMENT_IS_WORKER) throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"; + var lazyArray = new LazyUint8Array(); + Object.defineProperties(lazyArray, { + length: { + get: function() { + if (!this.lengthKnown) { + this.cacheLength(); + } + return this._length; + } + }, + chunkSize: { + get: function() { + if (!this.lengthKnown) { + this.cacheLength(); + } + return this._chunkSize; + } + } + }); + var properties = { + isDevice: false, + contents: lazyArray + }; + } else { + var properties = { + isDevice: false, + url: url + }; + } + var node = FS.createFile(parent, name, properties, canRead, canWrite); + if (properties.contents) { + node.contents = properties.contents; + } else if (properties.url) { + node.contents = null; + node.url = properties.url; + } + Object.defineProperties(node, { + usedBytes: { + get: function() { + return this.contents.length; + } + } + }); + var stream_ops = {}; + var keys = Object.keys(node.stream_ops); + keys.forEach(function(key) { + var fn = node.stream_ops[key]; + stream_ops[key] = function forceLoadLazyFile() { + FS.forceLoadFile(node); + return fn.apply(null, arguments); + }; + }); + stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { + FS.forceLoadFile(node); + var contents = stream.node.contents; + if (position >= contents.length) return 0; + var size = Math.min(contents.length - position, length); + if (contents.slice) { + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents[position + i]; + } + } else { + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents.get(position + i); + } + } + return size; + }; + node.stream_ops = stream_ops; + return node; + }, + createPreloadedFile: function(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { + Browser.init(); + var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency("cp " + fullname); + function processData(byteArray) { + function finish(byteArray) { + if (preFinish) preFinish(); + if (!dontCreateFile) { + FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); + } + if (onload) onload(); + removeRunDependency(dep); + } + var handled = false; + Module["preloadPlugins"].forEach(function(plugin) { + if (handled) return; + if (plugin["canHandle"](fullname)) { + plugin["handle"](byteArray, fullname, finish, function() { + if (onerror) onerror(); + removeRunDependency(dep); + }); + handled = true; + } + }); + if (!handled) finish(byteArray); + } + addRunDependency(dep); + if (typeof url == "string") { + asyncLoad(url, function(byteArray) { + processData(byteArray); + }, onerror); + } else { + processData(url); + } + }, + indexedDB: function() { + return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + }, + DB_NAME: function() { + return "EM_FS_" + window.location.pathname; + }, + DB_VERSION: 20, + DB_STORE_NAME: "FILE_DATA", + saveFilesToDB: function(paths, onload, onerror) { + onload = onload || function() {}; + onerror = onerror || function() {}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { + out("creating db"); + var db = openRequest.result; + db.createObjectStore(FS.DB_STORE_NAME); + }; + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + var transaction = db.transaction([ FS.DB_STORE_NAME ], "readwrite"); + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var putRequest = files.put(FS.analyzePath(path).object.contents, path); + putRequest.onsuccess = function putRequest_onsuccess() { + ok++; + if (ok + fail == total) finish(); + }; + putRequest.onerror = function putRequest_onerror() { + fail++; + if (ok + fail == total) finish(); + }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + }, + loadFilesFromDB: function(paths, onload, onerror) { + onload = onload || function() {}; + onerror = onerror || function() {}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = onerror; + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + try { + var transaction = db.transaction([ FS.DB_STORE_NAME ], "readonly"); + } catch (e) { + onerror(e); + return; + } + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var getRequest = files.get(path); + getRequest.onsuccess = function getRequest_onsuccess() { + if (FS.analyzePath(path).exists) { + FS.unlink(path); + } + FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); + ok++; + if (ok + fail == total) finish(); + }; + getRequest.onerror = function getRequest_onerror() { + fail++; + if (ok + fail == total) finish(); + }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + } +}; + +var SYSCALLS = { + mappings: {}, + DEFAULT_POLLMASK: 5, + calculateAt: function(dirfd, path, allowEmpty) { + if (path[0] === "/") { + return path; + } + var dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + var dirstream = FS.getStream(dirfd); + if (!dirstream) throw new FS.ErrnoError(8); + dir = dirstream.path; + } + if (path.length == 0) { + if (!allowEmpty) { + throw new FS.ErrnoError(44); + } + return dir; + } + return PATH.join2(dir, path); + }, + doStat: function(func, path, buf) { + try { + var stat = func(path); + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + return -54; + } + throw e; + } + SAFE_HEAP_STORE(buf | 0, stat.dev | 0, 4); + SAFE_HEAP_STORE(buf + 4 | 0, 0 | 0, 4); + SAFE_HEAP_STORE(buf + 8 | 0, stat.ino | 0, 4); + SAFE_HEAP_STORE(buf + 12 | 0, stat.mode | 0, 4); + SAFE_HEAP_STORE(buf + 16 | 0, stat.nlink | 0, 4); + SAFE_HEAP_STORE(buf + 20 | 0, stat.uid | 0, 4); + SAFE_HEAP_STORE(buf + 24 | 0, stat.gid | 0, 4); + SAFE_HEAP_STORE(buf + 28 | 0, stat.rdev | 0, 4); + SAFE_HEAP_STORE(buf + 32 | 0, 0 | 0, 4); + tempI64 = [ stat.size >>> 0, (tempDouble = stat.size, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ], + SAFE_HEAP_STORE(buf + 40 | 0, tempI64[0] | 0, 4), SAFE_HEAP_STORE(buf + 44 | 0, tempI64[1] | 0, 4); + SAFE_HEAP_STORE(buf + 48 | 0, 4096 | 0, 4); + SAFE_HEAP_STORE(buf + 52 | 0, stat.blocks | 0, 4); + SAFE_HEAP_STORE(buf + 56 | 0, stat.atime.getTime() / 1e3 | 0 | 0, 4); + SAFE_HEAP_STORE(buf + 60 | 0, 0 | 0, 4); + SAFE_HEAP_STORE(buf + 64 | 0, stat.mtime.getTime() / 1e3 | 0 | 0, 4); + SAFE_HEAP_STORE(buf + 68 | 0, 0 | 0, 4); + SAFE_HEAP_STORE(buf + 72 | 0, stat.ctime.getTime() / 1e3 | 0 | 0, 4); + SAFE_HEAP_STORE(buf + 76 | 0, 0 | 0, 4); + tempI64 = [ stat.ino >>> 0, (tempDouble = stat.ino, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ], + SAFE_HEAP_STORE(buf + 80 | 0, tempI64[0] | 0, 4), SAFE_HEAP_STORE(buf + 84 | 0, tempI64[1] | 0, 4); + return 0; + }, + doMsync: function(addr, stream, len, flags, offset) { + var buffer = HEAPU8.slice(addr, addr + len); + FS.msync(stream, buffer, offset, len, flags); + }, + doMkdir: function(path, mode) { + path = PATH.normalize(path); + if (path[path.length - 1] === "/") path = path.substr(0, path.length - 1); + FS.mkdir(path, mode, 0); + return 0; + }, + doMknod: function(path, mode, dev) { + switch (mode & 61440) { + case 32768: + case 8192: + case 24576: + case 4096: + case 49152: + break; + + default: + return -28; + } + FS.mknod(path, mode, dev); + return 0; + }, + doReadlink: function(path, buf, bufsize) { + if (bufsize <= 0) return -28; + var ret = FS.readlink(path); + var len = Math.min(bufsize, lengthBytesUTF8(ret)); + var endChar = SAFE_HEAP_LOAD(buf + len, 1, 0); + stringToUTF8(ret, buf, bufsize + 1); + SAFE_HEAP_STORE(buf + len, endChar, 1); + return len; + }, + doAccess: function(path, amode) { + if (amode & ~7) { + return -28; + } + var lookup = FS.lookupPath(path, { + follow: true + }); + var node = lookup.node; + if (!node) { + return -44; + } + var perms = ""; + if (amode & 4) perms += "r"; + if (amode & 2) perms += "w"; + if (amode & 1) perms += "x"; + if (perms && FS.nodePermissions(node, perms)) { + return -2; + } + return 0; + }, + doDup: function(path, flags, suggestFD) { + var suggest = FS.getStream(suggestFD); + if (suggest) FS.close(suggest); + return FS.open(path, flags, 0, suggestFD, suggestFD).fd; + }, + doReadv: function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = SAFE_HEAP_LOAD(iov + i * 8 | 0, 4, 0) | 0; + var len = SAFE_HEAP_LOAD(iov + (i * 8 + 4) | 0, 4, 0) | 0; + var curr = FS.read(stream, HEAP8, ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; + } + return ret; + }, + doWritev: function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = SAFE_HEAP_LOAD(iov + i * 8 | 0, 4, 0) | 0; + var len = SAFE_HEAP_LOAD(iov + (i * 8 + 4) | 0, 4, 0) | 0; + var curr = FS.write(stream, HEAP8, ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + } + return ret; + }, + varargs: undefined, + get: function() { + SYSCALLS.varargs += 4; + var ret = SAFE_HEAP_LOAD(SYSCALLS.varargs - 4 | 0, 4, 0) | 0; + return ret; + }, + getStr: function(ptr) { + var ret = UTF8ToString(ptr); + return ret; + }, + getStreamFromFD: function(fd) { + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(8); + return stream; + }, + get64: function(low, high) { + return low; + } +}; + +function ___syscall_fstat64(fd, buf) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + return SYSCALLS.doStat(FS.stat, stream.path, buf); + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return -e.errno; + } +} + +function ___syscall_fstatat64(dirfd, path, buf, flags) { + try { + path = SYSCALLS.getStr(path); + var nofollow = flags & 256; + var allowEmpty = flags & 4096; + flags = flags & ~4352; + path = SYSCALLS.calculateAt(dirfd, path, allowEmpty); + return SYSCALLS.doStat(nofollow ? FS.lstat : FS.stat, path, buf); + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return -e.errno; + } +} + +function ___syscall_getcwd(buf, size) { + try { + if (size === 0) return -28; + var cwd = FS.cwd(); + var cwdLengthInBytes = lengthBytesUTF8(cwd); + if (size < cwdLengthInBytes + 1) return -68; + stringToUTF8(cwd, buf, size); + return buf; + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return -e.errno; + } +} + +function ___syscall_lstat64(path, buf) { + try { + path = SYSCALLS.getStr(path); + return SYSCALLS.doStat(FS.lstat, path, buf); + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return -e.errno; + } +} + +function ___syscall_readlink(path, buf, bufsize) { + try { + path = SYSCALLS.getStr(path); + return SYSCALLS.doReadlink(path, buf, bufsize); + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return -e.errno; + } +} + +function ___syscall_stat64(path, buf) { + try { + path = SYSCALLS.getStr(path); + return SYSCALLS.doStat(FS.stat, path, buf); + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return -e.errno; + } +} + +function __emscripten_throw_longjmp() { + throw "longjmp"; +} + +var _emscripten_get_now; + +if (ENVIRONMENT_IS_NODE) { + _emscripten_get_now = function() { + var t = process["hrtime"](); + return t[0] * 1e3 + t[1] / 1e6; + }; +} else _emscripten_get_now = function() { + return performance.now(); +}; + +var _emscripten_get_now_is_monotonic = true; + +function checkWasiClock(clock_id) { + return clock_id == 0 || clock_id == 1 || clock_id == 2 || clock_id == 3; +} + +function _clock_time_get(clk_id, precision_low, precision_high, ptime) { + if (!checkWasiClock(clk_id)) { + return 28; + } + var now; + if (clk_id === 0) { + now = Date.now(); + } else if (_emscripten_get_now_is_monotonic) { + now = _emscripten_get_now(); + } else { + return 52; + } + var nsec = Math.round(now * 1e3 * 1e3); + SAFE_HEAP_STORE(ptime | 0, nsec >>> 0 | 0, 4); + SAFE_HEAP_STORE(ptime + 4 | 0, nsec / Math.pow(2, 32) >>> 0 | 0, 4); + return 0; +} + +var readAsmConstArgsArray = []; + +function readAsmConstArgs(sigPtr, buf) { + readAsmConstArgsArray.length = 0; + var ch; + buf >>= 2; + while (ch = SAFE_HEAP_LOAD(sigPtr++, 1, 1)) { + var readAsmConstArgsDouble = ch < 105; + if (readAsmConstArgsDouble && buf & 1) buf++; + readAsmConstArgsArray.push(readAsmConstArgsDouble ? SAFE_HEAP_LOAD_D((buf++ >> 1) * 8, 8, 0) : SAFE_HEAP_LOAD(buf * 4, 4, 0)); + ++buf; + } + return readAsmConstArgsArray; +} + +function _emscripten_asm_const_int(code, sigPtr, argbuf) { + var args = readAsmConstArgs(sigPtr, argbuf); + return ASM_CONSTS[code].apply(null, args); +} + +var ENV = {}; + +function getExecutableName() { + return thisProgram || "./this.program"; +} + +function getEnvStrings() { + if (!getEnvStrings.strings) { + var lang = (typeof navigator === "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8"; + var env = { + "USER": "web_user", + "LOGNAME": "web_user", + "PATH": "/", + "PWD": "/", + "HOME": "/home/web_user", + "LANG": lang, + "_": getExecutableName() + }; + for (var x in ENV) { + if (ENV[x] === undefined) delete env[x]; else env[x] = ENV[x]; + } + var strings = []; + for (var x in env) { + strings.push(x + "=" + env[x]); + } + getEnvStrings.strings = strings; + } + return getEnvStrings.strings; +} + +function _environ_get(__environ, environ_buf) { + var bufSize = 0; + getEnvStrings().forEach(function(string, i) { + var ptr = environ_buf + bufSize; + SAFE_HEAP_STORE(__environ + i * 4 | 0, ptr | 0, 4); + writeAsciiToMemory(string, ptr); + bufSize += string.length + 1; + }); + return 0; +} + +function _environ_sizes_get(penviron_count, penviron_buf_size) { + var strings = getEnvStrings(); + SAFE_HEAP_STORE(penviron_count | 0, strings.length | 0, 4); + var bufSize = 0; + strings.forEach(function(string) { + bufSize += string.length + 1; + }); + SAFE_HEAP_STORE(penviron_buf_size | 0, bufSize | 0, 4); + return 0; +} + +function _fd_close(fd) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return e.errno; + } +} + +function _fd_read(fd, iov, iovcnt, pnum) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + var num = SYSCALLS.doReadv(stream, iov, iovcnt); + SAFE_HEAP_STORE(pnum | 0, num | 0, 4); + return 0; + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return e.errno; + } +} + +function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + var HIGH_OFFSET = 4294967296; + var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0); + var DOUBLE_LIMIT = 9007199254740992; + if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) { + return -61; + } + FS.llseek(stream, offset, whence); + tempI64 = [ stream.position >>> 0, (tempDouble = stream.position, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ], + SAFE_HEAP_STORE(newOffset | 0, tempI64[0] | 0, 4), SAFE_HEAP_STORE(newOffset + 4 | 0, tempI64[1] | 0, 4); + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; + return 0; + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return e.errno; + } +} + +function _fd_write(fd, iov, iovcnt, pnum) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + var num = SYSCALLS.doWritev(stream, iov, iovcnt); + SAFE_HEAP_STORE(pnum | 0, num | 0, 4); + return 0; + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return e.errno; + } +} + +function _getTempRet0() { + return getTempRet0(); +} + +function _proc_exit(code) { + procExit(code); +} + +function _setTempRet0(val) { + setTempRet0(val); +} + +var FSNode = function(parent, name, mode, rdev) { + if (!parent) { + parent = this; + } + this.parent = parent; + this.mount = parent.mount; + this.mounted = null; + this.id = FS.nextInode++; + this.name = name; + this.mode = mode; + this.node_ops = {}; + this.stream_ops = {}; + this.rdev = rdev; +}; + +var readMode = 292 | 73; + +var writeMode = 146; + +Object.defineProperties(FSNode.prototype, { + read: { + get: function() { + return (this.mode & readMode) === readMode; + }, + set: function(val) { + val ? this.mode |= readMode : this.mode &= ~readMode; + } + }, + write: { + get: function() { + return (this.mode & writeMode) === writeMode; + }, + set: function(val) { + val ? this.mode |= writeMode : this.mode &= ~writeMode; + } + }, + isFolder: { + get: function() { + return FS.isDir(this.mode); + } + }, + isDevice: { + get: function() { + return FS.isChrdev(this.mode); + } + } +}); + +FS.FSNode = FSNode; + +FS.staticInit(); + +var ASSERTIONS = false; + +function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 255) { + if (ASSERTIONS) { + assert(false, "Character code " + chr + " (" + String.fromCharCode(chr) + ") at offset " + i + " not in 0x00-0xFF."); + } + chr &= 255; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(""); +} + +var asmLibraryArg = { + "__syscall_fstat64": ___syscall_fstat64, + "__syscall_fstatat64": ___syscall_fstatat64, + "__syscall_getcwd": ___syscall_getcwd, + "__syscall_lstat64": ___syscall_lstat64, + "__syscall_readlink": ___syscall_readlink, + "__syscall_stat64": ___syscall_stat64, + "_emscripten_throw_longjmp": __emscripten_throw_longjmp, + "alignfault": alignfault, + "clock_time_get": _clock_time_get, + "emscripten_asm_const_int": _emscripten_asm_const_int, + "environ_get": _environ_get, + "environ_sizes_get": _environ_sizes_get, + "fd_close": _fd_close, + "fd_read": _fd_read, + "fd_seek": _fd_seek, + "fd_write": _fd_write, + "getTempRet0": _getTempRet0, + "invoke_ii": invoke_ii, + "invoke_iii": invoke_iii, + "invoke_iiii": invoke_iiii, + "invoke_iiiii": invoke_iiiii, + "invoke_vi": invoke_vi, + "invoke_vii": invoke_vii, + "invoke_viii": invoke_viii, + "invoke_viiii": invoke_viiii, + "invoke_viiiii": invoke_viiiii, + "proc_exit": _proc_exit, + "segfault": segfault, + "setTempRet0": _setTempRet0 +}; + +var asm = createWasm(); + +var _emscripten_snapshot_compiler_get_version = Module["_emscripten_snapshot_compiler_get_version"] = function() { + return (_emscripten_snapshot_compiler_get_version = Module["_emscripten_snapshot_compiler_get_version"] = Module["asm"]["emscripten_snapshot_compiler_get_version"]).apply(null, arguments); +}; + +var _emscripten_snapshot_compiler_compile = Module["_emscripten_snapshot_compiler_compile"] = function() { + return (_emscripten_snapshot_compiler_compile = Module["_emscripten_snapshot_compiler_compile"] = Module["asm"]["emscripten_snapshot_compiler_compile"]).apply(null, arguments); +}; + +var _malloc = Module["_malloc"] = function() { + return (_malloc = Module["_malloc"] = Module["asm"]["malloc"]).apply(null, arguments); +}; + +var _free = Module["_free"] = function() { + return (_free = Module["_free"] = Module["asm"]["free"]).apply(null, arguments); +}; + +var _saveSetjmp = Module["_saveSetjmp"] = function() { + return (_saveSetjmp = Module["_saveSetjmp"] = Module["asm"]["saveSetjmp"]).apply(null, arguments); +}; + +var __initialize = Module["__initialize"] = function() { + return (__initialize = Module["__initialize"] = Module["asm"]["_initialize"]).apply(null, arguments); +}; + +var ___errno_location = Module["___errno_location"] = function() { + return (___errno_location = Module["___errno_location"] = Module["asm"]["__errno_location"]).apply(null, arguments); +}; + +var __get_tzname = Module["__get_tzname"] = function() { + return (__get_tzname = Module["__get_tzname"] = Module["asm"]["_get_tzname"]).apply(null, arguments); +}; + +var __get_daylight = Module["__get_daylight"] = function() { + return (__get_daylight = Module["__get_daylight"] = Module["asm"]["_get_daylight"]).apply(null, arguments); +}; + +var __get_timezone = Module["__get_timezone"] = function() { + return (__get_timezone = Module["__get_timezone"] = Module["asm"]["_get_timezone"]).apply(null, arguments); +}; + +var stackSave = Module["stackSave"] = function() { + return (stackSave = Module["stackSave"] = Module["asm"]["stackSave"]).apply(null, arguments); +}; + +var stackRestore = Module["stackRestore"] = function() { + return (stackRestore = Module["stackRestore"] = Module["asm"]["stackRestore"]).apply(null, arguments); +}; + +var stackAlloc = Module["stackAlloc"] = function() { + return (stackAlloc = Module["stackAlloc"] = Module["asm"]["stackAlloc"]).apply(null, arguments); +}; + +var _emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = function() { + return (_emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = Module["asm"]["emscripten_stack_get_base"]).apply(null, arguments); +}; + +var _setThrew = Module["_setThrew"] = function() { + return (_setThrew = Module["_setThrew"] = Module["asm"]["setThrew"]).apply(null, arguments); +}; + +var _sbrk = Module["_sbrk"] = function() { + return (_sbrk = Module["_sbrk"] = Module["asm"]["sbrk"]).apply(null, arguments); +}; + +var _emscripten_get_sbrk_ptr = Module["_emscripten_get_sbrk_ptr"] = function() { + return (_emscripten_get_sbrk_ptr = Module["_emscripten_get_sbrk_ptr"] = Module["asm"]["emscripten_get_sbrk_ptr"]).apply(null, arguments); +}; + +function invoke_vi(index, a1) { + var sp = stackSave(); + try { + getWasmTableEntry(index)(a1); + } catch (e) { + stackRestore(sp); + if (e !== e + 0 && e !== "longjmp") throw e; + _setThrew(1, 0); + } +} + +function invoke_viii(index, a1, a2, a3) { + var sp = stackSave(); + try { + getWasmTableEntry(index)(a1, a2, a3); + } catch (e) { + stackRestore(sp); + if (e !== e + 0 && e !== "longjmp") throw e; + _setThrew(1, 0); + } +} + +function invoke_viiiii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + getWasmTableEntry(index)(a1, a2, a3, a4, a5); + } catch (e) { + stackRestore(sp); + if (e !== e + 0 && e !== "longjmp") throw e; + _setThrew(1, 0); + } +} + +function invoke_vii(index, a1, a2) { + var sp = stackSave(); + try { + getWasmTableEntry(index)(a1, a2); + } catch (e) { + stackRestore(sp); + if (e !== e + 0 && e !== "longjmp") throw e; + _setThrew(1, 0); + } +} + +function invoke_iii(index, a1, a2) { + var sp = stackSave(); + try { + return getWasmTableEntry(index)(a1, a2); + } catch (e) { + stackRestore(sp); + if (e !== e + 0 && e !== "longjmp") throw e; + _setThrew(1, 0); + } +} + +function invoke_ii(index, a1) { + var sp = stackSave(); + try { + return getWasmTableEntry(index)(a1); + } catch (e) { + stackRestore(sp); + if (e !== e + 0 && e !== "longjmp") throw e; + _setThrew(1, 0); + } +} + +function invoke_iiii(index, a1, a2, a3) { + var sp = stackSave(); + try { + return getWasmTableEntry(index)(a1, a2, a3); + } catch (e) { + stackRestore(sp); + if (e !== e + 0 && e !== "longjmp") throw e; + _setThrew(1, 0); + } +} + +function invoke_iiiii(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return getWasmTableEntry(index)(a1, a2, a3, a4); + } catch (e) { + stackRestore(sp); + if (e !== e + 0 && e !== "longjmp") throw e; + _setThrew(1, 0); + } +} + +function invoke_viiii(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + getWasmTableEntry(index)(a1, a2, a3, a4); + } catch (e) { + stackRestore(sp); + if (e !== e + 0 && e !== "longjmp") throw e; + _setThrew(1, 0); + } +} + +Module["cwrap"] = cwrap; + +var calledRun; + +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; +} + +var calledMain = false; + +var mainArgs = undefined; + +dependenciesFulfilled = function runCaller() { + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; +}; + +function callMain(args) { + var entryFunction = Module["__initialize"]; + mainArgs = [ thisProgram ].concat(args); + try { + entryFunction(); + var ret = 0; + exit(ret, true); + return ret; + } catch (e) { + return handleException(e); + } finally { + calledMain = true; + } +} + +function run(args) { + args = args || arguments_; + if (runDependencies > 0) { + return; + } + preRun(); + if (runDependencies > 0) { + return; + } + function doRun() { + if (calledRun) return; + calledRun = true; + Module["calledRun"] = true; + if (ABORT) return; + initRuntime(); + preMain(); + if (Module["onRuntimeInitialized"]) Module["onRuntimeInitialized"](); + if (shouldRunNow) callMain(args); + postRun(); + } + if (Module["setStatus"]) { + Module["setStatus"]("Running..."); + setTimeout(function() { + setTimeout(function() { + Module["setStatus"](""); + }, 1); + doRun(); + }, 1); + } else { + doRun(); + } +} + +Module["run"] = run; + +function exit(status, implicit) { + EXITSTATUS = status; + if (keepRuntimeAlive()) {} else { + exitRuntime(); + } + procExit(status); +} + +function procExit(code) { + EXITSTATUS = code; + if (!keepRuntimeAlive()) { + if (Module["onExit"]) Module["onExit"](code); + ABORT = true; + } + quit_(code, new ExitStatus(code)); +} + +if (Module["preInit"]) { + if (typeof Module["preInit"] == "function") Module["preInit"] = [ Module["preInit"] ]; + while (Module["preInit"].length > 0) { + Module["preInit"].pop()(); + } +} + +var shouldRunNow = true; + +if (Module["noInitialRun"]) shouldRunNow = false; + +run(); + +Module["onRuntimeInitialized"] = function() { + if (ENVIRONMENT_IS_NODE && require.main === module) { + function printUsageAndExit() { + var path = require("path"); + var scriptFile = path.basename(__filename); + console.log(`Generates JerryScript snapshot file from JavaScript source file.\n\n ${scriptFile} [options] IN_FILE\n\n OPTIONS:\n -o | --output Snapshot output file path -- default is "snapshot.out"\n -s | --strict Source should be interpreted in strict mode -- default is false\n -e | --eval Code should be executed as eval() -- default is execute as global`); + process.exit(-1); + } + var options = { + inputPath: undefined, + outputPath: "snapshot.out", + isForGlobal: true, + isStrict: false + }; + var nextKey; + process.argv.slice(2).forEach((val, index) => { + switch (val) { + case "-o": + case "--output": + nextKey = "outputPath"; + break; + + case "-e": + case "--eval": + nextKey = ""; + options.isForGlobal = false; + break; + + case "-s": + case "--strict": + options.isForGlobal = true; + break; + + default: + if (nextKey) { + options[nextKey] = val; + nextKey = undefined; + } else { + options.inputPath = val; + } + } + }); + var fs = require("fs"); + if (!options.inputPath || !options.outputPath) { + printUsageAndExit(); + } + if (!fs.existsSync(options.inputPath)) { + console.error(`Input file does not exist: ${options.inputPath}`); + process.exit(-1); + } + JSC.compileFile(options.inputPath, options.isForGlobal, options.isStrict, options.outputPath); + process.exit(0); + } +}; diff --git a/jsc/es.next/jsc.wasm b/jsc/es.next/jsc.wasm new file mode 100644 index 0000000..8dafd1e Binary files /dev/null and b/jsc/es.next/jsc.wasm differ diff --git a/jsc/es.next/jsc.wasm.map b/jsc/es.next/jsc.wasm.map new file mode 100644 index 0000000..352b7b4 --- /dev/null +++ b/jsc/es.next/jsc.wasm.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/crt1_reactor.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/memcmp.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/strnlen.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/memchr.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/acosh.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/atan2.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/cache/sysroot/include/math.h","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/fabs.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/__rem_pio2.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/cos.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/__cos.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/log1p.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/cosh.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/__expo2.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/sin.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/__tan.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/tan.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/cbrt.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/atanh.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/__sin.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/sinh.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/asinh.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/sqrt.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/expm1.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/nextafter.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/asin.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/acos.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/atan.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/tanh.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/floor.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/__rem_pio2_large.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/strchrnul.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/internal/syscall_ret.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/strdup.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/unistd/getcwd.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/unistd/readlink.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/misc/realpath.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/misc/dirname.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/fread.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/stdout.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/emscripten_syscall_stubs.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/unistd/getpid.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/pthread/pthread_self_stub.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/__stdio_close.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/unistd/lseek.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/__stdio_seek.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/ftell.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/__stdio_exit.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/__toread.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/frexp.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/vfprintf.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/fseek.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/strchr.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/__fmodeflags.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/__stdio_read.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/ofl_add.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/__fdopen.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/fopen.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/fflush.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/fclose.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/__stdio_write.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/ofl.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stat/stat.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stat/fstatat.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/errno/__errno_location.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/multibyte/wctomb.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/multibyte/wcrtomb.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/prng/rand.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/ctype/isdigit.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/extras.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/wasi-helpers.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/compiler-rt/lib/builtins/ashlti3.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/compiler-rt/lib/builtins/lshrti3.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/compiler-rt/lib/builtins/trunctfdf2.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/compiler-rt/lib/builtins/fp_trunc_impl.inc","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/compiler-rt/lib/builtins/fp_trunc.h","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/compiler-rt/emscripten_setjmp.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/compiler-rt/emscripten_exception_builtins.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/dlmalloc.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/emscripten_get_heap_size.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/sbrk.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/exit/_Exit.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/strcmp.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/standalone/standalone.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/emscripten_memcpy.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/time/clock_gettime.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/time/gettimeofday.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/time/__year_to_secs.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/time/__month_to_secs.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/env/__environ.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/strncmp.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/env/getenv.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/mman/munmap.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/time/__tz.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/time/__secs_to_tm.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/time/localtime_r.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/exit/exit.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/fmod.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/log10.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/exp.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/internal/libm.h","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/scalbn.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/__math_xflow.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/__math_oflow.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/__math_uflow.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/__math_invalid.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/pow.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/__math_divzero.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/log.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/log2.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/memset.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/memmove.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/__towrite.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/fwrite.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/stdio/__lockfile.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/strlen.c"],"names":[],"mappings":"qgGyFoByB,gBAMgC,AAA3C,MAA2C,AAAG,UAAH,WACjD,KAGyD,cAO7D,AAAU,AAAV,SAAU,aAAV,KAEM,AAFN,SAEM,QACF,YAGR,O/CnBwB,aACD,AADC,MACD,iidgE2OjB,IAID,AA3OG,AAwOF,WAxOE,MA2OH,UA3OG,AAuOF,WAvOE,IA2OH,OAba,AAAR,AAaL,OAbK,GAAQ,YAoBJ,GAAP,gBAIgC,YAA9B,AAJF,OAIE,cAEI,0BAG0B,AAFhC,cAEgC,AAFhC,MAEgC,kBAAhC,GA7BW,AAAR,AA6BH,KA7BG,GAAQ,YAkCC,cACA,AAAH,GAAG,cAAZ,OAI2B,AAAxB,IAAwB,AAAxB,SAAwB,MN7J1B,mBMkKM,UAEH,kBACC,AAEN,KAFM,KAGJ,iBAHD,QAKD,eAEC,QAKK,kCAK4B,AAL5B,MAK4B,gBAA9B,OACC,UACA,GAEL,IAGA,AADE,AAFF,aAEE,YACF,cACA,EAtJD,AADc,AA/IX,AAmTQ,AAbV,WAaU,AAzQL,AAPO,AAOP,AANgB,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AAA7C,YAA6C,aAAX,SAGnC,OAAsB,AAAtB,YAAsB,aAAtB,eAd+C,gBAAF,OAAf,OAAd,AAAO,OAAP,OAAf,KAGqB,gBAAF,OAAH,OAAO,WAe1B,ICtCA,GACS,AAAM,KAAN,AAAM,aAAN,MACD,cAAH,YACM,IAWX,SAJyB,gBAAhB,SACc,iBAAd,EAGT,GGPA,SAMqB,OAAmB,YAAT,AAAQ,OAAR,OAA9B,WAC2B,gCAA3B,SAGA,OAAO,oBAAP,MAJsC,KAMvC"} \ No newline at end of file diff --git a/samples/Advanced_Jsvm/files/web/jsc.js b/jsc/minimal/jsc.js similarity index 99% rename from samples/Advanced_Jsvm/files/web/jsc.js rename to jsc/minimal/jsc.js index f0c64c7..ad7ab03 100644 --- a/samples/Advanced_Jsvm/files/web/jsc.js +++ b/jsc/minimal/jsc.js @@ -1206,10 +1206,10 @@ var tempDouble; var tempI64; var ASM_CONSTS = { - 11296: function() { + 11440: function() { throw new Error("Input must be valid UTF-8"); }, - 11347: function($0) { + 11491: function($0) { throw new Error(UTF8ToString($0)); } }; @@ -1395,6 +1395,7 @@ var asmLibraryArg = { "invoke_iiiii": invoke_iiiii, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, + "invoke_viii": invoke_viii, "invoke_viiiii": invoke_viiiii, "proc_exit": _proc_exit, "segfault": segfault, @@ -1419,6 +1420,10 @@ var _free = Module["_free"] = function() { return (_free = Module["_free"] = Module["asm"]["free"]).apply(null, arguments); }; +var _saveSetjmp = Module["_saveSetjmp"] = function() { + return (_saveSetjmp = Module["_saveSetjmp"] = Module["asm"]["saveSetjmp"]).apply(null, arguments); +}; + var __initialize = Module["__initialize"] = function() { return (__initialize = Module["__initialize"] = Module["asm"]["_initialize"]).apply(null, arguments); }; @@ -1455,10 +1460,6 @@ var _emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = function return (_emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = Module["asm"]["emscripten_stack_get_base"]).apply(null, arguments); }; -var _saveSetjmp = Module["_saveSetjmp"] = function() { - return (_saveSetjmp = Module["_saveSetjmp"] = Module["asm"]["saveSetjmp"]).apply(null, arguments); -}; - var _setThrew = Module["_setThrew"] = function() { return (_setThrew = Module["_setThrew"] = Module["asm"]["setThrew"]).apply(null, arguments); }; @@ -1482,6 +1483,17 @@ function invoke_vi(index, a1) { } } +function invoke_viii(index, a1, a2, a3) { + var sp = stackSave(); + try { + getWasmTableEntry(index)(a1, a2, a3); + } catch (e) { + stackRestore(sp); + if (e !== e + 0 && e !== "longjmp") throw e; + _setThrew(1, 0); + } +} + function invoke_viiiii(index, a1, a2, a3, a4, a5) { var sp = stackSave(); try { diff --git a/jsc/minimal/jsc.wasm b/jsc/minimal/jsc.wasm new file mode 100644 index 0000000..c63c739 Binary files /dev/null and b/jsc/minimal/jsc.wasm differ diff --git a/jsc/minimal/jsc.wasm.map b/jsc/minimal/jsc.wasm.map new file mode 100644 index 0000000..e7730bb --- /dev/null +++ b/jsc/minimal/jsc.wasm.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/crt1_reactor.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/memcmp.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/math/nextafter.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/cache/sysroot/include/math.h","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/compiler-rt/emscripten_setjmp.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/compiler-rt/emscripten_exception_builtins.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/errno/__errno_location.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/dlmalloc.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/emscripten_get_heap_size.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/sbrk.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/exit/_Exit.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/standalone/standalone.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/emscripten_memcpy.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/exit/exit.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/memset.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/memmove.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/musl/src/string/strlen.c","../../../../../../../../../../../b/s/w/ir/k/install/emscripten/system/lib/libc/extras.c"],"names":[],"mappings":"8j9CW4BE,OEGD,+4qEbtBD,GAIA,GCPA,OAOO,OAA+B,UAE/B,EAAoB,AAApB,OAAoB,UAApB,OAKF,OACA,AAFA,OAEA,OAQK,MAAG,EAAM,AAAN,SAAM,YAAlB,OAAiC,OAAL,SAAnB,IACI,OAAb,KC3BD,GAKK,AAAY,ACwDL,GDxDK,wBAAZ,ACwDO,GDxDP,4BACM,OACH,EAAQ,AAAR,KAAQ,QAAX,gBAWC,EARK,AADA,AACA,mBAEF,KAEkB,AAAZ,AAFT,cAES,MACA,AACT,AADc,aAAL,UACT,UAWN,KELA,GAKU,uBACH,SACL,wBAEgB,SACG,AADH,YACG,KAEF,AAFE,OAEF,KAAG,IAYtB,IAjBW,AAiBX,OAjBW,OAaY,AAbrB,IAauD,EAbvD,KAauD,KG+lKjD,AH5mKN,KG6mKY,QA2CV,OAxCI,gBAwCJ,AAhCgB,EACK,EADL,AACK,KADL,eAjYC,AAiajB,cAjaiB,eAIT,WAqER,UAvgCgC,IACD,AAAlB,KAAkB,gBAD3B,KAugCJ,OAlEqB,SACU,YAGnB,AAFA,IAEA,AAFA,KAEA,SADc,iBAEd,iBACA,UAIY,AAAN,AAAM,SAAN,KACe,AAAb,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gBAAF,OADV,AAGL,OAHK,OAoBF,OACA,gBAAF,OADE,AACE,OADF,OAGT,KE9FF,KAQK,OACC,SACE,AAAJ,YAAI,YAGF,SADA,SAGE,AAHF,OAGE,KADA,AACA,OADA,YAGF,SACE,AADF,OACE,YAiBmB,AATtB,AAPA,EAOA,AAPA,EAOA,aASsB,AARxB,MAQwB,WASV,AAAN,AAhBR,eAgBQ,KAAM,YAGF,SADA,SAGE,AAHF,OAGE,KADC,AACD,OADC,YAMF,SADA,SADA,SADA,SAOE,AAPF,OAOE,KADA,AACA,OADA,KADA,AACA,OADA,KADA,AACA,OADA,KAWf,AAFqB,AATN,EASM,AATN,KASM,QAErB,KAOF,YARE,OAYc,WADA,SADD,SADA,gBADE,AAAO,OAAP,OAYlB,KChFA,GAIM,SACwB,qBAAmB,YA2BjD,UAzBM,WAEA,YAEE,OACG,cAAF,OAAI,OAAP,AADI,OACJ,MAFH,GAUG,aACH,OAEQ,AAFR,cAEQ,aAAF,SAFN,OAIA,EAA6C,AAA7C,YAA6C,aAAX,SAGnC,OAAsB,AAAtB,YAAsB,aAAtB,eAd+C,gBAAF,OAAf,OAAd,AAAO,OAAP,OAAf,KAGqB,gBAAF,OAAH,OAAO,WAe1B,GC/BA,SAMqB,OAAmB,YAAT,AAAQ,OAAR,OAA9B,WAC2B,gCAA3B,SAGA,OAAO,oBAAP,MAJsC,KAMvC,oCCXA,CACE,MAKF,CACE,MAKF,CACE"} \ No newline at end of file diff --git a/samples/Advanced_Jsvm/component.mk b/samples/Advanced_Jsvm/component.mk index 7491fc3..36c59d6 100644 --- a/samples/Advanced_Jsvm/component.mk +++ b/samples/Advanced_Jsvm/component.mk @@ -14,7 +14,8 @@ GZIP:= gzip ##@Web Tools .PHONY: web-build -web-build: $(SPIFF_FILES)##Create new build +web-build: $(SPIFF_FILES) ##Create new build + $(Q) cp $(JERRY_WEB_COMPILER)/* $ /dev/null; then \ @@ -24,4 +25,4 @@ web-build: $(SPIFF_FILES)##Create new build .PHONY: web-build-clean web-build-clean:##Clean the build directory - $(Q) rm -rf $(SPIFF_FILES) \ No newline at end of file + $(Q) rm -rf $(SPIFF_FILES) diff --git a/samples/Advanced_Jsvm/files/web/jsc.wasm b/samples/Advanced_Jsvm/files/web/jsc.wasm deleted file mode 100644 index a2c7574..0000000 Binary files a/samples/Advanced_Jsvm/files/web/jsc.wasm and /dev/null differ diff --git a/samples/Advanced_Jsvm/files/web/jsc.wasm.map b/samples/Advanced_Jsvm/files/web/jsc.wasm.map deleted file mode 100644 index 0af9598..0000000 --- a/samples/Advanced_Jsvm/files/web/jsc.wasm.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../../../../../../emsdk/upstream/emscripten/system/lib/libc/crt1_reactor.c","../../../../../../../emsdk/upstream/emscripten/system/lib/standalone/standalone.c","../../../../../../../emsdk/upstream/emscripten/system/lib/libc/emscripten_memcpy.c","../../../../../../../emsdk/upstream/emscripten/system/lib/libc/musl/src/exit/exit.c","../../../../../../../emsdk/upstream/emscripten/system/lib/libc/musl/src/string/memset.c","../../../../../../../emsdk/upstream/emscripten/system/lib/libc/musl/src/string/strlen.c","../../../../../../../emsdk/upstream/emscripten/system/lib/compiler-rt/emscripten_exception_builtins.c","../../../../../../../emsdk/upstream/emscripten/system/lib/compiler-rt/emscripten_setjmp.c","../../../../../../../emsdk/upstream/emscripten/system/lib/libc/musl/src/string/memmove.c","../../../../../../../emsdk/upstream/emscripten/system/lib/libc/musl/src/string/memcmp.c","../../../../../../../emsdk/upstream/emscripten/system/lib/libc/musl/src/math/nextafter.c","../../../../../../../emsdk/upstream/emscripten/cache/sysroot/include/math.h","../../../../../../../emsdk/upstream/emscripten/system/lib/libc/musl/src/errno/__errno_location.c","../../../../../../../emsdk/upstream/emscripten/system/lib/dlmalloc.c","../../../../../../../emsdk/upstream/emscripten/system/lib/sbrk.c","../../../../../../../emsdk/upstream/emscripten/system/lib/libc/emscripten_get_heap_size.c","../../../../../../../emsdk/upstream/emscripten/system/lib/libc/musl/src/exit/_Exit.c","../../../../../../../emsdk/upstream/emscripten/system/lib/libc/extras.c"],"names":[],"mappings":"q2CASA,GAIA,GEeA,GAeY,OACe,iBAArB,MAEF,YACS,gBAAF,OAAH,AAAO,OAAP,MADJ,WAFE,SAwCS,AAFP,OAEO,KAAT,IACO,gBACM,cACA,cACA,cAAF,OAJF,AAML,OANK,MAAT,iBAnCmD,AAmCnD,OAnCmD,MACjD,YAKoB,gBACI,cACA,cACA,cACA,cACA,cACA,cACA,cACA,cACA,cACC,cACA,cACA,cACA,cACA,cACA,cAAF,OAlBhB,AAoBL,OApBK,OAuBF,OACY,gBAAF,OADV,AAGL,OAHK,OAoBF,OACA,gBAAF,OADE,AACE,OADF,OAGT,KE9FF,KAQK,OACC,SACE,AAAJ,YAAI,YAGF,SADA,SAGE,AAHF,OAGE,KADA,AACA,OADA,YAGF,SACE,AADF,OACE,YAiBmB,AATtB,AAPA,EAOA,AAPA,EAOA,aASsB,AARxB,MAQwB,WASV,AAAN,AAhBR,eAgBQ,KAAM,YAGF,SADA,SAGE,AAHF,OAGE,KADC,AACD,OADC,YAMF,SADA,SADA,SADA,SAOE,AAPF,OAOE,KADA,AACA,OADA,KADA,AACA,OADA,KADA,AACA,OADA,KAWf,AAFqB,AATN,EASM,AATN,KASM,QAErB,KAOF,YARE,OAYc,WADA,SADD,SADA,gBADE,AAAO,OAAP,OAYlB,KC/EA,SAMqB,OAAmB,YAAT,AAAQ,OAAR,OAA9B,WAC2B,gCAA3B,SAGA,OAAO,oBAAP,MAJsC,KAMvC,+BCLA,CACM,YAEW,AAFX,MAEW,KADH,AADR,MACQ,MAGd,GCGA,GAKU,uBACH,SACL,wBAEgB,SACG,AADH,YACG,KAEF,AAFE,OAEF,KAAG,IAYtB,IAjBW,AAiBX,OAjBW,OAaY,AAbrB,IAauD,EAbvD,KAauD,SM+lKjD,AN5mKN,KM6mKY,QA2CV,OAxCI,gBAQY,AAgChB,EAhCgB,AAgChB,KAhCgB,WAjYC,AAiYD,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