porffor 0.57.8 → 0.57.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/codegen.js +2 -2
- package/compiler/disassemble.js +2 -2
- package/package.json +1 -1
- package/runtime/index.js +1 -1
package/compiler/codegen.js
CHANGED
@@ -2703,7 +2703,7 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {
|
|
2703
2703
|
|
2704
2704
|
if (
|
2705
2705
|
func?.returns?.length === 0 ||
|
2706
|
-
(idx === importedFuncs[name] && importedFuncs[importedFuncs[name]]?.returns === 0)
|
2706
|
+
(idx === importedFuncs[name] && importedFuncs[importedFuncs[name]]?.returns?.length === 0)
|
2707
2707
|
) {
|
2708
2708
|
out.push(number(UNDEFINED));
|
2709
2709
|
}
|
@@ -5750,7 +5750,7 @@ const generateMember = (scope, decl, _global, _name) => {
|
|
5750
5750
|
if (func) return withType(scope, [ number(countLength(func, name)) ], TYPES.number);
|
5751
5751
|
|
5752
5752
|
if (Object.hasOwn(builtinFuncs, name)) return withType(scope, [ number(countLength(builtinFuncs[name], name)) ], TYPES.number);
|
5753
|
-
if (Object.hasOwn(importedFuncs, name)) return withType(scope, [ number(importedFuncs[name].params.length
|
5753
|
+
if (Object.hasOwn(importedFuncs, name)) return withType(scope, [ number(importedFuncs[name].params.length) ], TYPES.number);
|
5754
5754
|
if (Object.hasOwn(internalConstrs, name)) return withType(scope, [ number(internalConstrs[name].length ?? 0) ], TYPES.number);
|
5755
5755
|
}
|
5756
5756
|
|
package/compiler/disassemble.js
CHANGED
@@ -102,8 +102,8 @@ export default (wasm, name = '', ind = 0, locals = {}, params = [], returns = []
|
|
102
102
|
const callFunc = funcs.find(x => x.index === idx);
|
103
103
|
if (callFunc) out += ` ;; $${callFunc.name} ${makeSignature(callFunc.params, callFunc.returns)}`;
|
104
104
|
if (globalThis.importFuncs && idx < importFuncs.length) {
|
105
|
-
const importFunc = importFuncs[idx];
|
106
|
-
out += ` ;; import ${importFunc.name} ${makeSignature(
|
105
|
+
const importFunc = globalThis.importFuncs[idx];
|
106
|
+
out += ` ;; import ${importFunc.name} ${makeSignature(importFunc.params, importFunc.returns)}`;
|
107
107
|
}
|
108
108
|
}
|
109
109
|
|
package/package.json
CHANGED