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.2 KiB

6 years ago
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],{
/***/ "./pkg/boa.js":
/*!********************!*\
!*** ./pkg/boa.js ***!
\********************/
/*! exports provided: __wbg_log_e93ebc22f4028df1, evaluate, __wbindgen_throw, __wbindgen_object_drop_ref */
/***/ (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_e93ebc22f4028df1\", function() { return __wbg_log_e93ebc22f4028df1; });\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 export (binding) */ __webpack_require__.d(__webpack_exports__, \"__wbindgen_object_drop_ref\", function() { return __wbindgen_object_drop_ref; });\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_e93ebc22f4028df1(arg0, arg1) {\n let varg0 = getStringFromWasm(arg0, arg1);\n try {\n console.log(varg0);\n } catch (e) {\n console.error(\"wasm-bindgen: imported JS function that was not marked as `catch` threw an error:\", e);\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 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 writeOffset = 0;\n while (true) {\n const view = getUint8Memory().subarray(ptr + writeOffset, ptr + size);\n const { read, written } = cachedTextEncoder.encodeInto(arg, view);\n writeOffset += written;\n if (read === arg.length) {\n break;\n }\n arg = arg.substring(read);\n ptr = _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_realloc\"](ptr, size, size += arg.length * 3);\n }\n WASM_VECTOR_LEN = writeOffset;\n return ptr;\n };\n} else {\n passStringToWasm = function(arg) {\n\n if (typeof(arg) !== 'string') throw new Error('expected a string argument');\n\n const buf = cachedTextEncoder.encode(arg);\n const ptr = _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_malloc\"](buf.length);\n getUint8Memory().set(buf, ptr);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n };\n}\n\nlet cachedGlobalArgumentPtr = null;\nfunction globalArgumentPtr() {\n if (cachedGlobalArgumentPtr === null) {\n cachedGlobalArgumentPtr = _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"__wbindgen_global_argument_ptr\"]();\n }\n return cachedGlobalArgumentPtr;\n}\n\nlet cachegetUint32Memory = null;\nfunction getUint32Memory() {\n if (cachegetUint32Memory === null || cachegetUint32Memory.buffer !== _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer) {\n cachegetUint32Memory = new Uint32Array(_boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"memory\"].buffer);\n }\n return cachegetUint32Memory;\n}\n/**\n* @param {string} src\n* @returns {string}\n*/\nfunction evaluate(src) {\n const ptr0 = passStringToWasm(src);\n const len0 = WASM_VECTOR_LEN;\n const retptr = globalArgumentPtr();\n try {\n _boa_bg__WEBPACK_IMPORTED_MODULE_0__[\"evaluate\"](retptr, ptr0, len0);\n const mem = getUint32Memory();\n const rustptr = mem[retptr / 4];\n const rustlen = mem[retptr / 4 + 1];\n\n const realRet = getS
/***/ }),
/***/ "./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?");
/***/ })
}]);