Comparing version 0.1.12-20200206214526.commit-173e6f1 to 0.1.12-20200320234134.commit-eb8d247
@@ -433,6 +433,9 @@ "use strict"; | ||
try { | ||
wabtModule = wabt.parseWat(this.document.moduleName, text); | ||
wabtModule = wabt.parseWat(this.document.moduleName, text, {}); | ||
} | ||
catch (e) { | ||
console.log(text); | ||
const invalidFile = this.parsingContext.system.resolvePath(this.parsingContext.system.getCurrentDirectory(), 'failed_debug_wat.wat'); | ||
this.parsingContext.system.writeFile(invalidFile, text); | ||
console.error('Error while parsing generated code. Writing debug WAT to ' + invalidFile); | ||
console.error(e); | ||
throw e; | ||
@@ -445,3 +448,6 @@ } | ||
catch (e) { | ||
this.parsingContext.system.write(text); | ||
const invalidFile = this.parsingContext.system.resolvePath(this.parsingContext.system.getCurrentDirectory(), 'failed_debug_wat.wat'); | ||
this.parsingContext.system.writeFile(invalidFile, text); | ||
console.error('Error while resolving names and validate code. Writing debug WAT to ' + invalidFile); | ||
console.error(e); | ||
this.parsingContext.messageCollector.error(e, this.document.astNode); | ||
@@ -645,4 +651,4 @@ throw e; | ||
const memory = t.memory(t.limit(1), t.identifier('mem')); | ||
moduleParts.push(table); | ||
if (tableElems.length) { | ||
moduleParts.push(table); | ||
moduleParts.push(elem); | ||
@@ -649,0 +655,0 @@ } |
{ | ||
"name": "lys", | ||
"version": "0.1.12-20200206214526.commit-173e6f1", | ||
"version": "0.1.12-20200320234134.commit-eb8d247", | ||
"description": "", | ||
@@ -31,9 +31,9 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@webassemblyjs/ast": "^1.8.5", | ||
"@webassemblyjs/wast-printer": "^1.8.5", | ||
"@webassemblyjs/ast": "^1.9.0", | ||
"@webassemblyjs/wast-printer": "^1.9.0", | ||
"arg": "^4.1.2", | ||
"binaryen": "^89.0.0-nightly.20191219", | ||
"binaryen": "^89.0.0", | ||
"ebnf": "^1.8.0", | ||
"utf8-bytes": "0.0.1", | ||
"wabt": "^1.0.12" | ||
"wabt": "^1.0.13" | ||
}, | ||
@@ -60,6 +60,6 @@ "devDependencies": { | ||
"source-map-support": "^0.5.16", | ||
"ts-node": "^8.5.4", | ||
"ts-node": "^8.7.0", | ||
"tslint": "^5.20.1", | ||
"tslint-language-service": "^0.9.9", | ||
"typescript": "^3.7.3" | ||
"typescript": "^3.8.3" | ||
}, | ||
@@ -66,0 +66,0 @@ "nyc": { |
Sorry, the diff of this file is not supported yet
935961
164
10694
Updated@webassemblyjs/ast@^1.9.0
Updatedbinaryen@^89.0.0
Updatedwabt@^1.0.13