Update dependencies and dist files

This commit is contained in:
dcode 2019-02-21 23:04:41 +01:00
parent 11ea78bc13
commit 4be78147e6
7 changed files with 1429 additions and 907 deletions

2
dist/asc.js vendored

File diff suppressed because one or more lines are too long

2
dist/asc.js.map vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2309
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -12,21 +12,21 @@
},
"dependencies": {
"@protobufjs/utf8": "^1.1.0",
"binaryen": "67.0.0-nightly.20190207",
"binaryen": "68.0.0-nightly.20190220",
"glob": "^7.1.3",
"long": "^4.0.0"
},
"devDependencies": {
"@types/node": "^10.12.21",
"@types/node": "^11.9.4",
"browser-process-hrtime": "^1.0.0",
"diff": "^4.0.1",
"ts-loader": "^5.3.3",
"ts-node": "^6.2.0",
"tslint": "^5.12.1",
"typedoc": "^0.13.0",
"typedoc-plugin-external-module-name": "^1.1.3",
"typescript": "^3.3.1",
"webpack": "^4.29.1",
"typedoc": "^0.14.0",
"typedoc-plugin-external-module-name": "^2.0.0",
"typescript": "^3.3.3",
"webpack": "^4.29.5",
"webpack-cli": "^3.2.3"
},
"main": "index.js",

View File

@ -1058,6 +1058,7 @@ export class Module {
private allocStringCached(str: string | null): usize {
if (str == null) return 0;
var cachedStrings = this.cachedStrings;
if (cachedStrings.has(str)) return <usize>cachedStrings.get(str);
var ptr = allocString(str);
cachedStrings.set(str, ptr);
@ -1542,11 +1543,8 @@ function stringLengthUTF8(str: string): usize {
return len;
}
var cachedStrings = new Map<string | null,usize>();
function allocString(str: string | null): usize {
if (str == null) return 0;
if (cachedStrings.has(str)) return <usize>cachedStrings.get(str);
var ptr = memory.allocate(stringLengthUTF8(str) + 1);
// the following is based on Emscripten's stringToUTF8Array
var idx = ptr;
@ -1585,7 +1583,6 @@ function allocString(str: string | null): usize {
}
}
store<u8>(idx, 0);
cachedStrings.set(str, ptr);
return ptr;
}