js-runtime: Add Function.paramCount to get the number of parameters

This commit is contained in:
iddev5 2022-07-08 18:03:55 +05:30 committed by Stephen Gutekanst
parent e8f5ca9117
commit 852278ebe7
2 changed files with 10 additions and 0 deletions

View file

@ -327,6 +327,10 @@ const zig = {
zig.functionCall(values[id], undefined, args, args_len, ret_ptr);
},
zigGetParamCount(id) {
return values[id].length;
},
zigConstructType(id, args, args_len, ret_ptr) {
let memory = new MemoryBlock(zig.wasm.exports.memory.buffer);
let argv = [];