Rust编写的JavaScript引擎,该项目是一个试验性质的项目。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
6.8 KiB

5 years ago
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],{
/***/ "./pkg/boa.js":
/*!********************!*\
!*** ./pkg/boa.js ***!
\********************/
/*! exports provided: __wbg_log_38ac309e9be4446e, evaluate, __wbindgen_throw */
5 years ago
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(TextDecoder, TextEncoder) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbg_log_38ac309e9be4446e\", function() { return __wbg_log_38ac309e9be4446e; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"evaluate\", function() { return evaluate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_throw\", function() { return __wbindgen_throw; });\n/* harmony import */ var _boa_bg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./boa_bg */ \"./pkg/boa_bg.wasm\");\n\n\nlet cachedTextDecoder = new TextDecoder('utf-8');\n\nlet cachegetUint8Memory = null;\nfunction getUint8Memory() {\n if (cachegetUint8Memory === null || cachegetUint8Memory.buffer !== _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer) {\n cachegetUint8Memory = new Uint8Array(_boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer);\n }\n return cachegetUint8Memory;\n}\n\nfunction getStringFromWasm(ptr, len) {\n return cachedTextDecoder.decode(getUint8Memory().subarray(ptr, ptr + len));\n}\n\nfunction __wbg_log_38ac309e9be4446e(arg0, arg1) {\n let varg0 = getStringFromWasm(arg0, arg1);\n try {\n console.log(varg0);\n } catch (e) {\n let error = (function () {\n try {\n return e instanceof Error\n ? `${e.message}\n\n Stack:\n ${e.stack}`\n : e.toString();\n } catch(_) {\n return \"<failed to stringify thrown value>\";\n }\n }());\n console.error(\"wasm-bindgen: imported JS function `__wbg_log_38ac309e9be4446e` that was not marked as `catch` threw an error:\", error);\n throw e;\n}\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nlet cachedTextEncoder = new TextEncoder('utf-8');\n\nlet passStringToWasm;\nif (typeof cachedTextEncoder.encodeInto === 'function') {\n passStringToWasm = function(arg) {\n\n\n if (typeof(arg) !== 'string') throw new Error('expected a string argument');\n\n let size = arg.length;\n let ptr = _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_malloc\"](size);\n let offset = 0;\n {\n const mem = getUint8Memory();\n for (; offset < arg.length; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n }\n\n if (offset !== arg.length) {\n arg = arg.slice(offset);\n ptr = _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_realloc\"](ptr, size, size = offset + arg.length * 3);\n const view = getUint8Memory().subarray(ptr + offset, ptr + size);\n const ret = cachedTextEncoder.encodeInto(arg, view);\n if (ret.read != arg.length) throw new Error('failed to pass whole string');\n offset += ret.written;\n }\n WASM_VECTOR_LEN = offset;\n return ptr;\n };\n} else {\n passStringToWasm = function(arg) {\n\n\n if (typeof(arg) !== 'string') throw new Error('expected a string argument');\n\n let size = arg.length;\n let ptr = _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_malloc\"](size);\n let offset = 0;\n {\n const mem = getUint8Memory();\n for (; offset < arg.length; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n }\n\n if (offset !== arg.length) {\n const buf = cachedTextEncoder.encode(arg.slice(offset));\n ptr = _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_realloc\"](ptr, size, size = offset + buf.length);\n getUint8Memory().set(buf, ptr + offset);\n offset += buf.length;\n }\n WASM_VECTOR_LEN = offset;\n return ptr;\n };\n}\n\nlet cachedGlobalArgumentPtr = null;\nfunction globalArgument
5 years ago
/***/ }),
/***/ "./pkg/boa_bg.wasm":
/*!*************************!*\
!*** ./pkg/boa_bg.wasm ***!
\*************************/
/*! exports provided: memory, __rustc_debug_gdb_scripts_section__, __wbindgen_global_argument_ptr, evaluate, __wbindgen_malloc, __wbindgen_realloc, __wbindgen_free */
/***/ (function(module, exports, __webpack_require__) {
eval("\"use strict\";\n// Instantiate WebAssembly module\nvar wasmExports = __webpack_require__.w[module.i];\n__webpack_require__.r(exports);\n// export exports from WebAssembly module\nfor(var name in wasmExports) if(name != \"__webpack_init__\") exports[name] = wasmExports[name];\n// exec imports from WebAssembly module (for esm order)\n/* harmony import */ var m0 = __webpack_require__(/*! ./boa */ \"./pkg/boa.js\");\n\n\n// exec wasm module\nwasmExports[\"__webpack_init__\"]()\n\n//# sourceURL=webpack:///./pkg/boa_bg.wasm?");
/***/ })
}]);