js-runtime: Add Value.eql function, equivalent to Js's === operator
This commit is contained in:
parent
8ec61055e3
commit
e67fdd75e3
2 changed files with 20 additions and 0 deletions
|
|
@ -268,6 +268,13 @@ const zig = {
|
|||
memory.setString(ptr, values[value_map[val_id]]);
|
||||
},
|
||||
|
||||
zigValueEqual(val, other) {
|
||||
let memory = new MemoryBlock(zig.wasm.exports.memory.buffer);
|
||||
const val_js = zig.readObject(memory.slice(val), memory);
|
||||
const other_js = zig.readObject(memory.slice(other), memory);
|
||||
return val_js === other_js;
|
||||
},
|
||||
|
||||
functionCall(func, this_param, args, args_len, ret_ptr) {
|
||||
let memory = new MemoryBlock(zig.wasm.exports.memory.buffer);
|
||||
let argv = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue