diff options
author | 蒼時弦也 <[email protected]> | 2020-10-09 23:16:54 +0800 |
---|---|---|
committer | Ron Evans <[email protected]> | 2020-10-18 22:15:47 +0200 |
commit | e690ff0d8c3d42437e5b740a20d0544240c70ade (patch) | |
tree | 3999d67009655f5c583a27402b250799ea456c24 /targets | |
parent | 06564cbdb2ec19d4cce496d263e8d33dbd94f340 (diff) | |
download | tinygo-e690ff0d8c3d42437e5b740a20d0544240c70ade.tar.gz tinygo-e690ff0d8c3d42437e5b740a20d0544240c70ade.zip |
Add instanceof support for WebAssembly
Diffstat (limited to 'targets')
-rw-r--r-- | targets/wasm_exec.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/targets/wasm_exec.js b/targets/wasm_exec.js index 746b4c91c..a0dd10a1e 100644 --- a/targets/wasm_exec.js +++ b/targets/wasm_exec.js @@ -407,9 +407,9 @@ }, // func valueInstanceOf(v ref, t ref) bool - //"syscall/js.valueInstanceOf": (sp) => { - // mem().setUint8(sp + 24, loadValue(sp + 8) instanceof loadValue(sp + 16)); - //}, + "syscall/js.valueInstanceOf": (v_addr, t_addr) => { + return loadValue(v_attr) instanceof loadValue(t_addr); + }, // func copyBytesToGo(dst []byte, src ref) (int, bool) "syscall/js.copyBytesToGo": (ret_addr, dest_addr, dest_len, dest_cap, source_addr) => { |