From 923b19c41402c778ce740ee9d5766ab8a790b831 Mon Sep 17 00:00:00 2001 From: Jordi Baylina Date: Wed, 12 Aug 2020 01:36:01 +0200 Subject: [PATCH] Fix: Error description function not found --- package-lock.json | 6 +++--- ports/c/builder.js | 1 - ports/wasm/builder.js | 2 -- src/construction_phase.js | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index be32f12..4192512 100644 --- a/package-lock.json +++ b/package-lock.json @@ -576,9 +576,9 @@ "dev": true }, "fastfile": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/fastfile/-/fastfile-0.0.9.tgz", - "integrity": "sha512-njh6lH2SJiS0u0JofJQf2YfEOSgGfbYPtmFnpEXXy6OilWoX1wGw3klaSKIwhq8+E5MqYpqJXMiaqmptaU2wig==" + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/fastfile/-/fastfile-0.0.12.tgz", + "integrity": "sha512-0EZo2y5eW8X0oiDDRvcnufjVxlM96CQL5hvmRQtbRABWlCkH73IHwkzl0qOSdxtchaMr+0TSB7GVqaVEixRr1Q==" }, "ffiasm": { "version": "0.0.2", diff --git a/ports/c/builder.js b/ports/c/builder.js index 46fe097..58b10b0 100644 --- a/ports/c/builder.js +++ b/ports/c/builder.js @@ -1,4 +1,3 @@ -const streamFromMultiArray = require("../../src/streamfromarray_txt.js"); const utils = require("../../src/utils"); const assert = require("assert"); const Scalar = require("ffjavascript").Scalar; diff --git a/ports/wasm/builder.js b/ports/wasm/builder.js index 5093030..f291b70 100644 --- a/ports/wasm/builder.js +++ b/ports/wasm/builder.js @@ -1,5 +1,3 @@ -const streamFromArrayTxt = require("../../src/streamfromarray_txt"); -const streamFromArrayBin = require("../../src/streamfromarray_bin"); const assert = require("assert"); const ModuleBuilder = require("wasmbuilder").ModuleBuilder; const ModuleBuilderWat = require("wasmbuilder").ModuleBuilderWat; diff --git a/src/construction_phase.js b/src/construction_phase.js index 20f5778..743b741 100644 --- a/src/construction_phase.js +++ b/src/construction_phase.js @@ -574,7 +574,7 @@ function execFunctionCall(ctx, ast) { const fnc = ctx.functions[ast.name]; - if (!fnc) return ctx.throwError("Function not defined"); + if (!fnc) return ctx.throwError(ast, "Function not defined"); const paramValues = []; for (let i=0; i< ast.params.length; i++) {